Electronic seal encryption and decoding method and device

By using IMSI numbers, PIN numbers and random numbers on mobile terminals to generate encryption keys, the problem of electronic seal encryption keys being easily attacked is solved, the security of electronic seals is improved, and the security needs of mobile e-commerce are met.

CN115118414BActive Publication Date: 2025-01-03CHINA MOBILE GROUP JIANGSU +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110304307.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-22
Publication Date
2025-01-03
Estimated Expiration
2041-03-22

AI Technical Summary

Technical Problem

In the prior art, the electronic seal encryption key on the mobile terminal is easily acquired and cracked by the attacker, resulting in poor security of the electronic seal.

Method used

By generating random numbers and combining the IMSI number and PIN code of the communication device, multiple factors are used to generate and operate the encryption key, enhancing the encryption security of the electronic seal. The specific method includes fusing the IMSI number and the PIN code, further encrypting it with the random number, and generating it as an encryption key.

Benefits of technology

It has improved the protection and security of electronic seals, enhanced the security of electronic seals on communication equipment, and met the security needs of information services such as mobile e-commerce.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115118414B_ABST
    Figure CN115118414B_ABST
Patent Text Reader

Abstract

The present invention provides an electronic seal encryption and decoding method and device, the method comprising: generating a random number, and obtaining the IMSI number and PIN code of the communication device; generating an encryption key for encrypting the electronic seal on the communication device according to the IMSI number, PIN code and random number; encrypting the electronic seal using the encryption key to obtain the encrypted electronic seal. The present invention enhances the protection of the electronic seal and improves the security of the electronic seal on the communication device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to an electronic seal encryption and decoding method and device. Background Art

[0002] The storage of electronic seals is the core part of electronic signatures. Electronic seals contain user information, seal information and user private keys. Electronic seals are key information for users to sign or seal electronically, and must be protected from illegal access, theft, copying and cracking. The protection of electronic seals is based on the PKI (Public Key Infrastructure) system encryption and decryption and the basic guarantee of signature calculation validity. For electronic seals on mobile terminals, since user information and keys are stored in the form of files on the storage medium of mobile terminals, the security issues of electronic seals on mobile terminals are particularly prominent.

[0003] At present, the encryption and decryption of electronic seals on mobile terminals usually adopt the following methods:

[0004] 1. After the electronic seal is encrypted with a fixed encryption key, it is saved in the memory in the form of a file. When the electronic seal needs to be accessed, the encryption key is used to decrypt the file to obtain the user's electronic seal;

[0005] 2. The PIN code (Personal Identification Number) set by the user is used as a factor to calculate the encryption key, and the electronic seal is encrypted with the encryption key. When decrypting, the user is also required to enter the correct PIN code. After the decryption key that is the same as the encryption key is obtained through calculation, the electronic seal is decrypted, and the user's electronic seal is finally obtained.

[0006] The shortcomings of the existing electronic seal encryption and decryption methods:

[0007] 1. For the method of using a fixed encryption key to encrypt electronic seals, once an attacker obtains the user key file on the storage device, he can copy the key file to other mobile terminals for use. At the same time, the fixed encryption key is easy to be cracked.

[0008] 2. The electronic seal relies on the PIN code as a factor to obtain the encryption key. For example, the electronic seal is directly encrypted by the user's PIN code. In this way, as long as the attacker obtains the user's PIN code, he can transfer the key file to other mobile terminals for use, which poses a security risk.

[0009] In summary, after the electronic seal on the mobile terminal is encrypted using a fixed encryption key or an encryption key generated based on the user's PIN code, an attacker can easily obtain the encryption key and crack it, making the security of the electronic seal poor. Summary of the invention

[0010] The present invention provides an electronic seal encryption and decoding method and device, which are used to solve the defect in the prior art that the key used to encrypt the electronic seal on the mobile phone terminal is easily obtained and cracked by an attacker, and realizes the use of multiple factors to perform calculations to obtain the encryption key, so that the encryption key is not easily obtained and cracked by an attacker, thereby improving the security of the electronic seal.

