Information encryption transmission method, device and equipment and storage medium
By generating and using a multi-key system to encrypt and decrypt information, the problem of information transmission security under quantum computing attacks is solved, and the timeliness and security control of information transmission are realized.
Patent Information
- Application Number
- CN202410275100.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-11
- Publication Date
- 2025-12-19
- Estimated Expiration
- 2044-03-11
AI Technical Summary
Existing methods for encrypting and transmitting information are easily cracked when faced with quantum computing attacks, and lack timeliness, which affects the security of information transmission.
The method involves obtaining an encrypted random number, a first key, and original time information. The original time information is then encrypted using a second key. An encrypted message is generated by combining the information's validity period and the encrypted random number. The receiving end decrypts the original time information based on the valid identifier information and the encrypted random number. Finally, a third key is used to encrypt the information to be written, thereby achieving timeliness control of the information.
It improves the security of information transmission, prevents quantum computing attacks, ensures the secure transmission of information within the effective time frame, and avoids the security risks when information is reused.
Smart Images

Figure CN118199945B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the technical field of data security, and particularly relates to an information encryption transmission method and device, equipment and a storage medium. BACKGROUND
[0002] When writing ciphertext information into a blank card, an identification information such as a card number needs to be sent by a card punching device to a backend component, so as to obtain corresponding ciphertext information. In order to prevent tampering during information transmission, an instant card punching security encryption strategy is usually adopted, and a symmetric encryption algorithm is used to encrypt the ciphertext information. However, this encryption strategy cannot prevent quantum computing attacks, is easy to be cracked, and does not have timeliness, and after the information is intercepted, the security of other information transmission will be affected. SUMMARY
[0003] In view of the above problems, the present disclosure provides an information encryption transmission method, device, equipment and storage medium.
[0004] According to a first aspect of the present disclosure, an information encryption transmission method is provided, applied to a sending end, comprising: obtaining an encryption random number, a first key, original time information and identification information, wherein the identification information comprises valid identification information; obtaining a second key according to the valid identification information and the first key; encrypting the original time information by using the second key to obtain key information; performing encryption processing on the key information, information validity duration and the encryption random number to obtain an encrypted message; and sending the encrypted message and the identification information.
[0005] According to an embodiment of the present disclosure, obtaining the original time information comprises: obtaining encryption time information and a third key index value; obtaining the original time information according to the encryption time information and the third key index value, wherein the third key index value is used to obtain a third key from a key service end, and the third key is used to decrypt received encrypted information related to the encrypted message.
[0006] According to an embodiment of the present disclosure, obtaining the first key comprises: obtaining the first key from the key service end.
[0007] According to an embodiment of the present disclosure, obtaining the second key according to the valid identification information and the first key comprises: obtaining data information according to the encryption random number and the valid identification information; and performing a hash operation on the data information and the first key to obtain the second key.
[0008] According to an embodiment of the present disclosure, obtaining the data information according to the encrypted random number and the valid identification information comprises: obtaining identification segment data according to the valid identification information, wherein the identification segment data comprises first component data and second component data, the first component data comprises the valid identification information, and the second component data is obtained by performing negation and reverse processing on the first component data; and obtaining the data information according to the encrypted random number and the identification segment data.
[0009] According to another aspect of the present disclosure, an information encryption transmission method applied to a receiving end is provided, comprising: obtaining a first key in response to receiving an encrypted message and identification information, wherein the encrypted message comprises key information, information valid duration and an encrypted random number, and the identification information comprises valid identification information; obtaining a second key according to the first key, the valid identification information and the encrypted random number; decrypting the key information by using the second key to obtain original time information, wherein the original time information comprises encrypted time information and a third key index value; generating to-be-written information for the identification information according to the identification information in a case that a difference between the encrypted time information and current time information is less than the information valid duration; and encrypting the to-be-written information by using a third key to obtain encrypted information.
[0010] According to an embodiment of the present disclosure, the method further comprises, before the to-be-written information is encrypted by using the third key and sent to a data sending end: obtaining the third key from a key database according to the third key index value.
[0011] According to an embodiment of the present disclosure, the method further comprises, in a case that the difference is greater than or equal to the information valid duration, generating and sending error information.
[0012] According to an embodiment of the present disclosure, the method further comprises, after the encrypted information is obtained, sending the encrypted information to the sending end, wherein the encrypted information is used by the sending end to decrypt the to-be-written information by using the third key.
[0013] According to another aspect of the present disclosure, an information encryption transmission device applied to a sending end is provided, comprising: an information obtaining module, configured to obtain an encrypted random number, a first key, original time information and identification information, wherein the identification information comprises valid identification information; a first key generating module, configured to obtain a second key according to the valid identification information and the first key; a first encryption module, configured to encrypt the original time information by using the second key to obtain key information; a second encryption module, configured to perform encryption processing on the key information, information valid duration and the encrypted random number to obtain an encrypted message; and a sending module, configured to send the encrypted message and the identification information.
[0014] According to another aspect of the present disclosure, an information encryption transmission apparatus applied to a receiving end is provided, comprising: a receiving module configured to obtain a first key in response to receiving an encrypted message and identification information, wherein the encrypted message comprises key information, information validity duration and an encrypted random number, and the identification information comprises valid identification information; a second key generation module configured to obtain a second key according to the first key, the valid identification information and the encrypted random number; a decryption module configured to decrypt the key information by using the second key to obtain original time information, wherein the original time information comprises an encrypted time information and a third key index value; an encryption time limit module configured to generate to-be-written information for the identification information according to the identification information in a case that a difference between the encrypted time information and current time information is less than the information validity duration; and an information processing module configured to encrypt the to-be-written information by using the third key to obtain encrypted information.
[0015] According to another aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; a memory storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors perform the above method.
[0016] According to another aspect of the present disclosure, a computer readable storage medium is also provided, which stores executable instructions, and the instructions are executed by a processor to make the processor perform the above method.
[0017] According to another aspect of the present disclosure, a computer program product is also provided, which comprises a computer program, and the computer program is executed by a processor to implement the above method. BRIEF DESCRIPTION OF DRAWINGS
[0018] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure taken in conjunction with the accompanying drawings, in which:
[0019] Figure 1 An application scenario diagram of an information encryption transmission method, apparatus, device, medium and program product according to embodiments of the present disclosure is schematically shown;
[0020] Figure 2 A flowchart of an information encryption transmission method according to embodiments of the present disclosure is schematically shown;
[0021] Figure 3 A flowchart of obtaining key information in an information encryption transmission method according to embodiments of the present disclosure is schematically shown;
[0022] Figure 4 A flowchart of an information encryption transmission method according to another embodiment of the present disclosure is schematically shown;
[0023] Figure 5 FIG. 5 schematically illustrates a flowchart of a method of decrypting key information in a method of encrypted transmission of information according to an embodiment of the present disclosure;
[0024] Figure 6 FIG. 6 schematically illustrates a flowchart of a method of encrypted transmission of information according to another embodiment of the present disclosure;
[0025] Figure 7 FIG. 7 schematically illustrates a block diagram of a structure of an apparatus for encrypted transmission of information according to an embodiment of the present disclosure;
[0026] Figure 8 FIG. 8 schematically illustrates a block diagram of a structure of an apparatus for encrypted transmission of information according to another embodiment of the present disclosure; and
[0027] Figure 9 FIG. 9 schematically illustrates a block diagram of an electronic device suitable for implementing a method of encrypted transmission of information according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood, however, that the description which follows is merely illustrative and is not intended to limit the scope of the present disclosure. In the following detailed description of embodiments of the present disclosure, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. However, it will be apparent to one skilled in the art that one or more embodiments of the present disclosure can be practiced without these specific details. In other instances, well-known structures and functions have not been described in detail in order to avoid obscuring aspects of the present disclosure.
[0029] The terms used herein are merely used to describe specific embodiments and are not intended to limit the present disclosure. The terms "include" and "have" and the like used herein indicate the presence of the described features, steps, operations, and / or components but do not preclude the presence or addition of one or more other features, steps, operations, or components.
[0030] All terms used herein, including technical and scientific terms, have the same meanings as those generally understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of the present description, and should not be interpreted in an idealized or overly formal way.
[0031] In the case of using expressions similar to "at least one of A, B, and C, etc.", it is generally to be interpreted as including one or more of the same unless otherwise specified. For example, "a system having at least one of A, B, and C" should be interpreted as including a system having A alone, a system having B alone, a system having C alone, a system having A and B together, a system having A and C together, a system having B and C together, and / or a system having A, B, and C together, etc.
[0032] In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of data (such as including but not limited to user personal information) comply with relevant laws and regulations, necessary security measures are taken, and the public order and good customs are not violated.
[0033] Embodiments of the present disclosure provide an information encryption transmission method and device, equipment and a storage medium. An encrypted random number, a first key, original time information and identification information are obtained, wherein the identification information includes valid identification information. A second key is obtained according to the valid identification information and the first key. The original time information is encrypted by using the second key to obtain key information. Encryption processing is performed on the key information, information validity duration and the encrypted random number to obtain an encrypted message. The encrypted message and the identification information are sent.
[0034] Figure 1 An application scenario diagram of the information encryption transmission method, device, equipment, medium and program product according to embodiments of the present disclosure is schematically shown.
[0035] As shown in Figure 1 According to the application scenario 100 of the embodiment, the first terminal device 101, the second terminal device 102, the third terminal device 103, the network 104 and the server 105 can be included. The network 104 is a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 can include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0036] The user can use at least one of the first terminal device 101, the second terminal device 102 and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102 and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).
[0037] The first terminal device 101, the second terminal device 102 and the third terminal device 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers and desktop computers, etc.
[0038] The server 105 can be a server providing various services, for example, a background management server (for example only) providing support for a website browsed by a user using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server can perform analysis and the like on received user requests and the like, and feed back the processing results (for example, a webpage, information, or data, or the like, obtained or generated according to a user request) to the terminal device.
[0039] It should be noted that the information encryption transmission method provided by the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the information encryption transmission apparatus provided by the embodiments of the present disclosure can generally be arranged in the server 105. The information encryption transmission method provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Accordingly, the information encryption transmission apparatus provided by the embodiments of the present disclosure can also be arranged in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.
[0040] It should be understood that Figure 1 The number of terminal devices, networks, and servers in the above-mentioned scenario is only illustrative. According to the needs of implementation, there can be any number of terminal devices, networks, and servers.
[0041] The information encryption transmission method of the disclosed embodiments will be described in detail below based on the scenario described above. Figure 1 Figures 2-6 The information encryption transmission method of the disclosed embodiments will be described in detail below based on the scenario described above.
[0042] Figure 2 A flowchart of the information encryption transmission method according to the embodiments of the present disclosure is schematically shown.
[0043] Figure 3 A flowchart of obtaining key information in the information encryption transmission method according to the embodiments of the present disclosure is schematically shown.
[0044] As shown in Figure 2 The information encryption transmission method of this embodiment is applied to a sending end, and includes operation S210 to operation S250.
[0045] In operation S210, an encrypted random number, a first key, original time information, and identification information are obtained, wherein the identification information includes valid identification information.
[0046] The encryption random number includes a randomly generated random number sequence for an encryption process, which can be obtained by a random function, encryption hardware device, physical random number generation, etc. Each digit in the sequence is not related, and the generated random number sequence cannot be predicted according to historical data. The first key can be a master key obtained from a key database, selected by a user or assigned by a system, and is used for encryption and decryption processes. The original time information includes encryption time information, representing the current time information at the encryption time, which can be in the format of year, month, day, hour, minute and second, and a digital sequence representing the current time information is obtained. The identification information can be a card number, a user id, a serial number, etc., including a fixed identification code, valid identification information and a check code, etc. When transmitting information, the valid identification information in the identification information is usually sent.
[0047] In some embodiments of the present disclosure, the first key can be obtained from a key server. The encryption random number and the first key can be 16 bytes of data. The encryption time information in the original time information can be 14 bytes of data. For example, the encryption time is January 2, 2023, 11:23:56, and the encryption time information is 20230102112356. The identification information can be a 16-bit or 19-bit digital sequence, including a 6-bit issuing unit identification code, a 9-bit or 12-bit valid identification information, and a 1-bit check code. For example, the identification information is 6666661234567890, and the valid identification information is 123456789.
[0048] In operation S220, a second key is obtained according to the valid identification information and the first key.
[0049] As shown in Figure 3 According to an embodiment of the present disclosure, the second key is obtained according to the valid identification information and the first key, including the following steps.
[0050] The valid identification information includes an N-bit digital sequence of less than 8 bytes, and an 8-byte first component data is obtained by filling the digits. The first component data is inverted and reversed to obtain an 8-byte second component data. The first component data and the second component data are spliced to obtain an 16-byte identification segment data. The 16-byte identification segment data and the 16-byte encryption random number are spliced to obtain 32-byte data information. Based on a hash function, a Hash-based message authentication code (HMAC) operation is performed on the first key and the data information, and the operation result is processed to obtain the second key.
[0051] For example, the valid identification information is a 9-digit number 123456789, and according to the padding mechanism set by the system, the padded 8-byte first component data DATAL is 1234567890808080. After the first component data is inverted and reversed, the obtained 8-byte second component data DATAR is 7F7F7F6F87A9CBED. The first component data DATAL and the second component data DATAR are spliced to obtain the identification segment data DATA, which is represented as DATA=DATAL+DATAR. The identification segment data DATA and the encrypted random number RANDOM_NUM are spliced to obtain the data information MESSAGE. The first key MAIN_KEY and the data information MESSAGE are subjected to HMAC-SM3 operation, and the obtained operation result is a 32-byte hash value. The first 16 bytes and the last 16 bytes of the hash value are subjected to XOR operation to obtain the second key SESSION_KEY.
[0052] In operation S230, the original time information is encrypted by using the second key to obtain the key information.
[0053] In some embodiments of the present disclosure, as shown in Figure 3 The original time information including the encrypted time information is encrypted by using the second key SESSION_KEY obtained in operation S220, and the encrypted information is subjected to base64 encoding to obtain the base64 format key information ENCRYPT_MESSAGE.
[0054] In operation S240, the key information, the information valid duration and the encrypted random number are subjected to encryption processing to obtain the encrypted message. The information valid duration is used to ensure the timeliness of the encrypted message, and can be represented by a three-digit valid time in seconds.
[0055] In some embodiments of the present disclosure, the key information ENCRYPT_MESSAGE, the information valid duration and the encrypted random number obtained in operation S210 are spliced together, and subjected to base64 encoding to obtain the encrypted message.
[0056] In operation S250, the encrypted message and the identification information are sent.
[0057] The encrypted message includes key information, where the encrypted information is the original time information, and the encryption key is a second key obtained based on an encrypted random number and a first key. This disclosure hashes the first key using a random number and the bank card number as hash factors. Even if a brute-force attack using quantum computing is performed on the encrypted message, only the encryption process key can be obtained, not the first encryption key, thus not compromising the security of other transactions. Furthermore, because a time-sensitive check is applied to the encrypted message, even if it is reused, an error will occur because the message has exceeded its validity period, increasing transaction security.
[0058] like Figure 3 As shown, in some embodiments of this disclosure, the original time information also includes a 2-byte third key index value. The information encryption transmission method of this disclosure requires the sending end to send identification information to the receiving end. The receiving end obtains the information to be written corresponding to the identification information based on the identification information and sends it back to the sending end. To ensure information transmission security, the information to be written needs to be encrypted. In embodiments of this disclosure, the 14-byte encrypted time information and the index value (2 bytes) of the third key used to encrypt the information to be written are concatenated to obtain the original time information. The original time information is then encrypted and sent to the receiving end. The receiving end obtains the third key from the key database based on the third key index value and uses the third key to encrypt the information to be written.
[0059] In some embodiments of this disclosure, the sending end receives the encrypted information to be written, obtains the third key from the key database according to the third key index value, and uses the third key to decrypt and obtain the information to be written.
[0060] Figure 4 A flowchart illustrating an information encryption transmission method according to another embodiment of the present disclosure is shown.
[0061] Figure 5 The flowchart illustrating the decryption of key information in the information encryption transmission method according to an embodiment of the present disclosure is shown schematically.
[0062] like Figure 4 As shown, the information encryption transmission method of this embodiment is applied to the receiving end, including operations S410 to S450.
[0063] In operation S410, in response to receiving an encrypted message and identification information, a first key is obtained, wherein the encrypted message includes key information, message validity period and encrypted random number, and the identification information includes valid identification information.
[0064] In some embodiments of this disclosure, the encrypted message is base64 decoded to obtain key information, message validity period, and encryption random number. The first key is a master key pre-agreed upon by the sender and receiver and is obtained from a key database.
[0065] In operation S420, the second key is obtained based on the first key, valid identification information, and encrypted random number. The process of obtaining the second key SESSION_KEY based on the first key MAIN_KEY, valid identification information, and encrypted random number RANDOM_NUM is the same as in operation S220.
[0066] In operation S430, the key information is decrypted using the second key to obtain the original time information, which includes the encrypted time information and the index value of the third key.
[0067] The third key index value is used to retrieve the third key from the key database. In some embodiments, the third key index value can be determined by user selection, system allocation, or random sampling.
[0068] In operation S440, if the difference between the encrypted time information and the current time information is less than the information validity period, information to be written is generated based on the identification information.
[0069] like Figure 5 As shown, in some embodiments of this disclosure, the encrypted time is obtained from the original time information. The current time information is obtained, and based on the validity period of the information decrypted from the encrypted message, it is determined whether the encrypted message is within its validity period.
[0070] For example, a message validity period of 120 seconds means the encrypted message is valid for 120 seconds after encryption. The encryption time is obtained from the original time information as 11:23:56 on January 2, 2023. The current time is obtained as 11:25:06 on January 2, 2023, resulting in a time difference of 70 seconds. Comparing this to the message validity period, if the time difference is less than the validity period, the encrypted message is within its validity period.
[0071] In some embodiments of this disclosure, if the time difference is greater than or equal to the information validity period, it indicates that the encrypted message has expired, the receiving end stops decrypting the information and other operations, and sends an error message to the sending end.
[0072] When the encrypted message is within its validity period, information to be written is generated based on the identification information and the database of the receiving end. The information to be written may include plaintext of the first magnetic information, plaintext of the second magnetic information, plaintext of CVN2 information, plaintext of IC information, etc.
[0073] When operating S450, the encrypted information is obtained by encrypting the information to be written according to the third key.
[0074] The third key obtained according to the third key index value is used to encrypt the to-be-written information to obtain encrypted information, and in some embodiments, the obtained encrypted information is sent back to the sending end for card writing.
[0075] Figure 6 A flowchart of an information encryption transmission method according to another embodiment of the present disclosure is schematically shown.
[0076] In step S601, the key database 00 sends the first key and the third key index value to the sending end 10.
[0077] In step S602, the sending end obtains the encrypted message according to the encrypted random number, the first key, the original time information and the identification information.
[0078] In step S603, the sending end 10 sends the encrypted message and the identification information to the receiving end 20.
[0079] In step S604, the receiving end 20 receives the encrypted message and the identification information.
[0080] In step S605, the key database 00 sends the first key to the receiving end 20.
[0081] In step S606, the receiving end decrypts according to the first key, the encrypted message and the identification information to obtain the original time information and the information validity duration, wherein the original time information includes the encrypted time information and the third key index value.
[0082] In step S607, the receiving end generates the to-be-written information according to the identification information in the case that the difference between the encrypted time information and the current time information is less than the information validity duration.
[0083] In step S608, the key database sends the third key to the receiving end according to the third key index value.
[0084] In step S609, the receiving end encrypts the to-be-written information according to the third key to obtain the encrypted information.
[0085] In step S610, the receiving end sends the encrypted information to the sending end.
[0086] In step S611, the key database sends the third key to the sending end according to the third key index value.
[0087] In step S612, the sending end decrypts the encrypted information to obtain the to-be-written information.
[0088] Based on the above information encryption transmission method, the present disclosure further provides an information encryption transmission device. The following will be combined with the Figures 7-8 The device will be described in detail.
[0089] Figure 7 Fig. 7 shows a structural block diagram of an information encryption transmission apparatus according to another embodiment of the present disclosure.
[0090] As shown in Fig. 7, the information encryption transmission apparatus 700 of this embodiment comprises an information acquisition module 710, a first key generation module 720, a first encryption module 730, a second encryption module 740 and a sending module 750. Figure 7
[0091] The information acquisition module 710 is configured to acquire an encryption random number, a first key, original time information and identification information, wherein the identification information comprises valid identification information. In an embodiment, the information acquisition module 710 can be configured to perform the operation S210 described above, and details are not repeated here.
[0092] The first key generation module 720 is configured to obtain a second key according to the valid identification information and the first key. In an embodiment, the first key generation module 720 can be configured to perform the operation S220 described above, and details are not repeated here.
[0093] The first encryption module 730 is configured to encrypt the original time information by using the second key to obtain key information. In an embodiment, the first encryption module 730 can be configured to perform the operation S230 described above, and details are not repeated here.
[0094] The second encryption module 740 is configured to perform encryption processing on the key information, the information valid duration and the encryption random number to obtain an encrypted message. In an embodiment, the second encryption module 740 can be configured to perform the operation S240 described above, and details are not repeated here.
[0095] The sending module 750 is configured to send the encrypted message and the identification information. In an embodiment, the sending module 750 can be configured to perform the operation S250 described above, and details are not repeated here.
[0096] According to an embodiment of the present disclosure, any of the information obtaining module 710, the first key generating module 720, the first encrypting module 730, the second encrypting module 740 and the sending module 750 can be combined in one module, or any of them can be split into multiple modules. Alternatively, at least part of the function of one or more of these modules can be combined with at least part of the function of other modules, and implemented in one module. According to an embodiment of the present disclosure, at least one of the information obtaining module 710, the first key generating module 720, the first encrypting module 730, the second encrypting module 740 and the sending module 750 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable way of hardware or firmware that can be integrated or packaged with a circuit, or implemented in any one of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the information obtaining module 710, the first key generating module 720, the first encrypting module 730, the second encrypting module 740 and the sending module 750 can be at least partially implemented as a computer program module that can perform the corresponding function when it is run.
[0097] Figure 8 A structural block diagram of an information encryption transmission apparatus according to another embodiment of the present disclosure is schematically shown.
[0098] As shown in Figure 8 , the information encryption transmission apparatus 800 of this embodiment includes a receiving module 810, a second key generating module 820, a decrypting module 830, an encryption time limit module 840 and an information processing module 850.
[0099] The receiving module 810 is configured to obtain a first key in response to receiving an encrypted message and identification information, wherein the encrypted message includes key information, information valid duration and an encrypted random number, and the identification information includes valid identification information. In an embodiment, the receiving module 810 can be configured to perform the operation S410 described above, and details are not repeated here.
[0100] The second key generating module 820 is configured to obtain a second key according to the first key, the valid identification information and the encrypted random number. In an embodiment, the second key generating module 820 can be configured to perform the operation S420 described above, and details are not repeated here.
[0101] The decryption module 830 is configured to decrypt the key information by using the second key to obtain original time information, where the original time information includes encrypted time information and a third key index value. In an embodiment, the decryption module 830 can be configured to perform the operation S430 described above, and details are not repeated here.
[0102] The encryption time module 840 is configured to generate to-be-written information for the identification information according to the identification information in a case where a difference between the encrypted time information and current time information is less than the information validity duration. In an embodiment, the encryption time module 840 can be configured to perform the operation S440 described above, and details are not repeated here.
[0103] The information processing module 850 is configured to encrypt the to-be-written information according to the third key to obtain encrypted information. In an embodiment, the information processing module 850 can be configured to perform the operation S450 described above, and details are not repeated here.
[0104] According to embodiments of the present disclosure, any of the receiving module 810, the second key generation module 820, the decryption module 830, the encryption time module 840 and the information processing module 850 can be combined in one module, or any of the modules can be split into multiple modules. Alternatively, at least part of the function of one or more of the modules can be combined with at least part of the function of the other modules, and implemented in one module. According to embodiments of the present disclosure, at least one of the receiving module 810, the second key generation module 820, the decryption module 830, the encryption time module 840 and the information processing module 850 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or any other reasonable manner of hardware or firmware that can be integrated or packaged with a circuit, or implemented in any one of software, hardware and firmware or in a proper combination of any of them. Alternatively, at least one of the receiving module 810, the second key generation module 820, the decryption module 830, the encryption time module 840 and the information processing module 850 can be at least partially implemented as a computer program module that can perform corresponding functions when the computer program module is run.
[0105] Figure 9 A block diagram of an electronic device suitable for implementing the information encryption transmission method according to embodiments of the present disclosure is schematically shown.
[0106] As Figure 9As shown, the electronic device 900 according to embodiments of the present disclosure includes a processor 901, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 902 or loaded into a random access memory (RAM) 903 from a storage section 908. The processor 901 can include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (e.g., an application specific integrated circuit (ASIC)), and so on. The processor 901 can also include an on-board memory for cache use. The processor 901 can include a single processing unit or multiple processing units for performing the various actions of the method processes according to embodiments of the present disclosure.
[0107] In the RAM 903, various programs and data required for the operation of the electronic device 900 are stored. The processor 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. The processor 901 performs various operations of the method processes according to embodiments of the present disclosure by executing the programs in the ROM 902 and / or the RAM 903. Note that the programs can also be stored in one or more memories other than the ROM 902 and the RAM 903. The processor 901 can also perform various operations of the method processes according to embodiments of the present disclosure by executing the programs stored in the one or more memories.
[0108] According to embodiments of the present disclosure, the electronic device 900 can also include an input / output (I / O) interface 905, which is also connected to the bus 904. The electronic device 900 can further include one or more of the following components connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a display such as a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as necessary. A removable recording medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. is attached to the drive 910 as necessary, so that a computer program read therefrom is installed into the storage section 908 as necessary.
[0109] The present disclosure also provides a computer-readable storage medium, which can be included in the device / apparatus / system described in the above embodiments; or can exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, which when executed, implement the method according to embodiments of the present disclosure.
[0110] According to an embodiment of the present disclosure, the computer readable storage medium can be a nonvolatile computer readable storage medium, for example, can include, but is not limited to, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present disclosure, the computer readable storage medium can include one or more memories such as the ROM 902 and / or the RAM 903 described above and / or one or more memory other than the ROM 902 and the RAM 903.
[0111] Embodiments of the present disclosure also include a computer program product that includes a computer program containing program codes for executing the methods shown in the flowcharts. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the methods provided by the embodiments of the present disclosure.
[0112] The above-described functions defined in the system / device / module / unit of the embodiments of the present disclosure are performed when the computer program is executed by the processor 901. According to an embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by computer program modules.
[0113] In one embodiment, the computer program can rely on a tangible storage medium such as an optical storage device, a magnetic storage device, etc. In another embodiment, the computer program can also be transmitted, distributed, and downloaded in the form of a signal on a network medium, and be downloaded and installed through the communication part 909 and / or installed from the detachable medium 911. The program codes contained in the computer program can be transmitted by any appropriate network medium, including but not limited to wireless, wired, etc., or any appropriate combination thereof.
[0114] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 909 and / or installed from the detachable medium 911. When the computer program is executed by the processor 901, the above-described functions defined in the system of the embodiments of the present disclosure are performed. According to an embodiment of the present disclosure, the system, device, apparatus, module, unit, etc. described above can be implemented by computer program modules.
[0115] According to embodiments of the present disclosure, program code of the computer program for performing the methods provided by the embodiments of the present disclosure can be written in any combination of one or more programming languages, and specifically, can be implemented using high-level procedural and / or object-oriented programming language, and / or assembly / machine language. Programming languages include, but are not limited to, Java, C++, python, “C” language, or similar programming languages. The program code can execute entirely on the user's computing device, partly on the user's device, and partly on a remote computing device, or entirely on the remote computing device or server. In the latter scenario, the remote computing device can be connected to the user's computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computing device, such as through the Internet using an Internet Service Provider.
[0116] The computer program product of the present disclosure can be a computer program product, which is a machine-readable medium (or computer readable medium) having stored therein a sequence of instructions readable, by one or more processors of a computer system, the instructions being executable by the one or more processors to cause the computer system to execute the method of the present disclosure. The instructions can be software instructions stored in memory (e.g., memory 120 of the computer system) and implemented as software programs to perform the method of the present disclosure. The computer program product can be propagated to and executed by one or more computer systems and / or apparatuses by way of one or more computer readable media.
[0117] As will be understood by those skilled in the art, features of various embodiments and / or claims of the present disclosure can be combined or / and integrated, even if such combinations or integrations are not expressly disclosed in the present disclosure. In particular, features of various embodiments and / or claims of the present disclosure can be combined or / and integrated in any number of ways, without departing from the spirit and teachings of the present disclosure. All such combinations and / or integrations are within the scope of the present disclosure.
[0118] The above describes embodiments of the present disclosure. However, these embodiments are merely for illustrative purposes, and are not intended to limit the scope of the present disclosure. Although each embodiment is described above separately, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present disclosure is defined by the appended claims and their equivalents. Those skilled in the art can make various substitutions and modifications without departing from the scope of the present disclosure, and these substitutions and modifications should all fall within the scope of the present disclosure.
Claims
1. A method for encrypting and transmitting information, applied at a sending end, the method comprising: Obtain encrypted random number, first key, original time information and identification information, wherein the original time information includes encrypted time information and third key index value, the identification information includes valid identification information, and the valid identification information includes an N-bit number sequence of less than 8 bytes; The second key is obtained based on the valid identification information and the first key; The original time information is encrypted using the second key to obtain key information; Encryption processing is performed on the key information, the information validity period, and the encrypted random number to obtain an encrypted message; and Send the encrypted message and the identification information.
2. The method according to claim 1, wherein, The acquisition of the original time information includes: Obtain the encryption time information and the third key index value; The original time information is obtained based on the encrypted time information and the third key index value, wherein the third key index value is used to obtain the third key from the key server, and the third key is used to decrypt the encrypted information related to the received encrypted message.
3. The method according to claim 1 or 2, wherein, The process of obtaining the first key includes: Obtain the first key from the key server.
4. The method according to claim 1, wherein, The step of obtaining the second key based on the valid identification information and the first key includes: Data information is obtained based on the encrypted random number and the valid identification information; and The second key is obtained by performing a hash operation on the data information and the first key.
5. The method according to claim 4, wherein, The data information obtained based on the encrypted random number and the valid identification information includes: Identifier segment data is obtained based on the valid identification information, wherein the identifier segment data includes a first component data and a second component data, the first component data includes the valid identification information, and the second component data is obtained by inverting and reversing the first component data; The data information is obtained based on the encrypted random number and the identifier segment data.
6. A method for encrypted information transmission, applied at a receiving end, the method comprising: In response to receiving an encrypted message and identification information, a first key is obtained, wherein the encrypted message includes key information, message validity period and encrypted random number, and the identification information includes valid identification information, which includes an N-bit number sequence of less than 8 bytes; The second key is obtained based on the first key, the valid identification information, and the encrypted random number; The key information is decrypted using the second key to obtain the original time information, wherein the original time information includes encrypted time information and a third key index value; If the difference between the encrypted time information and the current time information is less than the effective duration of the information, then information to be written for the identifier information is generated based on the identifier information. The encrypted information is obtained by encrypting the information to be written using the third key.
7. The method of claim 6, further comprising, before encrypting the information to be written according to the third key and sending it to the data sender: The third key is obtained from the key database based on the third key index value.
8. The method according to claim 6, further comprising: If the difference is greater than or equal to the validity period of the information, an error message is generated and sent.
9. The method of claim 6, further comprising, after obtaining the encrypted information: The encrypted information is sent to the data sending end, wherein, The encrypted information is used by the data sending end to decrypt the information to be written using the third key.
10. An information encryption transmission device, applied at the sending end, comprising: The information acquisition module is used to acquire encrypted random numbers, a first key, original time information, and identification information. The original time information includes encrypted time information and a third key index value. The identification information includes valid identification information, which includes an N-bit number sequence of less than 8 bytes. A first key generation module is configured to obtain a second key based on the valid identification information and the first key; and The first encryption module is used to encrypt the original time information using the second key to obtain key information; The second encryption module is used to perform encryption processing on the key information, the information validity period, and the encryption random number to obtain an encrypted message; and The sending module is used to send the encrypted message and the identification information.
11. An information encryption transmission device, applied at the sending end, comprising: A receiving module is configured to obtain a first key in response to receiving an encrypted message and identification information, wherein the encrypted message includes key information, message validity period and encrypted random number, and the identification information includes valid identification information, which includes an N-bit number sequence of less than 8 bytes; The second key generation module is used to obtain a second key based on the first key, the valid identification information, and the encrypted random number; The decryption module is used to decrypt the key information using the second key to obtain the original time information, wherein the original time information includes encrypted time information and a third key index value; The encryption validity module is used to generate information to be written for the identifier information based on the identifier information when the difference between the encrypted time information and the current time information is less than the information validity period. The information processing module is used to encrypt the information to be written according to the third key to obtain encrypted information.
12. An electronic device, comprising: One or more processors; Storage device for storing one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors perform the method according to any one of claims 1 to 9.
13. A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to perform the method according to any one of claims 1 to 9.
14. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Message processing method and device
CN107566335A
Encryption method and device, equipment and medium
CN109617680A