Encrypted message transmission method, device, equipment and medium
Patent Information
- Application Number
- CN202310968063.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-02
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2043-08-02
AI Technical Summary
[0005]本申请提供一种加密报文传输方法、装置、设备及介质,用以解决现有的报文传输方法使用固定的密钥对报文加密,导致报文的安全性较低的问题
[0040]The encrypted message transmission method, apparatus, device, and medium provided in this application involve the sending device selecting a target PUF stimulus-response pair from a target set of PUF stimulus-response pairs, generating a target key using the target PUF stimulus-response pair, and encrypting the message to be sent to obtain an encrypted message. The target key, the encrypted message, and the sending device's device identifier are then sent to the receiving device. The receiving device verifies the encrypted message based on the device identifier. Upon successful verification, a verification key is generated using the target key. The verification key is then used to perform a secondary verification of the encrypted message. Upon successful verification, the verification key is used to decrypt the encrypted message to obtain the target message. This scheme effectively improves message security by using a target PUF stimulus-response pair to encrypt the message to be sent, ensuring that a different PUF stimulus-response pair is used for each encryption.
Smart Images

Figure CN116866062B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information security, and in particular to a method, apparatus, device and medium for transmitting encrypted messages. Background Technology
[0002] With the development of technology, all kinds of devices can communicate with each other and transmit messages to complete business processing.
[0003] In the prior art, when devices transmit messages, the sending device uses a fixed key to encrypt the message for security reasons. After receiving the encrypted message, the receiving device decrypts it using the same key to obtain the message.
[0004] In summary, existing message transmission methods use fixed keys to encrypt messages, resulting in low message security. Summary of the Invention
[0005] This application provides a method, apparatus, device, and medium for encrypted message transmission, which solves the problem that existing message transmission methods use fixed keys to encrypt messages, resulting in low message security.
[0006] In a first aspect, this application provides a method for transmitting encrypted messages, applied to a sending device, the method comprising:
[0007] Select a target PUF stimulus response pair from a pre-stored target set of physically unclonable functional (PUF) stimulus response pairs; the PUF stimulus response pairs in the target set are generated using a PUF chip.
[0008] Generate a target key based on the target PUF stimulus response pair and the initial key stored therein;
[0009] The target PUF stimulus response is used to encrypt the message to be sent stored in the device, resulting in an encrypted message.
[0010] The target key, the encrypted message, and the device identifier of the sending device are sent to the receiving device.
[0011] Secondly, this application provides a method for transmitting encrypted messages, applied to a receiving device, the method comprising:
[0012] Receive the target key, encrypted message, and device identifier of the sending device sent by the sending device;
[0013] The encrypted message is verified based on the device identifier to obtain a first verification result; the first verification result is used to indicate whether the verification passed or failed.
[0014] If the first verification result indicates that the verification is successful, a verification key is generated based on the target key and the first decryption key corresponding to the device identifier. The first decryption key is the same as the initial key stored in the sending device.
[0015] The encrypted message is verified according to the verification key to obtain a second verification result, which is used to indicate whether the verification passed or failed.
[0016] If the second verification result indicates that the verification is successful, the encrypted message is decrypted using the verification key to obtain the target message, which is the same as the message to be sent stored in the sending device.
[0017] Thirdly, this application provides an encrypted message transmission apparatus, comprising:
[0018] The acquisition module is used to select a target PUF stimulus response pair from a pre-stored target set of physically unclonable functional (PUF) stimulus response pairs; the PUF stimulus response pairs in the target set are generated using a PUF chip;
[0019] Processing module, used for:
[0020] Generate a target key based on the target PUF stimulus response pair and the initial key stored therein;
[0021] The target PUF stimulus response is used to encrypt the message to be sent stored in the device, resulting in an encrypted message.
[0022] The sending module is used to send the target key, the encrypted message, and the device identifier of the sending device to the receiving device.
[0023] Fourthly, this application provides an encrypted message transmission apparatus, comprising:
[0024] The receiving module is used to receive the target key, encrypted message, and device identifier of the sending device sent by the sending device;
[0025] Processing module, used for:
[0026] The encrypted message is verified based on the device identifier to obtain a first verification result; the first verification result is used to indicate whether the verification passed or failed.
[0027] If the first verification result indicates that the verification is successful, a verification key is generated based on the target key and the first decryption key corresponding to the device identifier. The first decryption key is the same as the initial key stored in the sending device.
[0028] The encrypted message is verified according to the verification key to obtain a second verification result, which is used to indicate whether the verification passed or failed.
[0029] If the second verification result indicates that the verification is successful, the encrypted message is decrypted using the verification key to obtain the target message, which is the same as the message to be sent stored in the sending device.
[0030] Fifthly, this application provides an electronic device, comprising:
[0031] Processor, memory, communication interface;
[0032] The memory is used to store the executable instructions of the processor;
[0033] The processor is configured to execute the encrypted message transmission method according to any one of the first aspects by executing the executable instructions.
[0034] Sixthly, this application provides an electronic device, comprising:
[0035] Processor, memory, communication interface;
[0036] The memory is used to store the executable instructions of the processor;
[0037] The processor is configured to execute the encrypted message transmission method of any of the second aspects by executing the executable instructions.
[0038] In a seventh aspect, this application provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the encrypted message transmission method described in either the first or second aspect of the invention.
[0039] Eighthly, this application provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the encrypted message transmission method described in either the first or second aspect.
[0040] The encrypted message transmission method, apparatus, device, and medium provided in this application involve the sending device selecting a target PUF stimulus-response pair from a target set of PUF stimulus-response pairs, generating a target key using the target PUF stimulus-response pair, and encrypting the message to be sent to obtain an encrypted message. The target key, the encrypted message, and the sending device's device identifier are then sent to the receiving device. The receiving device verifies the encrypted message based on the device identifier. Upon successful verification, a verification key is generated using the target key. The verification key is then used to perform a secondary verification of the encrypted message. Upon successful verification, the verification key is used to decrypt the encrypted message to obtain the target message. This scheme effectively improves message security by using a target PUF stimulus-response pair to encrypt the message to be sent, ensuring that a different PUF stimulus-response pair is used for each encryption. Attached Figure Description
[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0042] Figure 1 A flowchart illustrating an embodiment of the encrypted message transmission method provided in this application;
[0043] Figure 2 A flowchart illustrating Embodiment 2 of the encrypted message transmission method provided in this application;
[0044] Figure 3 A flowchart illustrating Embodiment 3 of the encrypted message transmission method provided in this application;
[0045] Figure 4 A flowchart illustrating Embodiment 4 of the encrypted message transmission method provided in this application;
[0046] Figure 5a A flowchart illustrating Embodiment 5 of the encrypted message transmission method provided in this application;
[0047] Figure 5b A schematic diagram illustrating the XOR encryption of the target set and the update set of the PUF stimulus response provided in this application;
[0048] Figure 6 A schematic diagram of the structure of an embodiment of the encrypted message transmission device provided in this application;
[0049] Figure 7 A schematic diagram of the structure of Embodiment 2 of the encrypted message transmission device provided in this application;
[0050] Figure 8 A schematic diagram of the structure of an electronic device provided in this application Figure 1 ;
[0051] Figure 9 A schematic diagram of the structure of an electronic device provided in this application Figure 2 .
[0052] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0053] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0054] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0055] It should be noted that the encrypted message transmission method, apparatus, device and medium of this application can be used in the field of information security, or in any field other than information security. The application field of the encrypted message transmission method, apparatus, device and medium of this application is not limited.
[0056] With the development of technology, various business transactions can be completed online. Online business transactions usually involve the exchange of messages between different devices.
[0057] In existing technologies, when devices transmit messages, the sending device encrypts the message using a fixed key for security. The receiving device then decrypts the encrypted message using the same key to retrieve it. However, this fixed-key encryption method results in relatively low message security.
[0058] To address the problems existing in the prior art, the inventors, during their research on encrypted message transmission methods, discovered that to improve message security, make messages difficult to crack, and ensure message correctness, the sending device can select a target PUF stimulus response pair from a pre-stored set of physically unclonable functions (PUF) stimulus response pairs. This target PUF stimulus response pair is then used to generate a target key, and the target PUF stimulus response pair is used to encrypt the message to be sent, resulting in an encrypted message. The target key, the encrypted message, and the sending device's device identifier are then sent to the receiving device. The receiving device uses the device identifier to perform a first verification of the encrypted message. If the verification passes, a verification key is generated based on the target key. The encrypted message is then used to perform a second verification based on the verification key. If the verification passes, the encrypted message is decrypted using the verified key, resulting in the target message. By using the selected target PUF stimulus response pair to encrypt the message to be sent, and performing two verifications, message security is effectively improved. Based on the above inventive concept, the encrypted message transmission scheme of this application was designed.
[0059] The sending and receiving devices in this application can be IoT devices, servers, terminal devices, computers, etc., and this application does not limit them.
[0060] The following provides examples illustrating the application scenarios of the encrypted message transmission method provided in this application.
[0061] For example, in this application scenario, the sending device is an IoT device and the receiving device is a server. The IoT device needs to send messages to the server.
[0062] IoT devices include a PUF (Programmable Response Function) chip. Upon initial startup, the PUF chip generates multiple PUF stimulus-response pairs to be grouped. These pairs are then grouped into multiple sets. One set is randomly selected as the target set. The device's identifier and the target set are then sent to the server. The server then establishes a mapping between the device identifier and the target set and stores the mapping.
[0063] When an IoT device needs to send a message to the server, it first selects a target PUF stimulus-response pair from the target set of PUF stimulus-response pairs. Then, it generates a target key based on the target PUF stimulus-response pair and its own stored initial key. Next, it encrypts its stored message to be sent using the target PUF stimulus-response pair to obtain an encrypted message. Finally, it sends the target key, the encrypted message, and the device identifier to the server.
[0064] The server verifies the encrypted message based on the device identifier. After the verification is successful, it generates a verification key based on the target key and the first decryption key corresponding to the device identifier.
[0065] The encrypted message is then verified using the verification key. Once the verification is successful, the encrypted message is decrypted using the verification key to obtain the target message, thus completing the transmission of the encrypted message.
[0066] It should be noted that the above scenario is only an example of an application scenario provided by the embodiments of this application. The embodiments of this application do not limit the actual form of the various devices included in the scenario, nor do they limit the interaction method between devices. In the specific application of the solution, it can be set according to actual needs.
[0067] The technical solution of this application will now be described in detail through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0068] Figure 1 This is a flowchart illustrating an embodiment of the encrypted message transmission method provided in this application. In this embodiment, the sending device generates a target key using a selected target PUF stimulus response pair, encrypts the message to be sent, and then sends the encrypted message, target key, and device identifier to the receiving device. The process of the receiving device performing two verifications and then decrypting the message is also described. The method in this embodiment can be implemented using software, hardware, or a combination of both. Figure 1 As shown, the encrypted message transmission method specifically includes the following steps:
[0069] S101: The sending device selects a target PUF stimulus response pair from the pre-stored target set of PUF stimulus response pairs.
[0070] In this step, when the sending device needs to send a message, it first needs to select a target PUF stimulus response pair from the pre-stored target set of PUF stimulus response pairs. The PUF stimulus response pairs in the target set of PUF stimulus response pairs are generated using the PUF chip.
[0071] Specifically, some PUF stimulus response pairs in the target set may be marked with a "used" flag, indicating that these PUF stimulus response pairs have already been used. In order to ensure the security of the message, these PUF stimulus response pairs will no longer be used. Therefore, a target PUF stimulus response pair is randomly selected from the PUF stimulus response pairs in the target set that are not marked with a "used" flag.
[0072] When making a random selection, a True Random Number Generator (TRNG) can be used to ensure the randomness of the selected target PUF stimulus-response pair, thereby improving message security.
[0073] S102: The sending device generates a target key based on the target PUF stimulus response pair and its own stored initial key.
[0074] In this step, after the sending device selects the target PUF stimulus response pair, in order for the receiving device to decrypt the encrypted message, it needs to generate a target key based on the target PUF stimulus response pair and its own stored initial key.
[0075] Specifically, since a PUF stimulus-response pair includes two data items—a stimulus data item and a response data item—both of which are in binary format, the stimulus data item or response data item in the target PUF stimulus-response pair can be identified as encrypted data. Then, the encrypted data item is XORed with the initial key to obtain the target key.
[0076] Since both the encrypted data and the initial key are in binary format and have the same number of bits, XOR encryption can be performed. For example, if the encrypted data is 01000101 and the initial key is 10101001, the resulting target key is 11101100. This application does not limit the encrypted data and initial key; they can be determined according to the actual situation.
[0077] It should be noted that before sending a message for the first time, the sending device needs to send its own device identifier and initial key to the receiving device. The receiving device then stores the initial key as the first decryption key and establishes a correspondence with the device identifier.
[0078] S103: The sending device encrypts the message to be sent stored in its own memory according to the target PUF excitation response, and obtains an encrypted message.
[0079] In this step, after the sending device selects the target PUF stimulus response pair, it needs to encrypt the message for security. It needs to encrypt the message to be sent stored in its own memory according to the target PUF stimulus response pair to obtain the encrypted message.
[0080] Specifically, the first preset number of digits in the encrypted data of the target PUF stimulus response pair are converted into hexadecimal to obtain the process key; then the process key is used to encrypt the message to be sent to obtain the encrypted message.
[0081] It should be noted that the preset quantity can be 256, 512, 1024, etc. This application embodiment does not limit the preset quantity, and it can be set according to the actual situation.
[0082] It should be noted that the target PUF stimulus response pair in the target set also needs to be marked as used, so that the target PUF stimulus response pair will not be selected when sending messages again.
[0083] It should be noted that the execution order of steps S102 and S103 can be as follows: step S102 can be executed first, followed by step S103; step S103 can be executed first, followed by step S102; or steps S102 and S103 can be executed simultaneously. This embodiment does not limit the execution order of steps S102 and S103, and can be set according to actual circumstances.
[0084] S104: The sending device sends the target key, encrypted message, and the sending device's device identifier to the receiving device.
[0085] In this step, after the sending device obtains the encrypted message and the target key, it can send the target key, the encrypted message, and the device identifier of the sending device to the receiving device.
[0086] S105: After receiving the target key, encrypted message, and device identifier of the sender device sent by the sender device, the receiving device verifies the encrypted message according to the device identifier and obtains the first verification result.
[0087] In this step, after the sending device sends the target key, encrypted message, and the sending device's identifier to the receiving device, the receiving device receives this data. To determine whether this data was sent by the sending device or by malicious actors, the encrypted message needs to be verified based on the device identifier to obtain a first verification result. The first verification result indicates whether the verification passed or failed.
[0088] Since the receiving device stores the device identifier of the sending device and the corresponding PUF stimulus-response pair target set, it can be determined whether the received device identifier has a corresponding PUF stimulus-response pair target set. If a corresponding PUF stimulus-response pair target set exists, it indicates that the received data may have been sent by the sending device, and further verification is required to generate a first verification result indicating that the verification has passed. If no corresponding PUF stimulus-response pair target set exists, it indicates that the received data was not sent by the sending device, and a first verification result indicating that the verification has failed is generated.
[0089] S106: If the first verification result indicates that the verification is successful, the receiving device generates a verification key based on the target key and the first decryption key corresponding to the device identifier.
[0090] In this step, after the receiving device receives the first verification result, if the first verification result indicates that the verification passed, since the receiving device stores the correspondence between the device identifier and the first decryption key, it can determine the first decryption key corresponding to the device identifier sent by the sending device. Then, based on the target key and the first decryption key, a verification key is generated for subsequent verification. The first decryption key is the same as the initial key stored in the sending device.
[0091] Specifically, the target key and the first decryption key are XORed to obtain the verification key. The verification key is the same as the encrypted data determined by the sending device. For example, if the target key is 11101100 and the first decryption key is 10101001, the resulting verification key is 01000101. This application does not limit the target key and the first decryption key; they can be determined according to the actual situation.
[0092] It should be noted that if the first verification result indicates that the verification failed, the received encrypted message will be discarded.
[0093] S107: The receiving device verifies the encrypted message according to the verification key and obtains the second verification result.
[0094] In this step, after generating the verification key, the receiving device needs to verify the encrypted message using the verification key to determine whether the received data was sent by the sending device, thus obtaining a second verification result. This second verification result indicates whether the verification passed or failed.
[0095] First, determine whether the verification key exists in the target set corresponding to the received device identifier PUF stimulus response pair; if the verification key does not exist, it indicates that the data was sent by malicious actors, and generate a second verification result to indicate that the verification failed.
[0096] If the verification data exists, it is also necessary to determine whether the PUF stimulus response to the target set has marked the verification key as used. Since the receiving device marks the used PUF stimulus response to the target set as used after each decryption, if it is determined that the PUF stimulus response to the target set has not marked the verification key as used, it indicates that the received data was sent by the sending device, and a second verification result is generated to indicate that the verification has passed. If the PUF stimulus response to the target set has marked the verification key as used, it indicates that the data was sent by malicious actors, and a second verification result is generated to indicate that the verification has failed.
[0097] S108: If the second verification result indicates that the verification is successful, the receiving device uses the verification key to decrypt the encrypted message and obtain the target message.
[0098] In this step, after the receiving device obtains the second verification result, if the second verification result indicates that the verification is successful, the receiving device uses the verification key to decrypt the encrypted message and obtain the target message, which is the same as the message to be sent stored in the sending device.
[0099] Specifically, the first preset number of digits of the verification key are converted into hexadecimal to obtain the second decryption key; then, the encrypted message is decrypted using the second decryption key to obtain the target message, completing the message transmission process. The second decryption key is the same as the target key determined by the sending device.
[0100] It should be noted that the preset quantity can be 256, 512, 1024, etc. This application embodiment does not limit the preset quantity, and it can be set according to the actual situation.
[0101] It should be noted that if the second verification result indicates that the verification failed, the received encrypted message will be discarded.
[0102] It should be noted that the receiving device needs to mark the verification key in the target set of the PUF stimulus response as used, so that it can be verified when receiving encrypted messages later.
[0103] The encrypted message transmission method provided in this embodiment involves the sending device selecting a target PUF stimulus response pair from a target set of PUF stimulus response pairs, generating a target key using the selected target PUF stimulus response pair, and encrypting the message to be sent to obtain an encrypted message. The sending device then sends the target key, the encrypted message, and its own device identifier to the receiving device. The receiving device performs a first verification on the encrypted message based on the device identifier. If the verification passes, it generates a verification key based on the target key. A second verification is then performed on the encrypted message using the verification key. If the verification passes, the receiving device decrypts the encrypted message using the verification key to obtain the target message, thus achieving message transmission. Compared to the use of a fixed key in existing technologies, this scheme uses a PUF stimulus response pair selected from the target set of PUF stimulus response pairs to encrypt the message, ensuring that the PUF stimulus response pair used for each message transmission is different, effectively improving message security. Furthermore, the receiving device's double verification of the encrypted message also enhances message security. The transmitted target key is in binary format, resulting in higher transmission and decryption efficiency.
[0104] Figure 2This is a flowchart illustrating a second embodiment of the encrypted message transmission method provided in this application. This embodiment describes the situation where the sending device encrypts and sends the message. For example... Figure 2 As shown, the encrypted message transmission method specifically includes the following steps:
[0105] S201: Select a target PUF stimulus-response pair from the pre-stored target set of PUF stimulus-response pairs.
[0106] S202: Generate the target key based on the target PUF stimulus response pair and the initial key stored in the key.
[0107] S203: Encrypt the message to be sent stored in the target PUF according to the target PUF stimulus response to obtain an encrypted message.
[0108] S204: Send the target key, encrypted message, and sender device identifier to the receiver device.
[0109] It should be noted that the execution process of steps S201 to S204 is similar to that of steps S101 to S104 in Embodiment 1, and will not be described again here.
[0110] After receiving the target key, encrypted message, and device identifier from the sending device, the receiving device verifies the encrypted message based on the device identifier to obtain a first verification result. If the first verification result indicates that the verification passed, a verification key is generated based on the first decryption key corresponding to the target key and the device identifier.
[0111] Then, the encrypted message is verified using the verification key to obtain a second verification result; if the second verification result indicates that the verification is successful, the encrypted message is decrypted using the verification key to obtain the target message.
[0112] The encrypted message transmission method provided in this embodiment involves the sending device selecting a target PUF stimulus response pair from a target set of PUF stimulus response pairs, generating a target key using the selected target PUF stimulus response pair, and encrypting the message to be sent to obtain an encrypted message. The target key, the encrypted message, and the sending device's own identifier are then sent to the receiving device. Compared to the use of a fixed key in existing technologies, this scheme uses a PUF stimulus response pair selected from the target set of PUF stimulus response pairs to encrypt the message, ensuring that the PUF stimulus response pair used for each message transmission is different, effectively improving message security.
[0113] Figure 3 This is a flowchart illustrating a third embodiment of the encrypted message transmission method provided in this application. This embodiment describes how the receiving device receives the encrypted message and performs verification and decryption. Figure 3 As shown, the encrypted message transmission method specifically includes the following steps:
[0114] S301: Receive the target key, encrypted message, and device identifier of the sending device sent by the sending device.
[0115] The receiving device selects a target PUF stimulus-response pair from a pre-stored target set; then, based on the target PUF stimulus-response pair and its own stored initial key, it generates a target key. Next, it encrypts its stored message to be sent using the target PUF stimulus-response pair to obtain an encrypted message; finally, it sends the target key, the encrypted message, and the sender's device identifier to the receiving device. The receiving device then receives the target key, the encrypted message, and the sender's device identifier sent by the sender.
[0116] S302: Verify the encrypted message based on the device identifier to obtain the first verification result.
[0117] S303: If the first verification result indicates that the verification is successful, generate a verification key based on the first decryption key corresponding to the target key and the device identifier.
[0118] S304: The device verifies the encrypted message based on the verification key and obtains a second verification result.
[0119] S305: If the second verification result indicates that the verification is successful, use the verification key to decrypt the encrypted message and obtain the target message.
[0120] It should be noted that the execution process of steps S301 to S305 is similar to that of steps S105 to S108 in Embodiment 1, and will not be described again here.
[0121] The encrypted message transmission method provided in this embodiment involves the receiving device receiving the target key, encrypted message, and device identifier of the sending device from the sending device. The receiving device performs a first verification on the encrypted message based on the device identifier. If the verification passes, a verification key is generated based on the target key. Then, the receiving device performs a second verification on the encrypted message based on the verification key. If the verification passes, the receiving device decrypts the encrypted message using the verification key to obtain the target message. Compared to existing technologies that use a fixed key for decryption, this scheme uses PUF stimulus response pairs selected from a target set of PUF stimulus response pairs to encrypt and decrypt the message. This ensures that the PUF stimulus response pairs used to generate the encrypted message are all different, effectively improving message security. Furthermore, the receiving device's double verification of the encrypted message also enhances message security.
[0122] Figure 4This is a flowchart illustrating Embodiment 4 of the encrypted message transmission method provided in this application. Based on the above embodiments, this application embodiment describes the situation where, upon initial startup of the sending device, the PUF stimulus response target set is determined and sent to the receiving device for storage. Figure 4 As shown, the encrypted message transmission method specifically includes the following steps:
[0123] S401: When the sending device starts up for the first time, the sending device uses the PUF chip to generate multiple PUF stimulus response pairs to be grouped.
[0124] In this step, to ensure message security, the sent messages need to be encrypted using target PUF stimulus-response pairs, which requires generating PUF stimulus-response pairs. Furthermore, verifying the encrypted messages requires a target set of PUF stimulus-response pairs, so the generated PUF stimulus-response pairs need to be sent to the receiving device. This first requires the sending device to generate multiple PUF stimulus-response pairs to be grouped using the PUF chip during its initial startup.
[0125] The transmitting device includes a PUF chip. Due to defects in the manufacturing process and variations in natural conditions such as temperature and humidity, different PUF chips will generate different response data based on the same stimulus data. Therefore, the PUF stimulus-response pair generated by each PUF chip is uncopyable, can be used for encryption, and is difficult to crack. The transmitting device can obtain multiple PUF stimulus-response pairs to be grouped by inputting multiple different stimulus data into the PUF chip.
[0126] It should be noted that a linear feedback shift register (LFSR) can be used in the PUF chip.
[0127] S402: The sending device groups multiple PUF stimulus response pairs to be grouped, resulting in multiple sets of PUF stimulus response pairs.
[0128] In this step, after the sending device obtains multiple PUF stimulus response pairs to be grouped, in order to update the target set of PUF stimulus response pairs in the future and to improve the encryption efficiency of the sending device and the verification efficiency of the receiving device, it is necessary to group the multiple PUF stimulus response pairs to be grouped to obtain multiple PUF stimulus response pair sets.
[0129] It should be noted that the number of PUF stimulus-response pairs is the same in each PUF stimulus-response pair set.
[0130] S403: The sending device randomly selects one PUF stimulus response pair set from multiple PUF stimulus response pair sets as the PUF stimulus response pair target set.
[0131] In this step, after the sending device obtains multiple PUF stimulus-response pair sets, in order to improve the security of the message, it can randomly select one PUF stimulus-response pair set from the multiple PUF stimulus-response pair sets as the PUF stimulus-response pair target set.
[0132] When making random selections, TRNG can be used to ensure the randomness of the selected PUF stimulus response to the target set, thereby improving message security.
[0133] S404: The sending device marks the target set as occupied in its PUF stimulus response.
[0134] In this step, after the sending device determines the target set of PUF stimulus response pairs, in order to prevent the target set of PUF stimulus response pairs from being selected again when updating the target set of PUF stimulus response pairs in the future, and to ensure the security of the message, the target set of PUF stimulus response pairs needs to be marked as occupied.
[0135] S405: The sending device sends its device identifier and PUF stimulus response pair target set to the receiving device.
[0136] In this step, after the sending device determines the target set of PUF stimulus response pairs, it needs to send the device identifier of the sending device and the target set of PUF stimulus response pairs to the receiving device so that the sending device can verify the encrypted message later.
[0137] It should be noted that when the sending device starts up for the first time, it obtains its own device identifier. This can be achieved in several ways: First, the sending device sends a device identifier retrieval request to the server. The server then assigns a device identifier to the sending device and sends it back to the sending device, allowing the sending device to obtain the identifier. Second, the sending device may have a device identifier stored within it. Before the first startup, this identifier is inactive and is activated upon startup, thus obtaining the device identifier. Third, the sending device may simply have a device identifier stored within it, which can be obtained directly.
[0138] It should be noted that the execution order of steps S404 and S405 can be as follows: step S404 is executed first, followed by step S405; step S405 is executed first, followed by step S405; or steps S404 and S405 are executed simultaneously. This embodiment does not limit the execution order of steps S404 and S405, and can be set according to actual circumstances.
[0139] S406: After receiving the device identifier of the sending device and the target set of PUF stimulus response pairs sent by the sending device, the receiving device establishes a correspondence between the device identifier and the target set of PUF stimulus response pairs and then stores them.
[0140] In this step, after the sending device sends the device identifier and the target set of PUF stimulus response pairs to the receiving device, the receiving device can receive this data, and then establish a correspondence between the device identifier and the target set of PUF stimulus response pairs and store it so that it can verify the received encrypted messages later.
[0141] The encrypted message transmission method provided in this embodiment generates PUF stimulus-response pairs to be grouped using a PUF encryption chip, thereby determining the target set of PUF stimulus-response pairs and sending it to the receiving device. The receiving device stores the target set of PUF stimulus-response pairs after establishing a correspondence between the target set and its device identifier, ensuring that the PUF stimulus-response pairs in the target set are not easily cracked, effectively improving message security.
[0142] Figure 5a This is a flowchart illustrating a fifth embodiment of the encrypted message transmission method provided in this application. Based on the above embodiments, this application describes the situation where the sending device and the receiving device update the PUF stimulus response to the target set. For example... Figure 5a As shown, the encrypted message transmission method specifically includes the following steps:
[0143] S501: The sending device randomly selects a set of PUF stimulus response pairs from the multiple stored sets of PUF stimulus response pairs that are not marked as occupied, and uses this set as the PUF stimulus response pair update set.
[0144] Since the sending device uses different target PUF stimulus response pairs each time it encrypts a message, and the target PUF stimulus response pairs are selected from the target set of PUF stimulus response pairs, the PUF stimulus response pairs in the target set will be used up after a period of time. In order to ensure the normal encryption of messages and to prevent malicious senders from cracking the PUF stimulus response pairs and improve message security, it is necessary to update the target set of PUF stimulus response pairs.
[0145] In this step, to ensure that the target set of PUF stimulus response pairs is not duplicated, the sending device randomly selects a set of PUF stimulus response pairs from among the multiple stored PUF stimulus response pair sets that are not marked as occupied, and uses this set as the PUF stimulus response pair update set.
[0146] When making a random selection, TRNG can be used to ensure the randomness of the selected PUF stimulus response to the update set, thereby improving message security.
[0147] The method for triggering the sending device to update the PUF stimulus response pair target set can be as follows: the sending device monitors the PUF stimulus response pair target set, monitors the number of PUF stimulus response pairs in the target set that are not marked as occupied, and updates the set when the number is zero. Alternatively, updates can be performed at preset update intervals. Another method is receiving a PUF stimulus response pair target set command sent by a staff member through a terminal device. The preset update interval can be 7 days, 15 days, 30 days, etc. This application embodiment does not limit the method or preset update interval for triggering the sending device to update the PUF stimulus response pair target set; these can be determined according to actual circumstances.
[0148] S502: The sending device uses the PUF stimulus response pair to perform XOR encryption on the target set and the updated set of the PUF stimulus response pair, and obtains the encrypted set of the PUF stimulus response pair.
[0149] In this step, after the sending device selects the PUF stimulus response pair update set, it needs to be encrypted to ensure the security of the PUF stimulus response pair update set. The PUF stimulus response pair target set is XORed with the PUF stimulus response pair update set to obtain the encrypted PUF stimulus response pair set.
[0150] Since the PUF stimulus-response pairs in both the target set and the update set are ordered, and the number of PUF stimulus-response pairs is the same, and the stimulus and response data in each PUF stimulus-response pair are binary data, for two PUF stimulus-response pairs that are in the same sequential position in both sets, the PUF stimulus-response pair belonging to the target set is designated as the first PUF stimulus-response pair, and the PUF stimulus-response pair belonging to the update set is designated as the second PUF stimulus-response pair.
[0151] The stimulus data in the second PUF stimulus-response pair is XORed with the stimulus data in the first PUF stimulus-response pair to obtain the first stimulus update data; the response data in the second PUF stimulus-response pair is XORed with the response data in the first PUF stimulus-response pair to obtain the first response update data.
[0152] Combining the first stimulus update data and the first response update data yields the third PUF stimulus-response pair. All third PUF stimulus-response pairs are then sorted according to the order of their corresponding first PUF stimulus-response pairs in the PUF stimulus-response pair target set, resulting in an encrypted set of PUF stimulus-response pairs.
[0153] For example, Figure 5b This is a schematic diagram illustrating the XOR encryption of the target set and the updated set of the PUF stimulus response provided in this application, as shown below. Figure 5b As shown, R represents the target set of PUF stimulus-response pairs, R1 represents the update set of PUF stimulus-response pairs, and R0 represents the encrypted set of PUF stimulus-response pairs. R and R1 are XORed to obtain R0.
[0154] S503: The sending device has occupied the flag for the set of PUF stimulus response pairs to be updated.
[0155] In this step, after the sending device selects the PUF stimulus response pair update set, in order to avoid using a duplicate set when updating the target set of PUF stimulus response pairs in the future, it needs to mark the PUF stimulus response pair set to be updated with an occupied flag.
[0156] S504: The sending device updates the target set of PUF stimulus-response pairs to the set of PUF stimulus-response pairs to be updated.
[0157] In this step, after the sending device selects the PUF stimulus response pair update set, it can perform the update, changing the target set of PUF stimulus response pairs to the set of PUF stimulus response pairs to be updated.
[0158] It should be noted that the execution order of steps S502, S503, and S504 can be: step S502, step S503, step S504; it can also be: step S503, step S504, step S502; it can also be: step S504, step S503, step S502; or it can be: steps S502, step S503, and step S504 are executed simultaneously. This embodiment does not limit the execution order of steps S502, S503, and S504, and can be set according to actual circumstances.
[0159] S505: The sending device sends the device identifier and PUF stimulus response pair encrypted set to the receiving device.
[0160] In this step, after the sending device obtains the PUF stimulus response pair encryption set, in order for the receiving device to verify the encrypted message, it needs to send the sending device's device identifier and the PUF stimulus response pair encryption set to the receiving device.
[0161] S506: After receiving the device identifier of the sending device and the encrypted set of PUF stimulus response pairs sent by the sending device, the receiving device uses the target set of PUF stimulus response pairs corresponding to the device identifier to decrypt the encrypted set of PUF stimulus response pairs, and obtains the decrypted set of PUF stimulus response pairs.
[0162] In this step, after the sending device sends the device identifier and the encrypted set of PUF stimulus response pairs to the receiving device, the receiving device can receive the device identifier and the encrypted set of PUF stimulus response pairs. Then, in order to update its own target set of PUF stimulus response pairs, it needs to first use the target set of PUF stimulus response pairs corresponding to the device identifier to decrypt the encrypted set of PUF stimulus response pairs, and obtain the decrypted set of PUF stimulus response pairs.
[0163] Since the PUF stimulus-response pairs in both the target set and the encrypted set are ordered, and the number of PUF stimulus-response pairs is the same, and the stimulus and response data in each PUF stimulus-response pair are binary data, for two PUF stimulus-response pairs that are in the same sequential position in both the target set and the encrypted set, the PUF stimulus-response pair belonging to the target set is the fourth PUF stimulus-response pair, and the PUF stimulus-response pair belonging to the encrypted set is the fifth PUF stimulus-response pair.
[0164] The stimulus data in the fourth PUF stimulus-response pair is XORed with the stimulus data in the fifth PUF stimulus-response pair to obtain the second stimulus update data; the response data in the fourth PUF stimulus-response pair is XORed with the response data in the fifth PUF stimulus-response pair to obtain the second response update data.
[0165] Combining the second stimulus update data and the second response update data yields the sixth PUF stimulus-response pair. All sixth PUF stimulus-response pairs are then sorted according to the order of their corresponding fourth PUF stimulus-response pairs in the PUF stimulus-response pair target set to obtain the PUF stimulus-response pair decryption set.
[0166] S507: The receiving device updates the PUF stimulus response pair target set to the PUF stimulus response pair decryption set.
[0167] In this step, after the receiving device obtains the PUF stimulus response pair decryption set, it can update the PUF stimulus response pair target set to the PUF stimulus response pair decryption set, thus completing the update.
[0168] The encrypted message transmission method provided in this embodiment involves the sending device randomly selecting a set of PUF stimulus-response pairs from those PUF stimulus-response pairs that have not been marked as occupied, as the PUF stimulus-response pair update set; then using this as the updated PUF stimulus-response pair target set, encrypting it, and sending it to the receiving device. The receiving device decrypts the encrypted set and then updates the PUF stimulus-response pair target set, thus completing the update of the PUF stimulus-response pair target sets in both the receiving and sending devices. This not only ensures the security of the PUF stimulus-response pair update set but also improves the security of the message itself by updating the PUF stimulus-response pair target set.
[0169] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0170] Figure 6 This is a schematic diagram of the structure of an embodiment of the encrypted message transmission device provided in this application; the device can be integrated into the sending device in the above method embodiments, or it can be implemented through the sending device in the above method embodiments. Figure 6 As shown, the encrypted message transmission device 60 includes:
[0171] The acquisition module 61 is used to select a target PUF stimulus response pair from a pre-stored target set of physically unclonable functional (PUF) stimulus response pairs; the PUF stimulus response pairs in the target set are generated using a PUF chip.
[0172] Processing module 62 is used for:
[0173] Generate a target key based on the target PUF stimulus response pair and the initial key stored therein;
[0174] The target PUF stimulus response is used to encrypt the message to be sent stored in the device, resulting in an encrypted message.
[0175] The sending module 63 is used to send the target key, the encrypted message, and the device identifier of the sending device to the receiving device.
[0176] Furthermore, the processing module 62 is specifically used for:
[0177] The stimulus data or response data in the target PUF stimulus-response pair is determined to be encrypted data;
[0178] The encrypted data is XORed with the initial key to obtain the target key.
[0179] Furthermore, the processing module 62 is specifically used for:
[0180] The first preset number of digits in the encrypted data of the target PUF stimulus response pair are converted into hexadecimal to obtain the process key;
[0181] The process key is used to encrypt the message to be sent, resulting in the encrypted message.
[0182] Furthermore, the acquisition module 62 is specifically used to randomly select a target PUF stimulus response pair from the PUF stimulus response pairs without a used identifier in the target set of PUF stimulus response pairs.
[0183] Furthermore, the processing module 62 is also used for:
[0184] When the sending device is first started, the PUF chip is used to generate multiple PUF stimulus response pairs to be grouped;
[0185] The plurality of PUF stimulus-response pairs to be grouped are grouped to obtain a plurality of PUF stimulus-response pair sets;
[0186] Randomly select one PUF stimulus response pair set from the plurality of PUF stimulus response pair sets as the PUF stimulus response pair target set;
[0187] The target set is marked as occupied by the PUF stimulus response;
[0188] Furthermore, the sending module 63 is also used to send the device identifier of the sending device and the PUF stimulus response target set to the receiving device.
[0189] Furthermore, the processing module 62 is also used for:
[0190] From the multiple stored PUF stimulus response pair sets, randomly select one set of PUF stimulus response pairs that is not marked as occupied, and use it as the PUF stimulus response pair update set;
[0191] The target set of the PUF stimulus response pairs is XORed with the updated set of the PUF stimulus response pairs to obtain the encrypted set of PUF stimulus response pairs.
[0192] The set of tags to be updated for PUF stimulus response is already occupied;
[0193] Update the target set of PUF stimulus-response pairs to the set of PUF stimulus-response pairs to be updated;
[0194] Furthermore, the sending module 63 is also used to send the device identifier of the sending device and the PUF stimulus response pair encryption set to the receiving device.
[0195] The encrypted message transmission device provided in this embodiment is used to execute the technical solution of the sending device in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0196] Figure 7 This is a schematic diagram of the structure of a second embodiment of the encrypted message transmission device provided in this application; this device can be integrated into the receiving device in the above method embodiments, or it can be implemented through the receiving device in the above method embodiments. Figure 7 As shown, the encrypted message transmission device 70 includes:
[0197] The receiving module 71 is used to receive the target key, encrypted message, and device identifier of the sending device sent by the sending device;
[0198] Processing module 72 is used for:
[0199] The encrypted message is verified based on the device identifier to obtain a first verification result; the first verification result is used to indicate whether the verification passed or failed.
[0200] If the first verification result indicates that the verification is successful, a verification key is generated based on the target key and the first decryption key corresponding to the device identifier. The first decryption key is the same as the initial key stored in the sending device.
[0201] The encrypted message is verified according to the verification key to obtain a second verification result, which is used to indicate whether the verification passed or failed.
[0202] If the second verification result indicates that the verification is successful, the encrypted message is decrypted using the verification key to obtain the target message, which is the same as the message to be sent stored in the sending device.
[0203] Furthermore, the processing module 72 is specifically used for:
[0204] Based on the device identifier, determine whether the device identifier has a corresponding Physically Unclonable Function (PUF) stimulus-response pair target set;
[0205] If the device identifier has a corresponding PUF stimulus response pair target set, a first verification result is generated to indicate that the verification has passed.
[0206] If the device identifier does not have a corresponding PUF stimulus response pair target set, a first verification result is generated to indicate that the verification failed.
[0207] Furthermore, the processing module 72 is specifically used to perform XOR decryption on the target key and the first decryption key to obtain the verification key.
[0208] Furthermore, the processing module 72 is specifically used for:
[0209] Determine whether the verification key exists in the target set of PUF stimulus response pairs corresponding to the device identifier;
[0210] If the verification key is not present in the target set of the PUF stimulus response pairs corresponding to the device identifier, a second verification result is generated to indicate that the verification failed.
[0211] If the verification key exists in the target set of PUF stimulus response pairs corresponding to the device identifier, then determine whether the verification key in the target set of PUF stimulus response pairs is marked as used.
[0212] If the PUF stimulus response does not mark the verification key in the target set as used, a second verification result is generated to indicate that the verification has passed.
[0213] If the PUF stimulus response has used an identifier for the verification key tag in the target set, a second verification result is generated to indicate that the verification failed.
[0214] Furthermore, the processing module 72 is specifically used for:
[0215] The first preset number of digits of the verification key are converted into hexadecimal to obtain the second decryption key;
[0216] The encrypted message is decrypted using the second decryption key to obtain the target message.
[0217] Furthermore, the receiving module 71 is also used to receive the device identifier of the sending device and the PUF stimulus response pair target set sent by the sending device;
[0218] Furthermore, the processing module 72 is also used for:
[0219] After establishing a correspondence between the device identifier and the target set of the PUF excitation response pair, the data is stored.
[0220] Furthermore, the receiving module 71 is also used to receive the device identifier of the sending device and the PUF incentive response pair encryption set sent by the sending device;
[0221] Furthermore, the processing module 72 is also used for:
[0222] Using the target set of PUF stimulus response pairs corresponding to the device identifier, the encrypted set of PUF stimulus response pairs is decrypted to obtain the decrypted set of PUF stimulus response pairs.
[0223] Update the target set of PUF stimulus-response pairs to the decryption set of PUF stimulus-response pairs.
[0224] The encrypted message transmission device provided in this embodiment is used to execute the technical solution of the receiving device in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0225] Figure 8 A schematic diagram of the structure of an electronic device provided in this application Figure 1 .like Figure 8 As shown, the electronic device 80 includes:
[0226] Processor 81, memory 82, and communication interface 83;
[0227] The memory 82 is used to store the executable instructions of the processor 81;
[0228] The processor 81 is configured to execute the technical solution of the sending device in any of the foregoing method embodiments by executing the executable instructions.
[0229] Optionally, the memory 82 can be either standalone or integrated with the processor 81.
[0230] Optionally, when the memory 82 is a device independent of the processor 81, the electronic device 80 may further include:
[0231] Bus 84, memory 82 and communication interface 83 are connected to processor 81 through bus 84 and complete communication with each other. Communication interface 83 is used to communicate with other devices.
[0232] Optionally, the communication interface 83 can be implemented using a transceiver. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write databases, and read-only databases). The memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk drive.
[0233] Bus 84 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0234] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0235] The electronic device is used to execute the technical solution of the sending device in any of the foregoing method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0236] Figure 9 A schematic diagram of the structure of an electronic device provided in this application Figure 2 .like Figure 9 As shown, the electronic device 90 includes:
[0237] Processor 91, memory 92, and communication interface 93;
[0238] The memory 92 is used to store the executable instructions of the processor 91;
[0239] The processor 91 is configured to execute the technical solution of the receiving device in any of the foregoing method embodiments by executing the executable instructions.
[0240] Optionally, the memory 92 can be either standalone or integrated with the processor 91.
[0241] Optionally, when the memory 92 is a device independent of the processor 91, the electronic device 90 may further include:
[0242] Bus 94, memory 92 and communication interface 93 are connected to processor 91 through bus 94 and complete communication with each other. Communication interface 93 is used to communicate with other devices.
[0243] Optionally, the communication interface 93 can be implemented using a transceiver. The communication interface is used to enable communication between the database access device and other devices (e.g., clients, read-write databases, and read-only databases). The memory may include random access memory (RAM) and may also include non-volatile memory, such as at least one disk drive.
[0244] Bus 94 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of representation, only one thick line is used in the diagram, but this does not indicate that there is only one bus or one type of bus.
[0245] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0246] The electronic device is used to execute the technical solution of the receiving device in any of the aforementioned method embodiments. Its implementation principle and technical effect are similar, and will not be described again here.
[0247] This application also provides a readable storage medium storing a computer program thereon, which, when executed by a processor, implements the technical solutions provided in any of the foregoing method embodiments.
[0248] This application also provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the technical solutions provided in any of the foregoing method embodiments.
[0249] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0250] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A method for transmitting encrypted messages, characterized in that, Applied to a sending device, the method includes: A target PUF stimulus response pair is randomly selected from the pre-stored target set of physically unclonable PUF stimulus response pairs containing unlabeled PUF stimulus response pairs with used identifiers; the PUF stimulus response pairs in the target set are generated using the PUF chip. The stimulus data or response data in the target PUF stimulus-response pair is determined to be encrypted data; The encrypted data is XORed with the initial key stored in the data to generate the target key. The first preset number of digits in the encrypted data of the target PUF stimulus response pair are converted into hexadecimal to obtain the process key; The process key is used to encrypt the message to be sent stored in the device to obtain an encrypted message; The target key, the encrypted message, and the device identifier of the sending device are sent to the receiving device.
2. The method according to claim 1, characterized in that, The method further includes: When the sending device is first started, the PUF chip is used to generate multiple PUF stimulus response pairs to be grouped; The plurality of PUF stimulus-response pairs to be grouped are grouped to obtain a plurality of PUF stimulus-response pair sets; Randomly select one PUF stimulus response pair set from the plurality of PUF stimulus response pair sets as the PUF stimulus response pair target set; The target set has been labeled with an identifier for the PUF stimulus response; The device identifier of the sending device and the target set of the PUF stimulus response are sent to the receiving device.
3. The method according to claim 1, characterized in that, The method further includes: From the multiple stored PUF stimulus response pair sets, randomly select one set of PUF stimulus response pairs that is not marked with the used identifier, and use it as the PUF stimulus response pair update set; The target set of the PUF stimulus response pairs is XORed with the updated set of the PUF stimulus response pairs to obtain the encrypted set of PUF stimulus response pairs. The set of tags for updating the PUF stimulus response has been marked with an identifier; Update the target set of PUF stimulus-response pairs to the set of PUF stimulus-response pairs to be updated; The device identifier of the sending device and the encrypted set of the PUF stimulus response pair are sent to the receiving device.
4. A method for transmitting encrypted messages, characterized in that, Applied to a receiving device, the method includes: The receiver receives a target key, an encrypted message, and a device identifier of the sending device, wherein the target key and the encrypted message are obtained based on the encrypted message transmission method described in claim 1. The encrypted message is verified based on the device identifier to obtain a first verification result; the first verification result is used to indicate whether the verification passed or failed. If the first verification result indicates that the verification is successful, a verification key is generated based on the target key and the first decryption key corresponding to the device identifier. The first decryption key is the same as the initial key stored in the sending device. The encrypted message is verified according to the verification key to obtain a second verification result, which is used to indicate whether the verification passed or failed. If the second verification result indicates that the verification is successful, the encrypted message is decrypted using the verification key to obtain the target message, which is the same as the message to be sent stored in the sending device.
5. The method according to claim 4, characterized in that, The step of verifying the encrypted message based on the device identifier to obtain a first verification result includes: Based on the device identifier, determine whether the device identifier has a corresponding Physically Unclonable Function (PUF) stimulus-response pair target set; If the device identifier has a corresponding PUF stimulus response pair target set, a first verification result is generated to indicate that the verification has passed. If the device identifier does not have a corresponding PUF stimulus response pair target set, a first verification result is generated to indicate that the verification failed.
6. The method according to claim 4, characterized in that, The step of generating a verification key based on the target key and its own stored first decryption key includes: The target key is XORed with the first decryption key to obtain the verification key.
7. The method according to claim 4, characterized in that, The step of verifying the encrypted message according to the verification key to obtain a second verification result includes: Determine whether the verification key exists in the target set of PUF stimulus response pairs corresponding to the device identifier; If the verification key is not present in the target set of the PUF stimulus response pairs corresponding to the device identifier, a second verification result is generated to indicate that the verification failed. If the verification key exists in the target set of PUF stimulus response pairs corresponding to the device identifier, then determine whether the verification key in the target set of PUF stimulus response pairs is marked as used. If the PUF stimulus response does not mark the verification key in the target set as used, a second verification result is generated to indicate that the verification has passed. If the PUF stimulus response has used an identifier for the verification key tag in the target set, a second verification result is generated to indicate that the verification failed.
8. The method according to claim 4, characterized in that, The step of decrypting the encrypted message using the verification key to obtain the target message includes: The first preset number of digits of the verification key are converted into hexadecimal to obtain the second decryption key; The encrypted message is decrypted using the second decryption key to obtain the target message.
9. The method according to claim 4, characterized in that, The method further includes: Receive the device identifier of the sending device and the target set of PUF stimulus response pairs sent by the sending device; After establishing a correspondence between the device identifier and the target set of the PUF excitation response pair, the data is stored.
10. The method according to claim 4, characterized in that, The method further includes: Receive the device identifier of the sending device and the PUF stimulus response pair encryption set sent by the sending device; Using the target set of PUF stimulus response pairs corresponding to the device identifier, the encrypted set of PUF stimulus response pairs is decrypted to obtain the decrypted set of PUF stimulus response pairs. Update the target set of PUF stimulus-response pairs to the decryption set of PUF stimulus-response pairs.
11. An encrypted message transmission device, characterized in that, The device includes: The acquisition module is used to select a target PUF stimulus response pair from the PUF stimulus response pairs without the used identifier in the pre-stored target set of physically unclonable PUF stimulus response pairs; the PUF stimulus response pairs in the target set are generated using the PUF chip; Processing module, used for: The stimulus data or response data in the target PUF stimulus-response pair is determined to be encrypted data; The encrypted data is XORed with the initial key stored in the data to generate the target key. The first preset number of digits in the encrypted data of the target PUF stimulus response pair are converted into hexadecimal to obtain the process key; The process key is used to encrypt the message to be sent stored in the device to obtain an encrypted message; The sending module is used to send the target key, the encrypted message, and the device identifier of the sending device to the receiving device.
12. An electronic device, characterized in that, include: Processor, memory, communication interface; The memory is used to store the executable instructions of the processor; The processor is configured to execute the encrypted message transmission method according to any one of claims 1 to 3 by executing the executable instructions.
13. An electronic device, characterized in that, include: Processor, memory, communication interface; The memory is used to store the executable instructions of the processor; The processor is configured to execute the encrypted message transmission method according to any one of claims 4 to 10 by executing the executable instructions.
14. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the encrypted message transmission method according to any one of claims 1 to 10.
15. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, is used to implement the encrypted message transmission method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Method and device for authenticating equipment
CN108173662A
Parallel bus data transmission method and device thereof
CN112699393A