[0011] The present invention provides an electronic seal encryption method, which is applied to communication equipment and comprises:

[0012] Generate a random number and obtain the IMSI number and PIN code of the communication device;

[0013] Generate an encryption key for encrypting the electronic seal on the communication device according to the IMSI number, PIN code and random number;

[0014] The electronic seal is encrypted using the encryption key to obtain the encrypted electronic seal.

[0015] According to the electronic seal encryption method provided by the present invention, the encryption key for encrypting the electronic seal on the communication device is generated according to the IMSI number, PIN code and random number, including:

[0016] Merging the IMSI number and the PIN code;

[0017] Encrypting a fusion result of the IMSI number and the PIN code based on a first encryption algorithm;

[0018] Merging the encryption result based on the first encryption algorithm and the random number;

[0019] Encrypting the encryption result and the fusion result of the random number based on a second encryption algorithm;

[0020] The encryption result based on the second encryption algorithm is used as the encryption key.

[0021] According to the electronic seal encryption method provided by the present invention, the random number is generated, and the IMSI number and PIN code of the communication device are obtained, and then the following steps are further included:

[0022] The encryption result based on the first encryption algorithm and the random number are sent to a server, so that the server can store the encryption result based on the first encryption algorithm and the random number in the form of a key-value pair; wherein the encryption result based on the first encryption algorithm in the key-value pair is the key, and the random number is the value.

[0023] The present invention also provides an electronic seal decryption method based on the electronic seal encryption method, comprising:

[0024] Obtaining the IMSI number, PIN code and random number of the communication device;

[0025] Generate a decryption key for decrypting the encrypted electronic seal according to the IMSI number, the PIN code and the random number; wherein the encryption key and the decryption key are generated in the same manner;

[0026] The electronic seal is decrypted using the decryption key to obtain the decrypted electronic seal.

[0027] According to the electronic seal decryption method provided by the present invention, obtaining the random number includes:

[0028] Sending the encryption result based on the first encryption algorithm to the server;

[0029] Receive the random number retrieved by the server according to the encryption result based on the first encryption algorithm.

[0030] According to the electronic seal decryption method provided by the present invention, the electronic seal is decrypted using the decryption key to obtain the decrypted electronic seal, and then further includes:

[0031] receiving a hash value of the document sent by the server, and signing the hash value using the decrypted electronic seal;

[0032] Sending the signature to the server so that the server can sign the document;

[0033] Receive the document after signature processing returned by the server.

[0034] The present invention also provides an electronic seal encryption device, which is applied to communication equipment and includes:

[0035] A first acquisition module, used to generate a random number and obtain the IMSI number and PIN code of the communication device;

[0036] A first generating module, for generating an encryption key for encrypting the electronic seal on the communication device according to the IMSI number, the PIN code and the random number;

[0037] The encryption module is used to encrypt the electronic seal using the encryption key to obtain the encrypted electronic seal.

[0038] The present invention also provides an electronic seal decryption device based on the electronic seal encryption device, comprising:

[0039] A second acquisition module is used to obtain the IMSI number, PIN code and random number of the communication device;

[0040] A second generating module, used for generating a decryption key for decrypting the encrypted electronic seal according to the IMSI number, the PIN code and the random number; wherein the generation method of the encryption key and the decryption key is the same;

[0041] The decryption module is used to decrypt the electronic seal using the decryption key to obtain the decrypted electronic seal.

[0042] The present invention also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of any of the above-mentioned electronic seal encryption methods or electronic seal decryption methods are implemented.

[0043] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned electronic seal encryption methods or electronic seal decryption methods are implemented.

[0044] The electronic seal encryption and decoding method and device provided by the present invention generate a random and unique encryption key to encrypt the electronic seal by performing calculations based on multiple factors such as the IMSI number, PIN code and generated random numbers of the communication device, thereby enhancing the protection of the electronic seal, improving the security of the electronic seal on the communication device, and meeting the security requirements of information services such as mobile e-commerce. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0046] Figure 1 It is a schematic diagram of the flow of the electronic seal encryption method provided by the present invention;

