Firefighting Internet of Things secure communication method based on random challenge and dynamic round key
By adopting a secure communication method based on random challenges and dynamic round keys in fire-fighting IoT devices, the problems of imperfect device authentication and insufficient data transmission security are solved, and an efficient and secure communication solution is realized, which is suitable for fire-fighting IoT devices.
Patent Information
- Application Number
- CN202411707655.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Fire IoT devices face problems in terms of communication security, inadequate equipment authentication, insufficient data transmission security, and communication efficiency and complexity.
A secure communication method based on random challenges and dynamic round keys is adopted to ensure equipment authentication and data transmission security through multi-level security mechanisms. Specific steps include device registration, authentication application and response, authentication authentication and response, and data secure transmission.
It enhances the anti-forgery capability of the equipment, improves the security and efficiency of data transmission, and is suitable for resource-constrained IoT devices, reduces resource consumption and improves communication efficiency.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fire protection Internet of Things security communication, and in particular to a fire protection Internet of Things security communication method based on random challenges and dynamic round keys. Background Art
[0002] With the rapid development of Internet of Things (IoT) technology, fire protection IoT plays an increasingly important role in fire prevention and control and emergency rescue. Fire protection IoT equipment usually communicates with the fire protection IoT platform through wired / wireless networks. There are two main types of system applications: one is that fire prevention and control applications transmit the operating status information of fire protection facilities (alarm, fault, shielding, etc.) to the application support platform through fire protection IoT equipment such as user information transmission devices and fire protection information collection devices to realize fire monitoring and early warning; the other is to collect personnel information (vital signs, location, etc.), environmental information (hazardous chemical concentration, meteorological information, etc.), equipment information (vehicle location, chassis, upper installation information, etc.) and other data at the emergency rescue site and transmit it back to the on-site command center to realize intelligent command and dispatch.
[0003] However, with the increase in the number of devices and the complexity of network communications, fire IoT devices face a series of challenges in communication security:
[0004] (1) Imperfect device authentication: IoT devices may face the risk of being forged or illegally accessed. If unauthorized devices are able to access the system, it will pose a serious threat to fire safety;
[0005] (2) Data transmission security: In the fire IoT system, such as the urban fire remote monitoring system, the message transmission of the equipment is still in the form of plain text messages, which are vulnerable to attacks such as eavesdropping and tampering, and cannot ensure the confidentiality, integrity and authenticity of the data;
[0006] (3) Communication efficiency and complexity: Existing encryption and authentication mechanisms are often too complex, increasing the computing burden of devices. Especially for IoT devices with limited resources, a lightweight and effective secure communication solution is needed.
[0007] In existing technologies, the following technical solutions are usually used to ensure the secure communication of IoT devices:
[0008] (1) Authentication method based on the unique device identifier DeviceID and application key: IoT systems often authenticate devices by verifying the consistency of DeviceID and application key appkey. However, since DeviceID and appkey are usually stored in plain text in the device, and some weak links in the communication process may cause the application key to be leaked, leading to the access of illegal devices;
[0009] (2) Encrypted communication based on symmetric keys: Many IoT systems use symmetric key encryption algorithms (such as AES) to encrypt data transmission between devices and platforms. Devices and platforms share the same key and use the key to encrypt and decrypt communication data. The advantage of this solution is that it has fast encryption speed and is suitable for devices with limited resources. However, the key distribution and management process can easily become a weak link in attacks. Once the key is leaked, the security of communication will no longer exist.
[0010] (3) Authentication and encryption based on asymmetric encryption: Some IoT systems with high security requirements use public key infrastructure (PKI) for device authentication. Devices use public and private key pairs to authenticate their identities and use asymmetric encryption algorithms (such as RSA or ECC) to protect data transmission security. This solution has high security, but due to the high computational complexity of asymmetric encryption, it increases power consumption and communication delays for IoT devices with limited processing power.
[0011] (4) Lightweight encryption schemes based on pre-shared keys: In some resource-constrained scenarios, in order to reduce the computing burden of devices, the existing technology proposes lightweight encryption schemes based on pre-shared keys. These schemes usually rely on devices and platforms to share keys through secure channels during the first communication. However, the security of such schemes is highly dependent on the initial key distribution process. If the initial key distribution is attacked, the entire communication process will be at risk, and there is a lack of effective ways to update the keys. Summary of the invention
[0012] In view of the above shortcomings and deficiencies, the present invention provides a fire Internet of Things security communication method based on random challenges and dynamic round keys, which ensures the authentication and data transmission security of fire Internet of Things devices through a multi-level security mechanism.
[0013] In order to achieve the above-mentioned purpose, the main technical solution adopted by the present invention is a fire protection Internet of Things security communication method based on random challenge and dynamic round key, comprising the following steps:
[0014] S1. Registration: The fire IoT device is registered on the fire IoT platform. The device registration information includes the device ID, device name, and device owner. After the platform saves the above information, it generates Q random challenges {C0, C1,…,C Q-1}, the device responds to each random challenge C i Generate Response R i =PUF(C i ) and save the platform public key PK P , the platform saves Q random challenge responses Set CR={(C0,R0), (C1,R1),…, (C Q-1 ,R Q-1 )} for subsequent authentication;
[0015] S2. Authentication application and response: The device generates a temporary public-private key pair and a random number, encrypts the authentication application message with the platform public key, and uses the random number as the digest key to generate the authentication application message digest, and sends the authentication application ciphertext and the authentication application message digest together as the authentication application message to the platform; after the platform decrypts the authentication application message, it verifies the message integrity and determines whether the device DeviceID is a legally registered device. If so, it generates a random number and generates an authentication application response message, encrypts it with the device's temporary public key, calculates the digest, and sends the authentication application response message to the device;
[0016] The specific steps include:
[0017] S201, the device sends an authentication request message: the device generates a temporary public key and private key pair (PK D , SK D ) and generate an authentication application message M D_AA , M D_AA =(code||DeviceID||PK D ||r D ||t D ), where code is the status code, DeviceID is the unique device identifier, D A random number generated for the device, t D Device timestamp; device uses platform public key PK P Device authentication request message M D_AA Encrypt the authentication application ciphertext E D_AA =Encrypt(M D_AA ,PK P ), for E D_AA Calculate the authentication application ciphertext digest X D_AA =HMAC(r D , E D_AA ), the device sends an authentication request message to the platform (E D_AA , X D_AA );
[0018] S202, the platform responds to the authentication request message: The fire protection Internet of Things platform receives the authentication request message (E D_AA , X D_AA ) and use the platform private key SK P Decrypt and get the authentication request message M D_AA =(code||DeviceID||PK D ||r D||t D ), after decryption is completed, first use the device random number r D and authentication application ciphertext summary X D_AA Verify message authentication application ciphertext E D_AA Integrity, if the verification fails, it is discarded; if the verification succeeds, the device timestamp t is determined D With the current time t now Difference, if t now -t D If it is greater than the threshold Δt, the message request is judged to have timed out and a timestamp verification timeout message is replied;
[0019] If the message has not timed out, the device ID is used to determine whether it is a legally registered device. If it is an illegal device, a device verification failure message is sent. After the platform determines that the device is legal, the platform timestamp t is obtained. P , generate platform random number r P , the platform generates an authentication request response message M P_AR =(code||r P ||t P ), using the device temporary public key PK D Response message M to authentication request P_AR Encrypt the authentication request response ciphertext E P_AR =Encrypt(M P_AR , PK D ), calculate the digest X of the authentication request response ciphertext P_AR =HMAC(r D , E P_AR ) , send a start authentication request response message to the device (E P_AR , X P_AR );
[0020] S3, authentication and response: After receiving the start authentication request response message, the device verifies the message integrity and decrypts it to obtain the platform random number. The random challenge sequence number is calculated based on the random numbers generated by the device and the platform to determine the random challenge for authentication. The device generates the corresponding response R based on the random challenge for authentication using the PUF physical unclonable function. D , encrypt the authentication message generated by the device and calculate the ciphertext digest before sending it to the platform; after the platform verifies the message integrity and decrypts the authentication message, the random response R obtained by the random response sequence number i With R D Compare and determine whether the device has passed the authentication. If so, generate a session SessionID and an authentication success message. After encrypting the authentication success message with the device's temporary public key, send it to the device to complete the device authentication.
[0021] The specific steps include:
[0022] S301, the device receives the platform's start authentication application response message (E P_AR , X P_AR ) and then through the summary X P_AR Verify the authentication request response ciphertext E P_AR Integrity, if the verification fails, the summary verification failure message is replied; if the verification passes, the private key SK is used D After decrypting the message, the authentication request response message M is obtained. P_AR =Decrypt(E P_AR , SK D ), that is, we get M P_AR =(code||r P ||t P ), decrypted to get M P_AR After verification, whether it has timed out, if t now -t P If it is greater than the threshold Δt, it is judged as a timed-out request and a timestamp verification timeout message is sent back;
[0023] The device calculates the random challenge number i = (r P + r D )mod Q, and then from the random challenge set {C0, C1,…,C Q-1} Determine the random challenge C for authentication i , the device calculates the response R according to the physical unclonable function D =PUF(C i );
[0024] The device generates an authentication message M and sends it back to the platform D_AC =(code||DeviceID||R D ||t D ), through the platform's public key pair M D_AC Encrypt to get the authentication ciphertext E D_AC =Encrypt(M D , PK P ), for E D_AC Calculate the authentication ciphertext summary X D_AC =HMAC(r D , E D_AC ), send authentication message to the platform (E D_AC , X D_AC );
[0025] S302, the platform receives the authentication message (E D_AC , X D_AC ) first use X D_AC and rD Verify message integrity and discard if verification fails;
[0026] Determine the device timestamp t D With the current time t now Difference, if t now -t D If it is greater than the threshold Δt, it is judged as a timed-out request and a timestamp verification timeout message is sent back;
[0027] If the message has not timed out, then for R D To verify, calculate the random response number i = (r P + r D ) mod Q, from the set of random challenge responses {(C0,R0), (C1,R1),…, (C Q-1 ,R Q-1 )}Get the random challenge response with sequence number i (C i , R i ), judge R i With R D If they are not equal, the authentication failure message is sent to the device; if they are equal, the authentication is passed and an authentication success message M is generated. P_AS =(code||SessionID||t P ), where SessionID is the unique identifier of the session between the platform and the device within the time range of this authentication, using the device public key PK D For the authentication success message M P_AS Encrypted authentication success ciphertext E P_AS =Encrypt((M P_AS , PK D ), calculate the successful authentication ciphertext summary to get X P_AS =HMAC(r D , E P_AS ), send an authentication success message to the device (E P_AS , X P_AS );
[0028] S4. Secure data transmission: The device and the platform use the HMAC-based key derivation function to generate the session key K based on the two random numbers generated by both parties, and calculate the round key based on the session key K. The communication between the device and the platform uses the lightweight PRESENT block cipher algorithm, and the round key is used to encrypt the data and send it to the other party to achieve secure message transmission;
[0029] Specifically: After the device authentication is successful, both the device and the platform will use the random number r D and r P, use the HMAC-based key derivation function to generate the session key K; the device and the platform respectively maintain the message sequence number SEQ for this session, SEQ starts from 0, and increases by 1 for each message sent. The number of messages in a round between the device and the platform is N, and each N messages is a round. The data encryption algorithm uses the PRESENT block cipher algorithm with a key length of 80 bits. The round key is used to encrypt the data for transmission. The round keys of the device and the platform are the same within a round.
[0030] The round key is used to encrypt the data for transmission. The device and platform calculate the round key RK as follows: RK=(((K< <c) mod 2 128 ) | (K>>(128-c)))>>48 mod 2 80 ; where c = HMAC(r D ,⌊SEQ / N⌋ + r D +r P ) mod 128, SEQ is the serial number maintained by the device and platform respectively; specifically includes the following steps:
[0031] S401, equipment prepares for data transmission:
[0032] The device generates a device service information message M to be sent D_BD = (code||DeviceID||Data D ), Data D For the service data generated by the device, the round key RK=RK D Treat the sent message M D_BD Encrypt to obtain the device business information ciphertext E D_BD = LightweightEncrypt(M D_BD , RK), the device service information message sent by the device to the platform is: (SessionID, SEQ D , E D_BD ), where SEQ D The serial number maintained by the device is incremented by 1 each time a message is sent;
[0033] S402, the platform receives a message sent by the device: the platform receives a device service information message (SessionID, SEQ D , E D_BD ), according to SessionID, obtain the device ID and session key K from the maintained session list, and calculate the round key according to the session key K, using the round key RK=RK D For E D_BD DecryptionLightweightDecrypt(ED_BD , RK D ) Get device service information message M D_BD = (code||DeviceID||Data D ) ; Verify M D_BD Check whether the timestamp has timed out. If so, reply with a message that the device has timed out. If not, check whether the DeviceID is legal. If not, reply with an error message to the device. If the device is legal, check the device's business data based on the code. D to process;
[0034] S403, the platform replies to the device: the platform generates a platform service information message M to be replied P_BD = (code||t P ||Data P ), using the platform round key RK=RK P To M P_BD Encryption yields: E P_BD = LightweightEncrypt(M P_BD , RK), the platform service information message that the platform replies to the device is (SessionID, SEQ P , E P_BD ), the platform sends this message to the device and updates SEQ P =SEQ P +1;
[0035] S404, the device parses the platform reply message: the device receives the platform service information message (SessionID, SEQ P ,E P_BD ), decrypt LightweightDecrypt(E P_BD , RK) to get M P_BD = (code||t P ||Data P ), verify M P_BD Check whether the timestamp has timed out. If so, the reply message will be timed out. If not, the platform's business data will be processed according to the code. P to be processed.
[0036] Platform public key PK P When the usage time limit is reached, the key needs to be replaced and a new public key and private key pair (PK' P , SK' P ), the device sends a platform key update detection message to the platform, and the platform generates a key update message M P_UK = (code||t P ||PK'P ), the platform targets this M P_UK Sign and get Sig P =Sign(M P_UK ,SK P ), (M P_UK , Sig P ) is sent to the device, and the device verifies the message signature based on the platform public key (PK P , M P_UK , Sig P ), after the signature verification is passed, the device obtains the public key PK' newly generated by the platform P , complete the platform key update.
[0037] The present invention has the following beneficial effects and advantages:
[0038] (1) During device authentication, both the device and the platform use asymmetric encryption to encrypt and transmit authentication data, and use the HMAC digest method to ensure message integrity. The platform does not need to store the device public key. A physical unclonable function (PUF) is introduced in the authentication process. The platform randomly selects a challenge from the stored challenge response set for authentication. The device does not need to save the response in advance, but only generates a unique device response through the random challenge of the corresponding platform, thereby enhancing anti-counterfeiting capabilities;
[0039] (2) The session key generation can be completed between the encrypted communication device and the platform during the authentication process, and the round key mechanism is used to encrypt the business data using dynamic keys. The encryption algorithm adopts the PRESENT lightweight encryption algorithm to improve encryption efficiency and security. Compared with traditional solutions, this technical solution has excellent performance in security, energy consumption and efficiency. It is suitable for low-power devices in the Internet of Things environment, reduces resource consumption, and greatly improves communication efficiency while ensuring system security. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is the registration process of the fire protection Internet of Things device of the present invention on the fire protection Internet of Things platform;
[0041] Figure 2 It is the device authentication and session key generation process of the present invention;
[0042] Figure 3 It is the data security transmission process of the present invention;
[0043] Figure 4 It is to obtain the stored related authentication information list according to DeviceID. DETAILED DESCRIPTION
[0044] The present invention will be further described below in conjunction with the accompanying drawings. Figures 1 to 4As shown, the present invention is a fire protection Internet of Things security communication method based on random challenges and dynamic round keys, comprising the following steps:
[0045] S1. Registration: The fire IoT device is registered on the fire IoT platform. The device registration information includes the device unique identifier DeviceID, device name DeviceName, and device owner DeviceOwner. After the platform saves the above information, it generates Q random challenges {C0, C1,…,C Q-1}, the device responds to each random challenge C i Generate Response R i =PUF(C i ) and save the platform public key PK P , the platform saves Q random challenge responses Set CR ={(C0,R0), (C1,R1),…, (C Q-1 ,R Q-1 )} for subsequent authentication.
[0046] like Figure 2 As shown, S2, authentication application and response:
[0047] S201, the device sends an authentication request message:
[0048] The public key method is used to encrypt data between devices and platforms. Specifically, the lattice-based public key encryption algorithm NTRU (N-th degree truncated polynomial ring units) can be used. The NTRU public key encryption algorithm defines the following parameters: (1) N: the order of the polynomial; (2) p and q: p is a small integer, q is a large integer, and p and q are relatively prime; (3) f and g: N-order private key polynomials, f is reversible under both modulus p and modulus q. Therefore, the public key and private key are: private key SK = (f, g), public key PK = p * q * f q -1 modq.
[0049] The encryption process is represented by Encrypt(M, PK). The encryption process for plaintext M is: ciphertext E=r*PK+M modq, where r is the random polynomial generated by the encryption party. The decryption process is represented by Decrypt(E, SK). The decryption process for ciphertext E is: (1) private key SK=(f, g), initial decryption a=f*E mod q; (2) message restoration b=amod p; (3) plaintext message M= f q -1 *b mod p.
[0050] The device generates a temporary public key and private key pair (PK D , SK D ), and generate the authentication request message M D , M D =(code||DeviceID||PK D ||r D ||t D ), where code is the status code, DeviceID is the unique device ID, r D A random number generated for the device, t D Device timestamp; device uses platform public key PK P Device authentication request message M D_AA Encrypt the authentication application ciphertext E D_AA =Encrypt(M D_AA ,PK P ), in order to ensure E D_AA The message integrity is calculated by using the HMAC algorithm and using r D As the key of the HMAC algorithm, for E D_AA Calculate the authentication application ciphertext digest X D_AA =HMAC(r D ,E D_AA ), the device sends an authentication request message to the platform (E D_AA , X D_AA );
[0051] S202, the platform responds to the authentication request message: The fire protection Internet of Things platform receives the authentication request message (E D_AA , X D_AA ) and use the platform private key SK P Decrypt M D_AA =Decrypt(E D_AA ,SK P ), that is, the authentication application message M is obtained D_AA =(code||DeviceID||PK D ||r D ||t D ), after decryption is completed, first use the device random number r D and authentication application ciphertext summary X D_AA Verify E D_AA Integrity, if the verification fails, it is discarded; if the verification succeeds, the device timestamp t is determined D With the current time t now Difference, if t now -t D If it is greater than the threshold Δt, the message is considered to have timed out and the request is discarded;
[0052] If the message has not timed out, the device ID is used to determine whether it is a legally registered device. If it is an illegal device, a device verification failure message is sent. After the platform determines that the device is legal, the platform timestamp t is obtained. P , generate platform random number r P , the platform generates an authentication request response message M P_AR =(code||r P ||t P ), using the device temporary public key PK D Response message M to authentication request P_AR Encrypt the authentication request response ciphertext E P_AR =Encrypt(M P_AR , PK D ), calculate the digest X of the authentication request response ciphertext P_AR =HMAC(r D , E P_AR ) , send a start authentication request response message to the device (E P_AR , X P_AR ).
[0053] like Figure 2 As shown, S3, authentication and response:
[0054] S301, the device receives the platform's start authentication application response message (E P_AR , X P_AR ) and then through X P_AR Verify the authentication request response ciphertext E P_AR Integrity, if the verification fails, the summary verification failure message is replied; if the verification passes, the private key SK is used D After decrypting the message, the authentication request response message M is obtained. P_AR =Decrypt(E P_AR , SK D ), that is, we get M P_AR =(code||r P ||t P ), decrypted to get M P_AR After verification, whether it has timed out, if t now -t P If it is greater than the threshold Δt, it is judged as a timed-out request and a timestamp verification timeout message is sent back;
[0055] The device calculates the random challenge number i = (r P + r D) mod Q, and then from the random challenge set {C0, C1,…,C Q-1} Determine the random challenge C for authentication i , the device calculates the response R according to the physical unclonable functionD =PUF(C i );
[0056] The device generates an authentication message M and sends it back to the platform D_AC =(code||DeviceID||R D ||t D ), authenticate the authentication message M through the platform's public key D_AC Encrypt to get the authentication ciphertext E D_AC =Encrypt(M D , PK P ), for E D Calculate the authentication ciphertext summary X D_AC =HMAC(r D , E D_AC ), send an authentication message to the platform (E D_AC , X D_AC );
[0057] S302, the platform receives the authentication message (E D_AC , X D_AC ) first use X D_AC and r D Verify message integrity and discard if verification fails;
[0058] Determine the device timestamp t D With the current time t now Difference, if t now -t D If it is greater than the threshold Δt, it is judged as a timed-out request and a timestamp verification timeout message is sent back;
[0059] If the message has not timed out, then for R D Verify and obtain the stored authentication information according to DeviceID (see Figure 4 ), calculate the random response pair number i = (r P + r D )mod Q, from the set of random challenge responses {(C0,R0), (C1,R1),…, (C Q-1 ,R Q-1 )}Get the random challenge response with sequence number i (C i , R i ), judge R i With R D If they are not equal, the authentication failure message is sent to the device; if they are equal, the authentication is passed and an authentication success message M is generated. P_AS =(code||SessionID||t P), where SessionID is the unique identifier of the session between the platform and the device within the time range of this authentication, using the device public key PK D For the authentication success message M P_AS Encrypted authentication success ciphertext E P_AS =Encrypt(M P_AS , PK D ), calculate the successful authentication ciphertext summary to get X P_AS =HMAC(r D , E P_AS ), send an authentication success message to the device (E P_AS , X P_AS ).
[0060] S4. Secure data transmission: The device and the platform use the HMAC-based key derivation function to generate the session key K based on the two random numbers generated by both parties, and calculate the round key based on the session key K. The communication between the device and the platform uses the lightweight PRESENT block cipher algorithm, and the round key is used to encrypt the data and send it to the other party to achieve secure message transmission.
[0061] Specifically: After the device authentication is successful, both the device and the platform will use the random number r D and r P , use the HMAC-based key derivation function to generate the session key K=HKDF(r D , r P ) The device and the platform respectively maintain a message sequence number SEQ for this session. SEQ starts from 0 and increases by 1 for each message sent. The number of messages in a round between the device and the platform is N, and every N messages is a round. The data encryption algorithm uses the PRESENT block cipher algorithm with a key length of 80 bits. The round key is used to encrypt data for transmission. The round keys of the device and the platform are the same within a round.
[0062] The PRESENT algorithm has extremely low hardware implementation complexity and high security. Encryption is represented by LightweightEncrypt. The encryption process performs an initial key XOR on the plaintext group, and performs S-box substitution and P-box replacement. The ciphertext is obtained by XORing the round key generated by the round key RK scheduling. Decryption is represented by LightweightDecrypt.
[0063] The round key is used to encrypt the data for transmission. The device and platform calculate the round key RK as follows: RK=(((K< <c) mod 2 128 ) | (K>>(128-c)))>>48 mod 2 80 ; where c = HMAC(rD ,⌊SEQ / N⌋ + r D +r P ) mod 128, SEQ is the serial number maintained by the device and platform respectively;
[0064] The specific steps include:
[0065] S401, equipment prepares for data transmission:
[0066] The device generates a device service information message M to be sent D_BD = (code||t D ||Data D ), Data D For the service data generated by the device, the round key RK=RK D Treat the sent message M D Encrypt to obtain the device business information ciphertext E D_BD = LightweightEncrypt(M D_BD , RK), the device service information message sent by the device to the platform is: (SessionID,SEQ D , E D_BD ), where SEQ D The serial number maintained by the device is incremented by 1 each time a message is sent;
[0067] S402, the platform receives a message sent by the device: the platform receives a device service information message (SessionID, SEQ D , E D_BD ), according to SessionID, obtain the device ID and session key K from the maintained session list, and calculate the round key according to the session key K, using the round key RK=RK D For E D_BD DecryptionLightweightDecrypt(E D_BD , RK D ) Get device service information message M D_BD = (code||DeviceID||Data D ) ; Verify M D_BD Check whether the timestamp has timed out. If so, reply with a message that the device has timed out. If not, check whether the DeviceID is legal. If not, reply with an error message to the device. If the device is legal, check the device's business data based on the code. D to process;
[0068] S403, the platform replies to the device: the platform generates a platform service information message M P_BD= (code||t P ||Data P ), using the platform round key RK=RK P Encrypt the message to get: E P_BD = LightweightEncrypt(M P_BD ,RK), the platform replies to the device with the platform service information message (SessionID, SEQ P , E P_BD ), the platform sends this message to the device and updates SEQ P =SEQ P +1;
[0069] S404, the device parses the platform reply message: the device receives the platform service information message (SessionID, SEQ P ,E P_BD ), decrypt LightweightDecrypt(E P_BD , RK) to get M P_BD = (code||t P ||Data P ), verification message M P_BD Check whether the timestamp has timed out. If so, the reply message will be timed out. If not, the device data will be updated according to the code. P to be processed.
[0070] If the platform public key PK P When the usage time limit is reached, the key needs to be replaced and a new public key and private key pair (PK' P , SK' P ), the device sends a platform key update detection message to the platform, and the platform generates a key update message M P_UK = (code||t P ||PK' P ), the platform targets this M P_UK Sign and get Sig P =Sign(M P_UK ,SK P ), (M P_UK , Sig P ) is sent to the device, and the device verifies the message signature based on the platform public key (PK P ,M P_UK ,Sig P ), after the signature verification is passed, the device obtains the public key PK' newly generated by the platform P , complete the platform key update.
Claims
1. A fire protection Internet of Things secure communication method based on random challenges and dynamic round keys, characterized in that: The following steps are involved: S1. Registration: The fire IoT device is registered on the fire IoT platform. The device registration information includes the device ID, device name, and device owner. After the platform saves the above information, it generates Q random challenges {C0, C1,…,C Q-1 }, the device responds to each random challenge C i Generate Response R i =PUF(C i ) and save the platform public key PK P , the platform saves Q random challenge responses Set CR ={(C0,R0), (C1,R1),…, (C Q-1 ,R Q-1 )} for subsequent authentication; S2. Authentication application and response: The device generates a temporary public-private key pair and a random number, encrypts the authentication application message using the platform public key, and uses the random number as the digest key to generate the authentication application message digest, and sends the authentication application ciphertext and the authentication application message digest together as the authentication application message to the platform; After the platform decrypts the authentication application message, it verifies the message integrity and determines whether the device ID is a legally registered device. If so, it generates a random number and an authentication application response message. It uses the device's temporary public key to encrypt and calculate the digest before sending the authentication application response message to the device. The specific steps include: S201, the device sends an authentication request message: the device generates a temporary public key and private key pair (PK D , SK D ) and generate an authentication application message M D_AA , M D_AA =(code||DeviceID||PK D ||r D ||t D ), where code is the status code, DeviceID is the unique device identifier, D A random number generated for the device, t D Device timestamp; device uses platform public key PK P Device authentication request message M D_AA Encrypt the authentication application ciphertext E D_AA =Encrypt(M D_AA ,PK P ), for E D_AA Calculate the authentication application ciphertext summary X D_AA =HMAC(r D , E D_AA ), the device sends an authentication request message to the platform (E D_AA , X D_AA ); S202, the platform responds to the authentication request message: The fire protection Internet of Things platform receives the authentication request message (E D_AA , X D_AA ) and use the platform private key SK P Decrypt and get the authentication request message M D_AA =(code||DeviceID||PK D ||r D ||t D ), after decryption is completed, first use the device random number r D and authentication application ciphertext summary X D_AA Verify message authentication application ciphertext E D_AA Integrity, if the verification fails, it is discarded; if the verification succeeds, the device timestamp t is determined D With the current time t now Difference, if t now -t D If it is greater than the threshold Δt, the message request is judged to have timed out and a timestamp verification timeout message is replied; If the message has not timed out, the device ID is used to determine whether it is a legally registered device. If it is an illegal device, a device verification failure message is sent. After the platform determines that the device is legal, the platform timestamp t is obtained. P , generate platform random number r P , the platform generates an authentication request response message M P_AR =(code||r P ||t P ), using the device temporary public key PK D Response message M to authentication request P_AR Encrypt the authentication request response ciphertext E P_AR =Encrypt(M P_AR , PK D ), calculate the digest X of the authentication request response ciphertext P_AR = HMAC(r D , E P_AR ) , send a start authentication request response message to the device (E P_AR , X P_AR ); S3, authentication and response: After receiving the start authentication request response message, the device verifies the message integrity and decrypts it to obtain the platform random number. The random challenge sequence number is calculated based on the random numbers generated by the device and the platform to determine the random challenge for authentication. The device generates the corresponding response R based on the random challenge for authentication using the PUF physical unclonable function. D , encrypt the authentication message generated by the device and calculate the ciphertext digest before sending it to the platform; after the platform verifies the message integrity and decrypts the authentication message, the random response R obtained by the random response sequence number i With R D Compare and determine whether the device has passed the authentication. If so, generate a session SessionID and an authentication success message. After encrypting the authentication success message with the device's temporary public key, send it to the device to complete the device authentication. The specific steps include: S301, the device receives the platform's start authentication application response message (E P_AR , X P_AR ) and then through the summary X P_AR Verify the authentication request response ciphertext E P_AR Integrity, if the verification fails, the summary verification failure message is replied; if the verification passes, the private key SK is used D After decrypting the message, the authentication request response message M is obtained. P_AR =Decrypt(E P_AR , SK D ), that is, we get M P_AR =(code||r P ||t P ), decrypted to get M P_AR After verification, whether it has timed out, if t now -t P If it is greater than the threshold Δt, it is judged as a timed-out request and a timestamp verification timeout message is sent back; The device calculates the random challenge number i = (r P + r D )mod Q, and then from the random challenge set {C0, C1,…,C Q-1 } to determine the random challenge C for authentication i , the device calculates the response R according to the physical unclonable function D =PUF(C i ); The device generates an authentication message M and sends it back to the platform D_AC =(code||DeviceID||R D ||t D ), through the platform's public key pair M D_AC Encrypt to get the authentication ciphertext E D_AC =Encrypt(M D , PK P ), for E D_AC Calculate the authentication ciphertext summary X D_AC =HMAC(r D , E D_AC ), send an authentication message to the platform (E D_AC , X D_AC ); S302, the platform receives the authentication message (E D_AC , X D_AC ) first use X D_AC and r D Verify message integrity and discard if verification fails; Determine the device timestamp t D With the current time t now Difference, if t now -t D If it is greater than the threshold Δt, it is judged as a timed-out request and a timestamp verification timeout message is sent back; If the message has not timed out, then for R D To verify, calculate the random response number i = (r P + r D ) mod Q, from the set of random challenge responses {(C0,R0), (C1,R1),…, (C Q-1 ,R Q-1 )}Get the random challenge response with sequence number i (C i ,R i ), judge R i With R D If they are not equal, the authentication failure message is sent to the device; if they are equal, the authentication is passed and an authentication success message M is generated. P_AS =(code||SessionID||t P ), where SessionID is the unique identifier of the session between the platform and the device within the time range of this authentication, using the device public key PK D For the authentication success message M P_AS Encrypted authentication success ciphertext E P_AS =Encrypt((M P_AS , PK D ), calculate the successful authentication ciphertext summary to get X P_AS =HMAC(r D , E P_AS ), send an authentication success message to the device (E P_AS , X P_AS ); S4. Secure data transmission: The device and the platform use the HMAC-based key derivation function to generate the session key K based on the two random numbers generated by both parties, and calculate the round key based on the session key K. The communication between the device and the platform uses the lightweight PRESENT block cipher algorithm, and the round key is used to encrypt the data and send it to the other party to achieve secure message transmission; Specifically: After the device authentication is successful, both the device and the platform will use the random number r D and r P , use the HMAC-based key derivation function to generate the session key K; the device and the platform respectively maintain the message sequence number SEQ for this session, SEQ starts from 0, and increases by 1 for each message sent. The number of messages in a round between the device and the platform is N, and each N messages is a round. The data encryption algorithm uses the PRESENT block cipher algorithm with a key length of 80 bits. The round key is used to encrypt the data for transmission. The round keys of the device and the platform are the same within a round. The round key is used to encrypt the data for transmission. The device and platform calculate the round key RK as follows: RK = (((K << c) mod 2 128 ) | (K >> (128-c))) >> 48 mod 2 80 ; where c = HMAC(r D ,⌊SEQ / N⌋ +r D + r P ) mod 128, SEQ is the serial number maintained by the device and platform respectively; specifically includes the following steps: S401, equipment prepares for data transmission: The device generates a device service information message M to be sent D_BD = (code||DeviceID||Data D ), Data D For the service data generated by the device, the round key RK=RK D Treat the sent message M D_BD Encrypt to obtain the device business information ciphertext E D_BD = LightweightEncrypt(M D_BD , RK), the device service information message sent by the device to the platform is: (SessionID, SEQ D , E D_BD ), where SEQ D The serial number maintained by the device is incremented by 1 each time a message is sent; S402, the platform receives a message sent by the device: the platform receives a device service information message (SessionID, SEQ D , E D_BD ), according to SessionID, obtain the device ID and session key K from the maintained session list, and calculate the round key according to the session key K, using the round key RK=RK D For E D_BD DecryptionLightweightDecrypt(E D_BD ,RK D ) Get device service information message M D_BD = (code||DeviceID||Data D ) ; Verify M D_BD Check whether the timestamp has timed out. If so, reply with a message that the device has timed out. If not, check whether the DeviceID is legal. If not, reply with an error message to the device. If the device is legal, check the device's business data based on the code. D to process; S403, the platform replies to the device: the platform generates a platform service information message M to be replied P_BD = (code||t P ||Data P ), using the platform round key RK=RK P To M P_BD Encryption yields: E P_BD = LightweightEncrypt(M P_BD , RK), the platform service information message that the platform replies to the device is (SessionID, SEQ P , E P_BD ), the platform sends this message to the device and updates SEQ P =SEQ P +1; S404, the device parses the platform reply message: the device receives the platform service information message (SessionID, SEQ P ,E P_BD ), decrypt LightweightDecrypt(E P_BD , RK) to get M P_BD = (code||t P ||Data P ), verify M P_BD Check whether the timestamp has timed out. If so, the reply message will be timed out. If not, the platform's business data will be processed according to the code. P to be processed.
2. The firefighting Internet of Things secure communication method based on random challenges and dynamic round keys according to claim 1 is characterized in that: Platform public key PK P When the usage time limit is reached, the key needs to be replaced and a new public key and private key pair (PK' P , SK' P ), the device sends a platform key update detection message to the platform, and the platform generates a key update message M P_UK =(code||t P ||PK' P ), the platform targets this M P_UK Sign and get Sig P =Sign(M P_UK ,SK P ), (M P_UK , Sig P ) is sent to the device, and the device verifies the message signature based on the platform public key (PK P , M P_UK , Sig P ), after the signature verification is passed, the device obtains the public key PK' newly generated by the platform P , complete the platform key update.
Citation Information
Patent Citations
Internet of things equipment identity authentication method and system based on PUF and CPK algorithms, and storage medium
CN112272094A
Authentication method and device, storage medium and electronic device
CN112565213A