[0047] Figure 2 It is an interactive schematic diagram of the electronic seal encryption method provided by the present invention;

[0048] Figure 3 It is a schematic flow chart of the electronic seal decryption method provided by the present invention;

[0049] Figure 4 It is an interactive schematic diagram of a user triggering electronic seal access in the electronic seal decryption method provided by the present invention;

[0050] Figure 5 It is an interactive schematic diagram of the electronic signature system initiating electronic seal access in the electronic seal decryption method provided by the present invention;

[0051] Figure 6 It is a structural schematic diagram of the electronic seal encryption device provided by the present invention;

[0052] Figure 7 It is a structural schematic diagram of the electronic seal decryption device provided by the present invention;

[0053] Figure 8 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Combine the following Figure 1 An electronic seal encryption method of the present invention is described, which is applied to a communication device. The method comprises: step 101, generating a random number, and obtaining an IMSI (International Mobile Subscriber Identity) number and a PIN code of the communication device;

[0056] Optionally, the execution subject of this embodiment is a communication device. The communication device is a device used for communication, such as a mobile phone terminal. However, the communication device in this embodiment is not limited to a mobile phone terminal.

[0057] The electronic signature platform security component on the communication device dynamically generates a random number and obtains the IMSI number and PIN code of the communication device. This embodiment is not limited to the specific method of obtaining the IMSI number and PIN code.

[0058] The IMSI number is the unique physical device information of the SIM (Subscriber Identity Module) card on the communication device. The PIN code is set by the user.

[0059] Optionally, when the communication device obtains a user's request to encrypt and store an electronic seal, the generation of a random number is triggered.

[0060] Step 102, generating an encryption key for encrypting the electronic seal on the communication device according to the IMSI number, the PIN code and the random number;

[0061] This embodiment generates a random, unique encryption key as the encryption key of the electronic seal based on three factors, namely, the IMSI number, the PIN code and the random number. This embodiment does not limit the method for generating the encryption key.

[0062] Using multiple factors to generate encryption keys for electronic seal encryption has a higher security. Even if an intruder obtains some information of the operation factors of the electronic seal encryption key, such as the PIN code, from a certain channel, it is difficult to obtain and imitate the hardware storage information and random numbers such as the IMSI number in the SIM card, so it is impossible to calculate the decryption key, which makes it difficult to obtain the electronic seal in the end, thus providing the necessary security guarantee for the safe storage and use of electronic seals on communication equipment.

[0063] Step 103: Use the encryption key to encrypt the electronic seal to obtain the encrypted electronic seal.

[0064] After obtaining the encryption key, the electronic seal is encrypted using the encryption key. The encrypted electronic seal is stored on the communication device, and no additional equipment is required for storage, which does not increase the cost of using the electronic seal.

[0065] This embodiment generates a random, unique encryption key to encrypt the electronic seal by performing calculations based on multiple factors such as the IMSI number, PIN code and generated random number of the communication device, thereby enhancing the protection of the electronic seal, improving the security of the electronic seal on the communication device, and meeting the security requirements of information services such as mobile e-commerce.

[0066] On the basis of the above embodiment, the encryption key for encrypting the electronic seal on the communication device is generated according to the IMSI number, the PIN code and the random number in this embodiment, including: fusing the IMSI number and the PIN code; encrypting the fusion result of the IMSI number and the PIN code based on a first encryption algorithm;

[0067] Optionally, the IMSI number and the PIN code are merged in a splicing manner, but this embodiment is not limited to this manner.

[0068] The encryption result based on the first encryption algorithm and the random number are merged; the fusion result of the encryption result and the random number is encrypted based on a second encryption algorithm; and the encryption result based on the second encryption algorithm is used as the encryption key.

[0069] The encryption key is obtained through two layers of fusion encryption. The first layer of fusion encryption is to encrypt the IMSI number and PIN code after fusion. The second layer of fusion encryption is to encrypt the output of the first layer after fusion with the generated random number.

[0070] The first encryption algorithm and the second encryption algorithm may be the same or different.

[0071] Optionally, the first encryption algorithm and the second encryption algorithm are both MD5 (Message Digest Algorithm). In this case, the calculation formula of the encryption key is as follows:

[0072] Encryption key = MD5 (MD5 (PIN code + IMSI number) + random number).

[0073] This embodiment uses two layers of fusion encryption to make the form of the encryption key more complex, making it difficult for the encryption key to be cracked, thereby improving the security of the electronic seal.

[0074] On the basis of the above-mentioned embodiment, the random number is generated in this embodiment, and the IMSI number and PIN code of the communication device are obtained, and then the encryption result based on the first encryption algorithm and the random number are sent to the server, so that the server can store the encryption result based on the first encryption algorithm and the random number in the form of a key-value pair; wherein the encryption result based on the first encryption algorithm in the key-value pair is the key, and the random number is the value.

[0075] Specifically, the communication device sends the encryption result based on the first encryption algorithm and the generated random number to the electronic signature system on the server for storage.

[0076] The encryption result based on the first encryption algorithm is used as a key code for retrieving the random number generated by the communication device.

[0077] Optionally, when the first encryption algorithm is MD5, the encryption result based on the first encryption algorithm is MD5 (PIN code + IMSI number). The key-value pair consisting of the encryption result of the first encryption algorithm and the random number is (MD5 (PIN code + IMSI number), random number).

[0078] This embodiment stores the random number for generating the key on the server, and uses the encryption result of the first encryption algorithm as the key code for retrieving the random number, which increases the difficulty of obtaining the random number, making the decryption key not easy to obtain and making it difficult to decrypt the electronic seal, thereby improving the security of access to the electronic seal.

[0079] like Figure 2 As shown in the figure, the complete process of electronic seal encryption includes the following steps:

[0080] 1. The user requests to encrypt and store the electronic seal through operation;

[0081] 2. The security component on the communication device generates a random number;

[0082] 3. The security component obtains the IMSI number and PIN code of the communication device;

[0083] 4. The security component uploads the random number to the server and sends the key code for random number retrieval = MD5 (PIN code + IMSI number) to the server;

[0084] 5. The security component uses an encryption key to encrypt and store the electronic seal, and the encryption key = MD5 (MD5 (PIN code + IMSI number) + user random number);

[0085] 6. The electronic signature platform stores random numbers and key codes for random number retrieval.

[0086] Combine the following Figure 3 The present invention describes an electronic seal decryption method based on the electronic seal decryption method embodiment, the method comprising: step 301, obtaining the IMSI number, PIN code and random number of the communication device;

[0087] The obtained random number is generated in advance, and this embodiment is not limited to the storage location of the random number.

[0088] The electronic signature platform security component on the communication device obtains the IMSI number, PIN code and pre-generated random number of the communication device.

[0089] Step 302, generating a decryption key for decrypting the encrypted electronic seal according to the IMSI number, the PIN code and the random number; wherein the encryption key and the decryption key are generated in the same manner;

[0090] The electronic signature platform security component on the communication device generates a decryption key as the decryption key for the electronic seal based on three factors, namely the IMSI number, the PIN code and the random number.

[0091] In this embodiment, the encryption key and the decryption key are generated in the same way. Only when the IMSI number, PIN code and random number are completely correct, the encryption key and the decryption key are the same, and the electronic seal can be decrypted successfully using the decryption key, otherwise the decryption fails.

[0092] It is difficult for an intruder to know that the IMSI number and random number are needed to generate the decryption key, and even if they know it, the data they obtain may be incorrect and they still cannot decrypt the electronic seal. Even if they obtain the correct IMSI number, PIN code and random number, they still need to perform calculations to obtain the decryption key.

[0093] Step 303: decrypt the electronic seal using the decryption key to obtain the decrypted electronic seal.

[0094] After obtaining the decryption key, the electronic seal is decrypted using the decryption key.

[0095] Optionally, the decrypted electronic seal is used to sign the document.

[0096] This embodiment obtains the decryption key of the electronic seal by calculating three factors: a random number generated by the communication device, the IMSI number of the communication device, and the PIN code, thereby increasing the difficulty of obtaining the decryption key, increasing the complexity of decrypting the electronic seal, and enhancing the security of access to the electronic seal.

[0097] Based on the above embodiment, obtaining the random number in this embodiment includes: sending the encryption result based on the first encryption algorithm to a server; and receiving the random number retrieved by the server according to the encryption result based on the first encryption algorithm.

[0098] Specifically, the communication device in this embodiment obtains a random number by interacting with a server.

[0099] During the interaction, the communication device first sends the key code retrieved by the random number, that is, the encryption result based on the first encryption algorithm, to the server. The server retrieves the random number corresponding to the key code according to the key code, and sends the retrieved random number to the communication device. The communication device obtains the decryption key according to the random number, the IMSI number of the communication device and the PIN code.

[0100] In this embodiment, the acquisition of random numbers requires the communication device to interact with the server to obtain the random numbers stored on the server. The acquisition process is complicated, which further increases the difficulty of obtaining the decryption key, increases the complexity of decrypting the electronic seal, and enhances the security of access to the electronic seal.

[0101] On the basis of the above embodiments, the electronic seal is decrypted using the decryption key to obtain the decrypted electronic seal, and then also includes: receiving the hash value of the document sent by the server, signing the hash value using the decrypted electronic seal; sending the signature to the server so that the server can sign the document; and receiving the signed document returned by the server.

[0102] Optionally, when a user initiates access to an electronic seal, before the server sends the hash value of the document, the communication device obtains the user's request to access the electronic seal and sends the number of the document to be signed to the server. The server searches for the document based on the document number and calculates the hash value of the document.

[0103] Optionally, when the electronic signature system on the server initiates electronic seal access, before the server sends the hash value of the document, the server obtains the document signer and the document to be signed through business logic, and calculates the hash value of the document. The document signer sends a notification of the user's signature to the communication device, and the notification carries the hash value of the document. The communication device then displays the notification to the user, and the user requests to execute the electronic signature operation.

[0104] like Figure 4 As shown, the steps for a user to trigger electronic seal access are as follows:

[0105] 1. The user requests an electronic signature from the electronic signature platform security component;

[0106] 2. The security component requests the random number generated by the communication device from the electronic signature system on the server, and sends the key code for random number retrieval = MD5 (PIN code, IMSI number) to the server;

[0107] 3. The electronic signature platform retrieves the random number based on the key code sent by the security component;

[0108] 4. The electronic signature platform searches for the document and calculates the hash value;

[0109] 5. The electronic signature platform returns the document hash value and random number;

[0110] 6. The security component uses MD5 to decrypt the encrypted electronic seal stored locally. The decryption key Key = (MD5 (MD5 (PIN code + SIM card IMSI number) + user random number)) to decrypt the electronic seal;

[0111] 7. The electronic signature platform security component signs the hash value of the document with an electronic seal;

[0112] 8. The electronic signature platform security component sends the signature of the document hash value to the electronic signature system;

[0113] 9. The electronic signature system signs the document and generates a visual signature file;

[0114] 10. The electronic signature system feeds back the signature result and visual signature file to the security component;

[0115] 11. The security component returns the signature result and the visual signature file to the user.

[0116] like Figure 5 As shown, the steps for the electronic signature system on the server to initiate electronic seal access are as follows:

[0117] 1. The electronic signature system specifies the document signer;

[0118] 2. The electronic signature system carries the document hash value and number to notify the user to sign;

[0119] 3. The electronic signature platform security component notifies the user to sign;

[0120] 4. The user requests the electronic signature platform security component to execute the electronic signature;

[0121] 5. The security component on the communication device requests the electronic signature system to generate a random number for the communication device, and sends the key code for random number retrieval = MD5 (PIN code, IMSI number) to the electronic signature system;

[0122] 6. The electronic signature system retrieves the random number based on the key code sent by the security component;

[0123] 7. The electronic signature system returns a random number;

[0124] 8. The security component uses the MD5 algorithm to decrypt the encrypted electronic signature stored locally. The decryption key Key = (MD5(MD5(PIN code + SIM card IMSI number) + user random number)) to obtain the electronic seal;

[0125] 9. The electronic signature platform security component signs the hash value of the document with an electronic seal;

[0126] 10. The electronic signature platform security component sends the signature of the hash value of the document to the electronic signature system;

[0127] 11. The electronic signature system signs the document and generates a visual signature file;

[0128] 12. The electronic signature system feeds back the signature result and visual signature file to the security component;

[0129] 13. The security component returns the signature result and the visual signature file to the user.

[0130] The electronic seal encryption device provided by the present invention is described below. The electronic seal encryption device described below and the electronic seal encryption method described above can be referred to each other.

[0131] like Figure 6 As shown, the electronic seal encryption device includes a first acquisition module 601, a first generation module 602 and an encryption module 603, wherein:

[0132] The first acquisition module 601 is used to generate a random number and obtain the IMSI number and PIN code of the communication device;

[0133] The electronic signature platform security component on the communication device dynamically generates a random number and obtains the IMSI number and PIN code of the communication device.

[0134] Optionally, when the communication device obtains a user's request to encrypt and store an electronic seal, the generation of a random number is triggered.

[0135] The first generating module 602 is used to generate an encryption key for encrypting the electronic seal on the communication device according to the IMSI number, the PIN code and the random number;

[0136] This embodiment generates a random, unique encryption key as the encryption key of the electronic seal based on three factors, namely, the IMSI number, the PIN code and the random number. This embodiment does not limit the method for generating the encryption key.

[0137] Using multiple factors to generate encryption keys for electronic seal encryption has a higher security. Even if an intruder obtains some information of the operation factors of the electronic seal encryption key, such as the PIN code, from a certain channel, it is difficult to obtain and imitate the hardware storage information and random numbers such as the IMSI number in the SIM card, so it is impossible to calculate the decryption key, which makes it difficult to obtain the electronic seal in the end, thus providing the necessary security guarantee for the safe storage and use of electronic seals on communication equipment.

[0138] The encryption module 603 is used to encrypt the electronic seal using the encryption key to obtain the encrypted electronic seal.

[0139] After obtaining the encryption key, the electronic seal is encrypted using the encryption key. The encrypted electronic seal is stored on the communication device, and no additional equipment is required for storage, which does not increase the cost of using the electronic seal.

[0140] This embodiment generates a random, unique encryption key to encrypt the electronic seal by performing calculations based on multiple factors such as the IMSI number, PIN code and generated random number of the communication device, thereby enhancing the protection of the electronic seal, improving the security of the electronic seal on the communication device, and meeting the security requirements of information services such as mobile e-commerce.

[0141] Based on the above embodiment, the first generation module in this embodiment is used to: merge the IMSI number and the PIN code; encrypt the fusion result of the IMSI number and the PIN code based on a first encryption algorithm; merge the encryption result based on the first encryption algorithm and the random number; encrypt the fusion result of the encryption result and the random number based on a second encryption algorithm; and use the encryption result based on the second encryption algorithm as the encryption key.

[0142] Based on the above embodiment, this embodiment also includes a sending module, which is used to send the encryption result based on the first encryption algorithm and the random number to the server, so that the server can store the encryption result based on the first encryption algorithm and the random number in the form of a key-value pair; wherein the encryption result based on the first encryption algorithm in the key-value pair is the key, and the random number is the value.

[0143] The electronic seal decryption device provided by the present invention is described below. The electronic seal decryption device described below and the electronic seal decryption method described above can be referred to each other.

[0144] like Figure 7 As shown, the electronic seal decryption device includes a second acquisition module 701, a second generation module 702 and a decryption module 703, wherein:

[0145] The second acquisition module 701 is used to obtain the IMSI number, PIN code and random number of the communication device;

[0146] The obtained random number is generated in advance, and this embodiment is not limited to the storage location of the random number.

[0147] The electronic signature platform security component on the communication device obtains the IMSI number, PIN code and pre-generated random number of the communication device.

[0148] The second generating module 702 is used to generate a decryption key for decrypting the encrypted electronic seal according to the IMSI number, the PIN code and the random number; wherein the generation method of the encryption key and the decryption key is the same;

[0149] The electronic signature platform security component on the communication device generates a decryption key as the decryption key for the electronic seal based on three factors, namely the IMSI number, the PIN code and the random number.

[0150] In this embodiment, the encryption key and the decryption key are generated in the same way. Only when the IMSI number, PIN code and random number are completely correct, the encryption key and the decryption key are the same, and the electronic seal can be decrypted successfully using the decryption key, otherwise the decryption fails.

[0151] It is difficult for an intruder to know that the IMSI number and random number are needed to generate the decryption key, and even if they know it, the data they obtain may be incorrect and they still cannot decrypt the electronic seal. Even if they obtain the correct IMSI number, PIN code and random number, they still need to perform calculations to obtain the decryption key.

[0152] The decryption module 703 is used to decrypt the electronic seal using the decryption key to obtain the decrypted electronic seal.

[0153] After obtaining the decryption key, the electronic seal is decrypted using the decryption key.

[0154] Optionally, the decrypted electronic seal is used to sign the document.

[0155] This embodiment obtains the decryption key of the electronic seal by calculating three factors: a random number generated by the communication device, the IMSI number of the communication device, and the PIN code, thereby increasing the difficulty of obtaining the decryption key, increasing the complexity of decrypting the electronic seal, and enhancing the security of access to the electronic seal.

[0156] On the basis of the above embodiment, the second acquisition module in this embodiment is used to: send the encryption result based on the first encryption algorithm to the server; and receive the random number retrieved by the server according to the encryption result based on the first encryption algorithm.

[0157] Based on the above embodiment, this embodiment also includes a signature module, which is used to receive the hash value of the document sent by the server, sign the hash value using the decrypted electronic seal; send the signature to the server so that the server can sign the document; and receive the signed document returned by the server.

[0158] Figure 8 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 8As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call the logic instructions in the memory 830 to execute the electronic seal encryption method, which includes: generating a random number, and obtaining the IMSI number and PIN code of the communication device; generating an encryption key for encrypting the electronic seal on the communication device according to the IMSI number, the PIN code and the random number; encrypting the electronic seal using the encryption key to obtain the encrypted electronic seal.

[0159] Or an electronic seal decryption method, the method comprising: obtaining the IMSI number, PIN code and random number of the communication device; generating a decryption key for decrypting the encrypted electronic seal according to the IMSI number, PIN code and random number; wherein the generation method of the encryption key and the decryption key is the same; and using the decryption key to decrypt the electronic seal to obtain the decrypted electronic seal.

[0160] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0161] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the electronic seal encryption method provided by the above-mentioned methods, and the method includes: generating a random number and obtaining the IMSI number and PIN code of the communication device; generating an encryption key for encrypting the electronic seal on the communication device based on the IMSI number, PIN code and random number; using the encryption key to encrypt the electronic seal to obtain an encrypted electronic seal.

[0162] Or an electronic seal decryption method, the method comprising: obtaining the IMSI number, PIN code and random number of the communication device; generating a decryption key for decrypting the encrypted electronic seal according to the IMSI number, PIN code and random number; wherein the generation method of the encryption key and the decryption key is the same; and using the decryption key to decrypt the electronic seal to obtain the decrypted electronic seal.

[0163] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the above-mentioned electronic seal encryption method, the method comprising: generating a random number, and obtaining the IMSI number and PIN code of the communication device; generating an encryption key for encrypting the electronic seal on the communication device based on the IMSI number, PIN code and random number; encrypting the electronic seal using the encryption key to obtain an encrypted electronic seal.

[0164] Or an electronic seal decryption method, the method comprising: obtaining the IMSI number, PIN code and random number of the communication device; generating a decryption key for decrypting the encrypted electronic seal according to the IMSI number, PIN code and random number; wherein the generation method of the encryption key and the decryption key is the same; and using the decryption key to decrypt the electronic seal to obtain the decrypted electronic seal.

[0165] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0166] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An electronic seal encryption and decryption method, characterized in that: Applied to communication equipment, including: Generate a random number and obtain the IMSI number and PIN code of the communication device; Generate an encryption key for encrypting the electronic seal on the communication device according to the IMSI number, PIN code and random number; Encrypt the electronic seal using the encryption key to obtain the encrypted electronic seal; The method of generating an encryption key for encrypting the electronic seal on the communication device according to the IMSI number, the PIN code and the random number comprises: Merging the IMSI number and the PIN code; Encrypting a fusion result of the IMSI number and the PIN code based on a first encryption algorithm; Merging the encryption result based on the first encryption algorithm and the random number; Encrypting the encryption result and the fusion result of the random number based on a second encryption algorithm; Using the encryption result based on the second encryption algorithm as the encryption key; The generating of a random number and obtaining the IMSI number and PIN code of the communication device further includes: Sending the encryption result based on the first encryption algorithm and the random number to a server, so that the server can store the encryption result based on the first encryption algorithm and the random number in a key-value pair; wherein the encryption result based on the first encryption algorithm in the key-value pair is the key, and the random number is the value; The method further comprises: Obtaining the IMSI number, PIN code and random number of the communication device; Generate a decryption key for decrypting the encrypted electronic seal according to the IMSI number, the PIN code and the random number; wherein the encryption key and the decryption key are generated in the same manner; Decrypting the encrypted electronic seal using the decryption key to obtain the decrypted electronic seal; Obtaining the random number includes: Sending the encryption result based on the first encryption algorithm to the server; Receive the random number retrieved by the server according to the encryption result based on the first encryption algorithm.

2. The electronic seal encryption and decryption method according to claim 1, characterized in that: The method further comprises: decrypting the encrypted electronic seal using the decryption key to obtain the decrypted electronic seal; and then: receiving a hash value of the document sent by the server, and signing the hash value using the decrypted electronic seal; Sending the signature to the server so that the server can sign the document; Receive the document after signature processing returned by the server.

3. An electronic seal encryption and decryption device, characterized in that: Applied to communication equipment, including: A first acquisition module, used to generate a random number and obtain the IMSI number and PIN code of the communication device; A first generating module, for generating an encryption key for encrypting the electronic seal on the communication device according to the IMSI number, the PIN code and the random number; An encryption module, used to encrypt the electronic seal using the encryption key to obtain the encrypted electronic seal; The first generating module is also used for: Merging the IMSI number and the PIN code; Encrypting a fusion result of the IMSI number and the PIN code based on a first encryption algorithm; Merging the encryption result based on the first encryption algorithm and the random number; Encrypting the encryption result and the fusion result of the random number based on a second encryption algorithm; Using the encryption result based on the second encryption algorithm as the encryption key; The device further comprises a sending module, wherein the sending module generates a random number and obtains the IMSI number and PIN code of the communication device, and then is used to: Sending the encryption result based on the first encryption algorithm and the random number to a server, so that the server can store the encryption result based on the first encryption algorithm and the random number in a key-value pair; wherein the encryption result based on the first encryption algorithm in the key-value pair is the key, and the random number is the value; The device also includes: A second acquisition module is used to obtain the IMSI number, PIN code and random number of the communication device; A second generating module, used for generating a decryption key for decrypting the encrypted electronic seal according to the IMSI number, the PIN code and the random number; wherein the generation method of the encryption key and the decryption key is the same; A decryption module, used to decrypt the encrypted electronic seal using the decryption key to obtain the decrypted electronic seal; The second acquisition module is also used for: Sending the encryption result based on the first encryption algorithm to the server; Receive the random number retrieved by the server according to the encryption result based on the first encryption algorithm.

4. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the electronic seal encryption method as described in any one of claims 1-2 are implemented.

5. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the electronic seal encryption method as described in any one of claims 1-2 are implemented.

Citation Information

Patent Citations

  • PKI private key protection method of dynamically generated key based on parameters

    CN103888938A

  • Protection method, device and equipment for electronic seal and medium

    CN109697603A