A wireless sensor network authentication method based on a Kyber algorithm, a medium and equipment
By using the Kyber algorithm to generate long-term and temporary key pairs in wireless sensor networks, the security problem of traditional public-key cryptosystems under quantum attacks is solved, and secure communication between users and sensors is realized.
Patent Information
- Application Number
- CN202611428404.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-11-24
AI Technical Summary
Existing wireless sensor networks cannot withstand quantum attacks under traditional public-key cryptography, resulting in insufficient security for communication between users and sensors.
The Kyber post-quantum cryptography algorithm is used to generate long-term key pairs for the gateway, users, and sensors, and authentication is performed by dynamically generating temporary key pairs to ensure end-to-end two-way authentication and encrypted data transmission between users and target sensors.
It enables secure communication between users and target sensors in open channels, resists quantum attacks, ensures that only legitimate users and sensors can establish communication connections, and prevents data transmission from being decrypted by third parties.
Smart Images

Figure CN123164431A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, and in particular to a wireless sensor network authentication method, medium, and device based on the Kyber algorithm. Background Technology
[0002] Wireless Sensor Networks (WSNs) deploy a large number of sensors within a specific area to collect and sense data in environmental, military, medical, and industrial scenarios. A typical WSN system consists of three entities: users, gateways, and sensors. Due to the limited wireless communication coverage of the sensors, the collected data usually needs to be forwarded through a nearby gateway before reaching the remote user. Conversely, when a user needs to access a sensor, they must also initiate a request to the gateway through the public network, which forwards the request, and the sensor then transmits its response data back to the user through the gateway. Therefore, the entire communication process between the user and the sensor takes place in an open channel, making it highly vulnerable to active or passive attacks such as eavesdropping, tampering, and forgery, posing a serious security threat to data transmission.
[0003] Most existing technologies rely on traditional public-key cryptosystems (such as RSA, ECC, bilinear pairing, ElGamal, etc.) to encrypt data transmission. The security of these traditional cryptosystems is based on traditional number theory problems such as large number factorization and discrete logarithm problems. However, these traditional number theory problems can be easily solved on quantum computers.
[0004] Therefore, wireless sensor network authentication based on traditional public-key cryptography in existing technologies faces serious threats, making it impossible for users and sensors to achieve secure communication. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies, the present invention aims to provide a wireless sensor network authentication method, medium, and device based on the Kyber algorithm, which can solve the security problem that traditional public-key cryptosystems based on large integer factorization and discrete logarithms cannot resist quantum attacks in the post-quantum era.
[0006] This invention is implemented according to the following scheme: An authentication method for a wireless sensor network is provided, the wireless sensor network including users, gateways, and sensors, including: The gateway generates a master key and a long-term key pair based on the post-quantum cryptography algorithm Kyber, and generates a user long-term key pair for the user and a sensor long-term key pair for the sensor, respectively. In response to a user-generated authentication request, the gateway determines the target sensor among multiple sensors based on the authentication request; The user, the gateway, and the target sensor perform authentication to generate a session key for encrypting data transmission between the user and the target sensor, including: The user generates a temporary key pair, and the gateway authenticates the user based on the gateway's long-term key pair and the user's long-term key pair; if the gateway successfully authenticates the user, the target sensor authenticates the user and the gateway based on its sensing long-term key pair. If the target sensor successfully authenticates the user and the gateway, the target sensor generates a temporary sensing key pair and generates a first key material based on the user's temporary key pair; the user authenticates the gateway and the target sensor based on the temporary sensing key pair and the first key material; if the user successfully authenticates the gateway and the target sensor, the user generates a session key based on the first key material. The user generates a second key material based on the sensor temporary key pair and sends it to the target sensor via the gateway. If the target sensor authenticates the user, the target sensor generates a session key identical to the user's based on the first key material and the second key material.
[0007] Optionally, the gateway generates a master key and a long-term key pair for the gateway based on the post-quantum cryptography algorithm Kyber, including: The gateway generates a random number and uses the random number as the master key; The gateway invokes the key generation function of the post-quantum cryptography algorithm to generate the gateway's long-term key pair.
[0008] Optionally, the gateway generates a long-term user key pair for the user, including: The gateway receives the user's identity identifier and login password sent by the user through the first secure channel; The gateway determines a user-specific key based on the user identity identifier and the master key, and calculates a first verification value and a second verification value based on the user-specific key; The gateway invokes the key generation function of the post-quantum cryptography algorithm to generate the user's long-term key pair; The gateway sends the first verification value, the second verification value, and the user long-term key pair to the user storage through the first secure channel.
[0009] Optionally, the gateway generates a long-term sensing key pair for the sensor, including: The gateway receives the sensor identification identifier sent by the sensor through the second security channel; The gateway determines the sensor-specific key based on the sensor's identity identifier and the master key; The gateway calls the key generation function of the post-quantum cryptography algorithm to generate the long-term sensing key pair for the sensor; The gateway sends the sensor identity identifier, the sensor-specific key, and the long-term sensing key pair to the sensor storage via the second secure channel.
[0010] Optionally, the gateway determines the target sensor among multiple sensors based on the authentication request, including: Parse the authentication request to obtain the user's identity identifier; The gateway queries the local database based on the user identity identifier and obtains the sensor identity identifier associated with the user identity identifier from the local database; The gateway determines the target sensor and the corresponding target sensor long-term key pair based on the sensor identity identifier.
[0011] Optionally, the gateway long-term key pair includes a gateway long-term public key and a gateway long-term private key; the user long-term key pair includes a user long-term public key and a user long-term private key; the sensor long-term key pair includes a sensor long-term public key and a sensor long-term private key. The user generates a temporary key pair, and the gateway authenticates the user based on the gateway's long-term key pair and the user's long-term key pair; if the gateway successfully authenticates the user, the target sensor authenticates the user and the gateway based on its sensing long-term key pair, including: The user calls the key generation function of the post-quantum cryptography algorithm to generate the user temporary key pair, which includes the user temporary public key and the user temporary private key; The user generates first authentication information based on the user's long-term public key and the user's temporary public key, and then encrypts the first authentication information based on the gateway's long-term public key before sending it to the gateway; The gateway decrypts the first authentication information based on the gateway's long-term private key, and then authenticates the user based on the decrypted first authentication information. If the gateway authenticates the user, the gateway forwards the first authentication ciphertext, which is encrypted by the user's temporary public key, to the target sensor based on the sensor's long-term public key. The target sensor decrypts the first authentication ciphertext based on the sensing long-term private key to obtain the first authentication plaintext, and authenticates the user and the gateway based on the first authentication plaintext.
[0012] Optionally, the target sensor generates a temporary sensing key pair and generates first key material based on the user temporary key pair; the user authenticates the gateway and the target sensor based on the temporary sensing key pair and the first key material, including: The target sensor calls the key generation function of the post-quantum cryptography algorithm to generate the sensor temporary key pair, which includes a sensor temporary public key and a sensor temporary private key. The target sensor calls the key encapsulation operation function of the post-quantum cryptography algorithm and executes the key encapsulation operation function based on the user's temporary public key to generate the first encapsulated ciphertext and the first key material; The target sensor sends a second authentication ciphertext, which is encrypted by the first encapsulated ciphertext, the first key material, and the sensor temporary public key, to the user via the gateway based on the user's temporary public key. The user decrypts the second authentication ciphertext using the user's temporary private key to obtain the second authentication plaintext, and then authenticates the target sensor based on the second authentication plaintext.
[0013] Optionally, the user generates a second key material based on the sensor temporary key pair and sends it to the target sensor via the gateway. If the target sensor authenticates the user, the target sensor generates a session key identical to the user's based on the first key material and the second key material, including: The user calls the key encapsulation operation function of the post-quantum cryptography algorithm and executes the key encapsulation operation function based on the sensor temporary public key to generate the second encapsulated ciphertext and the second key material; The user sends the third authentication ciphertext, which is encrypted by the second encapsulated ciphertext, the second key material, and the sensor temporary public key, to the target sensor via the gateway based on the sensor temporary public key. The target sensor authenticates the user based on the sensor's temporary private key and the third authentication ciphertext; If authentication is successful, the target sensor calls the key derivation function of the post-quantum cryptography algorithm to generate a session key identical to that of the user based on the first key material and the second key material.
[0014] A computer-readable storage medium is also provided, which is a computer-readable storage medium storing a computer program thereon, which, when executed, implements the aforementioned wireless sensor network authentication method based on the Kyber algorithm.
[0015] A computer device is also provided, including a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the processor loads and executes the at least one instruction, at least one program, code set, or instruction set to implement the aforementioned wireless sensor network authentication method based on the Kyber algorithm.
[0016] Compared with existing technologies, the beneficial effects of the wireless sensor network authentication method based on the Kyber algorithm of the present invention are as follows: Long-term key pairs for the gateway, user, and sensor are generated separately based on a post-quantum cryptography algorithm. During the authentication process, temporary key pairs are dynamically generated by the user and the target sensor to resist known quantum attacks. Furthermore, end-to-end bidirectional authentication between the user and the target sensor is achieved through the gateway authenticating the user based on its long-term key pair and the user's long-term key pair; the target sensor authenticating the user and the gateway based on its long-term sensing key pair; the user's reverse authentication of the gateway and the target sensor based on its temporary sensing key pair and a first key material; and the target sensor's final authentication of the user. This ensures that only legitimate users and legitimate sensors can establish a communication connection. Moreover, the user and the target sensor independently generate the same session key, which is shared only between the user and the target sensor. This ensures that the user and the target sensor can perform end-to-end encrypted data transmission based on this session key, preventing decryption by a third party even in open channels, thereby achieving secure communication between the user and the target sensor. Attached Figure Description
[0017] Figure 1 This is a flowchart of the authentication method of the present invention. Detailed Implementation
[0018] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0019] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also understand that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of this application.
[0020] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent 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. In the description of this application, it should be understood that the terms "first," "second," "third," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0021] See Figure 1 As shown, this invention provides a wireless sensor network authentication method based on the Kyber algorithm. The wireless sensor network includes users, gateways, and sensors, and includes: S1: The gateway generates the gateway's master key and long-term key pair based on the post-quantum cryptography algorithm Kyber, and generates user long-term key pairs and sensor long-term key pairs for users and sensors respectively. In one embodiment of the present invention, the gateway generates a master key and a long-term key pair based on the post-quantum cryptography algorithm Kyber, including: the gateway generating a random number and determining the random number as the master key; the gateway calling the key generation function of the post-quantum cryptography algorithm to generate the long-term key pair; specifically, the gateway GWN selects a random number x as the master key and generates the long-term key pair (lpk). g lsk g ), where lpk g lsk is the long-term public key for the gateway. g This is the long-term private key for the gateway.
[0022] In one embodiment of the present invention, the gateway generates a long-term user key pair for the user, including: the gateway receiving a user identity identifier and login password sent by the user through a first secure channel; the gateway determining a user-specific key based on the user identity identifier and master key, and calculating a first verification value and a second verification value based on the user-specific key; the gateway calling a key generation function of a post-quantum cryptography algorithm to generate a long-term user key pair for the user; and the gateway sending the first verification value, the second verification value, and the long-term user key pair to the user's storage through the first secure channel.
[0023] In one embodiment of the present invention, the gateway receives a user identity identifier and login password sent by a user through a first secure channel, including: the user inputs a user identity identifier and login password into the first secure channel, selects a random number, salts the login password based on the user identity identifier and the random number to obtain a salted password hash value; the user identity identifier and the salted password hash value are combined to form user registration information, which is then sent to the gateway through the first secure channel, i.e., the information received by the gateway is user registration information including the user identity identifier and the salted password hash value.
[0024] Specifically, user U i Enter user identification ID into the first secure channel i And login password PW i Then user U i Choose a random number r i Based on user identity ID i and random number r i For login password PW i Salting is performed to obtain the salted password hash value RPW. i =H(ID i ||PW i ||r i Then, the user registration information {ID} i RPW i It is sent to the gateway GWN through the first secure channel.
[0025] In one embodiment of the present invention, calculating a first verification value and a second verification value based on a user-exclusive key includes: calculating a first verification value based on the user-exclusive key and user registration information; calculating a second verification value based on the first verification value; and storing the user information in the local database of the gateway after combining the user identity identifier and the second verification value to form user information.
[0026] Specifically, the gateway GWN receives the user registration information {ID} i RPW i After that, based on the user's identity ID i Together with the master key x, determine the user-specific key K. i =H(ID i ||x); then based on the user-exclusive key K i =H(ID i ||x) User identification ID in user registration information i and the salted password hash value RPW i The calculation yields the first check value A. i =K i ⊕H(ID i||RPW i Next, a hash calculation is performed based on the first checksum to obtain the second checksum B. i =H(A i At this point, the gateway GWN will combine the user's identity identifier and the second verification value to form the user information (ID). i B i The system will store user information in the local database of the gateway GWN.
[0027] In one embodiment of the present invention, the user long-term key pair includes a user long-term public key and a user long-term private key; the gateway calls the key generation function of the post-quantum cryptography algorithm to generate a user long-term key pair for the user, specifically, the gateway GWN calls the key generation function Kyber.KeyGen() of the post-quantum cryptography algorithm to generate a user long-term key pair for the user U. i Generate user long-term key pairs (lpk) i lsk i ), where lpk i lsk is the user's long-term public key. i Provide the user with a long-term private key; In one embodiment of the present invention, the gateway sends a first verification value, a second verification value, and a user long-term key pair to user storage via a first secure channel, including: forming a first response message from the first verification value, the second verification value, and the user long-term key pair; sending the first response message to the user via the first secure channel; the user performing a bitwise XOR operation on the user identity identifier and login password based on a random number of their own selection to obtain a third verification value; finally, forming user storage information from the first response message and the third verification value; and the user storing the user storage information in a smart card to complete user registration; wherein, in a wireless sensor network, the user accesses the wireless sensor network via a smart card.
[0028] Specifically, the first check value A i Second check value B i and user long-term key pairs (lpk) i lsk i The first response information {A} is composed of... i B i , (lpk i lsk i ), lpk i} and sent to user U through the first secure channel i User U i Upon receiving the first reply message {A} from the gateway GWN i B i , (lpk i lsk i ), lpk iAfter that, based on the random number r selected by itself... i User ID i And login password PW i Perform a bitwise XOR operation to obtain the third check value W. i =r i ⊕H(PW i ||ID i Finally, the first reply information {A} i B i , (lpk i lsk i ), lpk i} and the third check value W i The user storage information {W} stored in the smart card i A i B i , (lpk i lsk i ), lpk i After completing user registration, when the user subsequently accesses the wireless sensor network via the smart card, the user does not need to select a random number again; the smart card will automatically generate the number based on the user's ID. i And login password PW i The random number r can then be obtained from the third check value. i .
[0029] In one embodiment of the present invention, the gateway generates a long-term sensing key pair for the sensor, including: the gateway receiving a sensor identity identifier sent by the sensor through a second secure channel; the gateway determining a sensor-specific key based on the sensor identity identifier and the master key; the gateway calling a key generation function of a post-quantum cryptography algorithm to generate a long-term sensing key pair for the sensor; and the gateway sending the sensor identity identifier, the sensor-specific key, and the long-term sensing key pair to the sensor storage through the second secure channel.
[0030] Specifically, sensor S j Input sensor identification ID (SID) to the second secure channel j Sensor Identifier (SID) j The sensor is transmitted to the gateway GWN via a second secure channel, and the gateway identifies the sensor based on its SID. j And the master key x determines the sensor's exclusive key K j = H(SID j ||x); then call the key generation function Kyber.KeyGen() of the post-quantum cryptography algorithm to generate the key for sensor S. j Generate long-term key pairs for sensing (lpk) j lsk j ), where lpk jLSK is used to sense long-term public keys. j The long-term private key for the sensor; the gateway GWN combines the sensor identity identifier, the sensor-specific key, and the long-term key pair to form the sensor storage information {SID}. j K j , (lpk j lsk j The data is transmitted to sensor S via a second secure channel. j The sensor S stores the sensor information in the gateway's local database. j Upon receiving the data, the sensor stores the sensor information into its own memory, thus completing the sensor registration.
[0031] S2: In response to a user-generated authentication request, the gateway determines the target sensor among multiple sensors based on the authentication request, including: parsing the authentication request to obtain the user's identity identifier; the gateway queries a local database based on the user's identity identifier to obtain a sensor identity identifier associated with the user's identity identifier; the gateway determines the target sensor and the target sensor's corresponding long-term key pair based on the sensor identity identifier; in one embodiment of the present invention, the gateway can only obtain the target sensor's long-term public key from the target sensor's long-term key pair.
[0032] In one embodiment of the present invention, the authentication request is automatically generated by the user inserting a smart card; specifically, the user U i After the smart card is inserted into a computer device equipped with the wireless sensor network of this invention, the smart card automatically generates an authentication request, which includes a user identification ID. i After receiving the authentication request, the gateway (GWN) parses it to obtain the user's identity ID. i and according to ID i Query its own local database to retrieve the user's identity ID. i Pre-associated sensor identifiers are used to identify the target sensor and its corresponding long-term public key.
[0033] The present invention performs initial authentication of users through the above step S2. If the initial authentication fails, the gateway directly terminates the authentication session and does not execute subsequent processes. This avoids unregistered or illegal user identities from participating in subsequent processes and avoids performing high-overhead post-quantum cryptographic operations on illegal users, thereby saving network computing resources and communication bandwidth and preventing attackers from using a large number of invalid identities to initiate authentication requests to consume network resources.
[0034] S3: The user, gateway, and target sensor perform authentication to generate a session key for encrypted data transmission between the user and the target sensor. This includes: the user generating a temporary key pair; the gateway authenticating the user based on its long-term key pair and the user's long-term key pair; if the gateway authenticates the user, the target sensor authenticating the user and the gateway based on its long-term sensing key pair; if the target sensor authenticates the user and the gateway, the target sensor generating a temporary sensing key pair and generating a first key material based on the user's temporary key pair; the user authenticating the gateway and the target sensor based on the temporary sensing key pair and the first key material; if the user authenticates the gateway and the target sensor, the user generating a session key based on the first key material; the user generating a second key material based on the temporary sensing key pair and sending it to the target sensor via the gateway; if the target sensor authenticates the user, the target sensor generating the same session key as the user based on the first and second key materials.
[0035] In one embodiment of the present invention, a user generates a temporary user key pair, and a gateway authenticates the user based on a gateway long-term key pair and the user's long-term key pair. If the gateway authenticates the user, the target sensor authenticates the user and the gateway based on its sensing long-term key pair, including: the user calling a key generation function of a post-quantum cryptography algorithm to generate a temporary user key pair, which includes a temporary user public key and a temporary user private key; the user generating first authentication information based on the user's long-term public key and the temporary user public key, encrypting the first authentication information based on the gateway's long-term public key, and sending it to the gateway; the gateway decrypting the first authentication information based on its long-term private key, and authenticating the user based on the decrypted first authentication information; if the gateway authenticates the user, the gateway forwards the first authentication ciphertext encrypted by the user's temporary public key to the target sensor based on its sensing long-term public key; the target sensor decrypting the first authentication ciphertext based on its long-term private key to obtain the first authentication plaintext, and authenticating the user and the gateway based on the first authentication plaintext.
[0036] Specifically, in user U i After the initial authentication in step S2 is successful, the key generation function Kyber.KeyGen() of the post-quantum cryptography algorithm is called to generate the user's temporary key pair (Tpk) for this session. i Tsk i ), where Tpk i Tsk is a temporary public key for users. i Provides a temporary private key for the user.
[0037] This invention generates a session key after the user and gateway have successfully completed two-way authentication. It is not affected by the two-way authentication results between the network and the target sensor, ensuring that the user can generate the session key without relying on the real-time participation of the target sensor. This shortens the authentication response time, improves the user's authentication efficiency, and avoids the user's inability to generate the session key due to target sensor response delay or network interruption.
[0038] In one embodiment of the present invention, a user generates first authentication information based on a user's long-term public key and a user's temporary public key, and encrypts the first authentication information based on a gateway's long-term public key before sending it to the gateway. This includes: the user using the user's long-term public key, the user's temporary public key, and the user's identity identifier as the first authentication information; the user calling the encryption function of a post-quantum cryptography algorithm and the gateway's long-term public key to encrypt the first authentication information and generate a first ciphertext to be sent to the gateway.
[0039] Specifically, user U i User's long-term public key lpk i User temporary public key Tpk i and user identification ID i As the primary authentication information, the encryption function PKE.Enc() of the post-quantum cryptography algorithm and the gateway's long-term public key lpk are invoked. g And select a first encryption random number r1 to encrypt the first authentication information, generating the first ciphertext m1=PKE.Enc(lpkg,(lpk i Tpk i ID i ,r1)).
[0040] In one embodiment of the present invention, the gateway decrypts the first authentication information based on its long-term private key, and authenticates the user based on the decrypted first authentication information. This includes: the gateway calling the decryption function of a post-quantum cryptography algorithm and its long-term private key to decrypt the first ciphertext to obtain the first plaintext; the gateway verifying the first plaintext; if the first plaintext is verified successfully, the gateway authenticates the user successfully; after the gateway authenticates the user successfully, it generates a first response information and sends it to the user; the user verifies the first response information based on their long-term private key; if the first response information is verified successfully, the user authenticates the gateway successfully.
[0041] In one embodiment of the present invention, after the user generates the first ciphertext, a first encrypted random number and the current timestamp are selected for hash calculation to obtain a first hash verification value. The first ciphertext, the first hash verification value, and the current timestamp are combined to form first verification information and sent to the gateway. After receiving the first verification information, the gateway first checks the validity of the timestamp in the first verification information against the timestamp at which the gateway received the first verification information. If the timestamp in the first verification information is valid, the gateway decrypts the first ciphertext in the first verification information based on the decryption function of the post-quantum cryptography algorithm and the gateway's long-term private key to obtain the first plaintext. Then, based on the user identity identifier in the first plaintext, the gateway queries user information in its local database to obtain a second verification value corresponding to the user identity identifier in the first plaintext. The gateway then authenticates the validity of the user's identity based on the user identity identifier, the second verification value, and the gateway's master key.
[0042] Specifically, the first encrypted random number r1 and the current timestamp T1 are hashed to obtain the first hash verification value V1 = H(r1||T1); the first ciphertext m1, the first hash verification value V1, and the current timestamp T1 are combined to form the first verification information {m1, V1, T1} and sent to the gateway GWN; after receiving it, the gateway GWN first checks the validity of the timestamp T1 in the first verification information. If the timestamp T1 is valid, the decryption function PKE.Dec() of the post-quantum cryptography algorithm and the gateway's long-term private key lsk are called. g Decrypting the first ciphertext m1 yields the first plaintext (lpk). i Tpk i ID i ,r1); Gateway GWN based on the first plaintext (lpk) i Tpk i ID i User ID in r1) i The gateway GWN queries its local database to retrieve user information and obtains the second verification value Bi corresponding to the user's identity identifier IDi. Then, the gateway GWN uses the master key x and the user's identity identifier ID... i Verify H(H(ID) i ||x))==B i Is it true? If true, then gateway GWN will communicate with user U. i Authentication successful.
[0043] In one embodiment of the present invention, if the gateway authenticates the user, the gateway forwards the first authentication ciphertext, which is encrypted by the user's temporary public key, to the target sensor based on the sensor's long-term public key. This includes: the gateway selecting a second encrypted random number, calling the encryption function of a post-quantum cryptography algorithm, and encrypting the user's temporary public key, the first encrypted random number, the second encrypted random number, and the user's identity identifier using the target sensor's long-term public key to obtain the first authentication ciphertext; performing a hash calculation based on the sensor's exclusive key and the current timestamp to obtain a second hash verification value; and generating second verification information based on the first authentication ciphertext, the first hash verification value, the second hash verification value, and the current timestamp and sending it to the target sensor.
[0044] Specifically, in the gateway GWN, for user U i After successful authentication, the gateway GWN selects a second random encryption number r2, and calls the encryption function PKE.Enc() of the post-quantum cryptography algorithm along with the target sensor's long-term public key lpk. j For user temporary public key Tpk i First encrypted random number r1, second encrypted random number r2, and user identification ID i Encryption is performed to obtain the first authentication ciphertext m2=PKE.Enc(lpk j , (Tpk i r1, r2, ID i According to the sensor's proprietary key K j The second hash check value V2 is obtained by hashing the current timestamp T2. j ||T2); Based on the first authentication ciphertext m2, the first hash verification value V1, the second hash verification value V2, the timestamp T1 in the first verification information, and the current timestamp T2, the second verification information {m2, V1, V2, T1, T2} is generated and sent to the target sensor S. j .
[0045] In one embodiment of the present invention, the target sensor decrypts the first authentication ciphertext based on the long-term private key of the sensor to obtain the first authentication plaintext, and authenticates the user and the gateway based on the first authentication plaintext, including: after receiving the second verification information including the first authentication ciphertext, the target sensor first verifies the validity of the timestamp in the second verification information and the receiving timestamp of the second verification information received by the target sensor. If the timestamp in the second verification information is valid, the first authentication ciphertext is decrypted based on the decryption function of the post-quantum cryptography algorithm and the target sensor's long-term private key to obtain the first authentication plaintext; then, the target sensor verifies the first hash check value and the second hash check value based on the first authentication plaintext. If the verification is successful, the target sensor authenticates the gateway.
[0046] After the target sensor authenticates the gateway, it selects the third encrypted random number and the current timestamp, executes the key encapsulation operation function of the post-quantum cryptography algorithm based on the user's temporary public key, generates the first encapsulated ciphertext and the first key material, performs FO-T transformation on the first key material, and calculates the third hash check value based on the sensor-specific key, the second encrypted random number and the current timestamp, and calculates the fourth hash check value based on the third encrypted random number, the first encapsulated ciphertext and the current timestamp. The encryption function of the post-quantum cryptography algorithm and the user's long-term public key are used to encrypt the sensor's temporary public key, the first encapsulated ciphertext, the second encrypted random number, the third encrypted random number, and the sensor's identity identifier to obtain the second authentication ciphertext. The second authentication ciphertext, the third hash check value, the fourth check hash value, and the current timestamp are combined to form the third verification information and sent to the gateway. After receiving the second authentication ciphertext, the gateway verifies whether the third check hash value is valid based on the sensor's exclusive key, the second encrypted random number, and the current timestamp. If it is valid, the gateway authenticates the target sensor. A hash calculation is performed based on the second encrypted random value and the current timestamp to obtain the fifth hash verification value. The second authentication ciphertext, the fourth hash verification value, the fifth hash verification value, the timestamp in the third verification information, and the current timestamp are combined to form the fourth verification information. The fourth verification information is then sent to the user as the first response information.
[0047] Specifically, after the target sensor receives the second verification information, it first verifies the validity of the timestamp T2 in the second verification information. If the timestamp T2 is valid, it then calls the decryption function of the post-quantum cryptography algorithm and the target sensor's long-term private key lsk. j Decrypt the first authentication ciphertext m2 in the second verification information to obtain the first authentication plaintext (Tpk). i r1, r2, ID i ); The target sensor is based on the first authentication plaintext (Tpk). i r1, r2, ID i The first encrypted random number r1 and the sensor-specific key K in ) j Verify that the first hash check value V1 == H(r1||T1) and the second hash check value V2 == H(K) j Does ||T2) hold true? If so, then the target sensor S j Gateway GWN authentication passed.
[0048] At this point, the gateway completes authentication of the user, and the target sensor completes authentication of both the user and the gateway.
[0049] In one embodiment of the present invention, the target sensor generates a temporary sensing key pair and generates first key material based on the user's temporary key pair; the user authenticates the gateway and the target sensor based on the temporary sensing key pair and the first key material, including: the target sensor calling the key generation function of a post-quantum cryptography algorithm to generate a temporary sensing key pair, the temporary sensing key pair including a temporary sensing public key and a temporary sensing private key; the target sensor calling the key encapsulation operation function of the post-quantum cryptography algorithm and executing the key encapsulation operation function based on the user's temporary public key to generate a first encapsulated ciphertext and a first key material; the target sensor sending a second authentication ciphertext, encrypted by the first encapsulated ciphertext, the first key material, and the temporary sensing public key, to the user via the gateway based on the user's temporary public key; the user decrypting the second authentication ciphertext based on the user's temporary private key to obtain a second authentication plaintext, and authenticating the target sensor based on the second authentication plaintext.
[0050] In one embodiment of the present invention, the target sensor calls the key generation function of the post-quantum cryptography algorithm to generate a temporary sensing key pair, which includes a temporary sensing public key and a temporary sensing private key; specifically, it calls the key generation function Kyber.KeyGen() of the post-quantum cryptography algorithm to generate the temporary sensing key pair (Tpk) for this session. j Tsk j ), where Tpk j For sensing temporary public keys, Tsk j This is a temporary private key for sensing.
[0051] In one embodiment of the present invention, a key encapsulation operation function is executed based on a user's temporary public key to generate a first encapsulated ciphertext and a first key material. The target sensor, based on the user's temporary public key, sends a second authentication ciphertext, encrypted with the first encapsulated ciphertext, the first key material, and the sensor's temporary public key, to the user via a gateway. This includes: after the target sensor authenticates with the gateway, it selects a third encrypted random number and the current timestamp, executes a key encapsulation operation function of a post-quantum cryptography algorithm based on the user's temporary public key to generate the first encapsulated ciphertext and the first key material, performs a FO-T transformation on the first key material, calculates a third hash verification value based on the sensor's dedicated key, the second encrypted random number, and the current timestamp, calculates a fourth hash verification value based on the third encrypted random number, the first encapsulated ciphertext, and the current timestamp; it calls the encryption function of the post-quantum cryptography algorithm and the user's long-term public key to encrypt the sensor's temporary public key, the first encapsulated ciphertext, the second encrypted random number, the third encrypted random number, and the sensor's identity identifier to obtain the second authentication ciphertext, and sends the second authentication ciphertext, the third hash verification value, the fourth verification hash value, and the current timestamp together to form third verification information to the gateway.
[0052] Specifically, the target sensor S jAfter successful authentication with the gateway GWN, select the third encrypted random number r3 and the current timestamp T3, based on the user's temporary public key Tpk. i The key encapsulation operation function Kyber.Encaps() of the post-quantum cryptography algorithm is executed to generate the first encapsulated ciphertext C1 and the first key material K1. The first key material K1 is then subjected to the FO-T transformation to obtain K1', and based on the sensor-specific key K... j Using the second encrypted random number r2 and the current timestamp T3, calculate the third hash check value V3=H(K) j Based on the third encrypted random number r3, the first encapsulated ciphertext C1, and the current timestamp T3, calculate the fourth hash check value V4=H(r3||C1||T3); then call the encryption function PKE.Enc() of the post-quantum cryptography algorithm and the user's temporary public key Tpk. i For sensor temporary public key Tpk j The first encapsulated ciphertext C1, the second encrypted random number r2, the third encrypted random number r3, and the sensor identification identifier SID j Encryption is performed to obtain the second authentication ciphertext m3=PKE.Enc(Tpk i , (Tpk j C1, r2, r3, SID j The third verification information {m3, V3, V4, T3}, composed of the second authentication ciphertext m3, the third hash verification value V3, the fourth verification hash value V4, and the current timestamp T3, is sent to the gateway GWN.
[0053] In one embodiment of the present invention, a user decrypts a second authentication ciphertext using a user's temporary private key to obtain a second authentication plaintext, and authenticates a target sensor based on the second authentication plaintext. The authentication process includes: after receiving the second authentication ciphertext, the gateway verifies whether a third verification hash value is valid based on the sensor-specific key, a second encrypted random number, and the current timestamp. If valid, the gateway authenticates the target sensor. A hash calculation is performed based on the second encrypted random value and the current timestamp to obtain a fifth hash verification value. The second authentication ciphertext, the fourth hash verification value, the fifth hash verification value, the timestamp in the third verification information, and the current timestamp are combined to form fourth verification information. This fourth verification information is sent to the user as first response information. The user verifies the first response information using their long-term private key. If the first response information is verified successfully, the user authenticates the target sensor. Specifically, after receiving the second authentication ciphertext {m3, V3, V4, T3}, the gateway GWN uses the sensor-specific key K... j The second encrypted random number r2 and the current timestamp T3 are used to verify the third verification hash value V3==H(K) j Does ||r2||T3) hold true? If so, then the gateway GWN controls the target sensor S.j Authentication successful; A hash calculation is performed based on the second encrypted random value r2 and the current timestamp T4 to obtain the fifth hash verification value V5 = H(r2||T4). The second authentication ciphertext m3, the fourth hash verification value V4, the fifth hash verification value V5, the timestamp T3 in the third verification information, and the current timestamp T4 are combined to form the fourth verification information {m3, V4, V5, T3, T4}. The fourth verification information is sent to user U as the first response information. i .
[0054] In one embodiment of the present invention, the user verifies the first response information based on the user's long-term private key. If the first response information is verified, the user's authentication of the gateway is successful. This includes: after receiving the first response information, the user decrypts the second authentication ciphertext based on the user's temporary private key to obtain the second authentication plaintext; verifies the fourth hash check value based on the third encrypted random value, the first encapsulated ciphertext, and the timestamp in the second authentication plaintext; and verifies the fifth hash check value based on the second encrypted random value and the current timestamp. If all are true, the user's authentication of the target sensor is successful. After the user has successfully authenticated both the gateway and the target sensor, a key encapsulation operation using a post-quantum cryptographic algorithm is performed based on the sensor's temporary public key to generate a second encapsulated ciphertext and a second key material. The second key material is then subjected to a FO-T transformation to obtain the session key. Based on the FO-T transformed first key material, the FO-T transformed second key material, the first encrypted random value, the second encrypted random value, the third confidential random value, the user's identity identifier, and the sensor's identity identifier, a session key is generated.
[0055] Specifically, user U i After receiving the first response information {m3, V4, V5, T3, T4}, based on the user's long-term private key lsk i Decrypting the second authentication ciphertext m3 yields the second authentication plaintext PKE.Dec(lsk) i m3)=(Tpk j C1, r2, r3, SID j Based on the timestamps in the third encrypted random value, the first encapsulated ciphertext, and the second authentication plaintext, the system verifies whether the fourth hash check value V4 == H(r3||C1||T3) is true. Based on the second encrypted random value and the current timestamp, the system verifies whether the fifth hash check value V5 == H(r2||T4) is true. If both are true, then user U... i The target sensor has passed certification. User U i After successful authentication, based on the sensor temporary public key Tpk jThe key encapsulation operation Kyber.Encaps(Tpk) is performed after executing the quantum cryptography algorithm. j The process involves generating a second encapsulated ciphertext C2 and a second key material K2, and performing a FO-T transformation on the second key material K2 to obtain K2'. Based on the FO-T transformed first key material K1', the FO-T transformed second key material K2', the first encrypted random value, the second encrypted random value, the third confidential random value, the user identity identifier, and the sensor identity identifier, a session key SK is generated. U-S =KDF(K1'||K2'||r1||r2||r3||ID i ||SID j ).
[0056] In one embodiment of the present invention, a user generates a second key material based on a sensor temporary key pair and sends it to a target sensor via a gateway. If the target sensor authenticates the user, the target sensor generates a session key identical to the user's based on the first and second key materials. This includes: the user calling a key encapsulation operation function of a post-quantum cryptography algorithm and executing the key encapsulation operation function based on the sensor temporary public key to generate a second encapsulated ciphertext and a second key material; the user sending a third authentication ciphertext, encrypted with the second encapsulated ciphertext, the second key material, and the sensor temporary public key, to the target sensor via the gateway based on the sensor temporary public key; the target sensor authenticating the user based on the sensor temporary private key and the third authentication ciphertext; if authentication is successful, the target sensor calls a key derivation function of a post-quantum cryptography algorithm to generate a session key identical to the user's based on the first and second key materials.
[0057] When a user generates a session key, a second encapsulated ciphertext and a second key material need to be generated. The generation process is the same and will not be described in detail here.
[0058] In one embodiment of the present invention, the user calls the key encapsulation operation function of the post-quantum cryptography algorithm and executes the key encapsulation operation function based on the sensor temporary public key to generate a second encapsulated ciphertext and a second key material. Specifically, based on the sensor temporary public key Tpk... j The key encapsulation operation Kyber.Encaps(Tpk) is performed after executing the quantum cryptography algorithm. j ), generating the second encapsulated ciphertext C2 and the second key material K2.
[0059] In one embodiment of the present invention, a user sends a third authentication ciphertext, encrypted with a second encapsulated ciphertext, a second key material, and the sensor's temporary public key, to a target sensor via a gateway based on a sensor's temporary public key. The target sensor authenticates the user based on a sensor's temporary private key and the third authentication ciphertext, including: the user selecting a fourth encrypted random number and a current timestamp; using the second encapsulated ciphertext and the fourth encrypted random number as fourth authentication information; encrypting the fourth authentication information using a post-quantum cryptography algorithm's encryption function and the sensor's temporary public key to obtain the third authentication ciphertext; then encrypting the third authentication ciphertext and the second encrypted random number again using a post-quantum cryptography algorithm's encryption function and the gateway's long-term public key to obtain the fourth authentication ciphertext; performing a hash calculation based on the second encrypted random number and the current timestamp to obtain a sixth hash verification value; performing a hash calculation based on the fourth encrypted random number and the current timestamp to obtain a seventh hash verification value; and sending the fourth authentication ciphertext, the sixth hash verification value, the seventh hash verification value, and the current timestamp together to form fifth verification information to the gateway. After receiving the fifth verification information, the gateway checks the validity of the timestamp, calls the decryption function of the post-quantum cryptography algorithm and the gateway's long-term private key to decrypt the fourth authentication ciphertext, and then verifies the sixth hash verification value based on the second encrypted random number and the current timestamp. If the verification passes, it selects the fifth encrypted random number and the current timestamp, calls the encryption function of the post-quantum cryptography algorithm and the target sensor's long-term public key to encrypt the third authentication ciphertext and the fifth encrypted random number, and then performs a hash calculation on the fifth authentication ciphertext based on the fifth encrypted random number and the current timestamp to obtain the eighth hash verification value. The fifth authentication ciphertext, the seventh hash verification value, the eighth hash verification value, the timestamp in the fifth verification information, and the current timestamp are combined to form the sixth verification information and sent to the target sensor. After receiving the sixth verification information, the target sensor checks the validity of the timestamp, calls the decryption function of the post-quantum cryptography algorithm and the target sensor's long-term private key to decrypt the fifth authentication ciphertext, obtaining the third authentication ciphertext and the fifth encrypted random number. Based on the fifth encrypted random number and the current timestamp, it verifies the eighth hash verification value. If the verification passes, the target sensor calls the target sensor's temporary private key to decrypt, obtaining the second encapsulated ciphertext and the fourth encrypted random number. Based on the fourth encrypted random number and the timestamp in the fifth verification information, it verifies the seventh hash verification value. If the verification passes, the target sensor calls the decapsulation function of the post-quantum cryptography algorithm to obtain the second key material, and performs FO-T transformation on the second key material. Based on the FO-T transformed first key material, the FO-T transformed second key material, the first encrypted random value, the second encrypted random value, the third confidential random value, the user identity identifier, and the sensor identity identifier, a session key is generated.
[0060] Specifically, the user selects the fourth encrypted random number r4 and the current timestamp T5, uses the second encapsulated ciphertext C2 and the fourth encrypted random number r4 as the fourth authentication information, and calls the encryption function PKE.Enc() of the post-quantum cryptography algorithm and the sensor temporary public key Tpk. j The fourth authentication information is encrypted to obtain the third authentication ciphertext m4=PKE.Enc(Tpk j (C2, r4)); then call the encryption function PKE.Enc() of the post-quantum cryptography algorithm and the gateway long-term public key lpk. g Encrypt the third authentication ciphertext and the second encryption random number (m4, r2) to obtain the fourth authentication ciphertext m5 = PKE.Enc(lpk g (m4, r2)); Based on the second encrypted random number and the current timestamp, perform hash calculation to obtain the sixth hash verification value V6=H(r2||T5); Based on the fourth encrypted random number and the current timestamp, perform hash calculation to obtain the seventh hash verification value V7=H(r4||T5); Combine the fourth authentication ciphertext, the sixth hash verification value, the seventh hash verification value, and the current timestamp to form the fifth verification information {m5, V6, V7, T5} and send it to the gateway GWN; After receiving the fifth verification information {m5, V6, V7, T5}, the gateway GWN checks the validity of the timestamp T5, and calls the decryption function PKE.Dec() of the post-quantum cryptography algorithm along with the gateway's long-term private key lsk. g Decrypt the fourth authentication ciphertext m5 to obtain (m4, r2). Verify the sixth hash check value V6 == H(r2||T5) based on the second encryption random number and the current timestamp. If true, the verification passes. After the gateway GWN verifies the value, select the fifth encryption random number r5 and the current timestamp T6, and call the encryption function PKE.Enc() of the post-quantum cryptography algorithm and the target sensor's long-term public key lpk. j Encrypt the third authentication ciphertext and the fifth encryption random number (m4, r5) to obtain the fifth authentication ciphertext m6 = PKE.Enc(lpk j (m4, r5); perform hash calculation on the fifth encrypted random number and the current timestamp to obtain the eighth hash verification value V8=H(r5||T6); combine the fifth authentication ciphertext, the seventh hash verification value, the eighth hash verification value, the timestamp in the fifth verification information, and the current timestamp to form the sixth verification information {m6, V7, V8, T5, T6} and send it to the target sensor S. j ; Target sensor S j Upon receiving the sixth verification information {m6, V7, V8, T5, T6}, the validity of the timestamp T6 is checked, and the decryption function PKE.Dec() of the post-quantum cryptography algorithm and the target sensor's long-term private key lsk are invoked.j Decrypt the fifth authentication ciphertext m6 to obtain the third authentication ciphertext and the fifth encryption random number (m4, r5). Based on the fifth encryption random number and the current timestamp, verify whether the eighth hash check value V8 == H(r5||T6) is true. If true, the verification passes. Target sensor S j Calling PKE.Dec() and the target sensor temporary private key Tsk j Decrypt m4 to obtain the second encapsulated ciphertext and the fourth encrypted random number (C2, r4). Based on the timestamp in the fourth encrypted random number and the fifth verification information, verify whether the seventh hash check value V7 == H(r4||T5) is true. If true, the verification passes. Target sensor S j Calling the decapsulation function Kyber.Decaps(Tsk) of the post-quantum cryptography algorithm j C2), to obtain the second key material K2, perform FO-T transformation on the second key material K2 to obtain K2'; based on the first key material K1' transformed by FO-T, the second key material K2' transformed by FO-T, the first encrypted random value, the second encrypted random value, the third confidential random value, the user identity identifier, and the sensor identity identifier, generate the session key SK. S-U =KDF(K1'||K2'||r1||r2||r3||ID i ||SID j ).
[0061] In one embodiment of the present invention, the above-mentioned verification of the validity of the timestamp is to compare the timestamp in the verification information with the received timestamp when the verification information is received. If the difference between the two timestamps does not exceed a preset time threshold, it is valid. The validity of each timestamp will not be described in detail here.
[0062] This invention generates long-term key pairs for three communication entities—gateway, user, and sensor—based on a post-quantum cryptography algorithm. During authentication, a temporary key pair is dynamically generated by the user and target sensor to resist known quantum attacks. Furthermore, the invention achieves end-to-end bidirectional authentication between the user and target sensor through: the gateway authenticating the user based on its long-term key pair and the user's long-term key pair; the target sensor authenticating the user and gateway based on its long-term sensing key pair; the user reversing authentication of the gateway and target sensor based on its temporary sensing key pair and a first key material; and the target sensor's final authentication of the user. This ensures that only legitimate users and legitimate sensors can establish a communication connection. Moreover, the user and target sensor independently generate the same session key, which is shared only between them. This ensures that the user and target sensor can perform end-to-end encrypted data transmission based on this session key, preventing decryption even in open channels, thus achieving secure communication between the user and target sensor.
[0063] This invention discloses a computer device readable storage medium, which is a computer device readable storage medium storing a computer program thereon. When the computer program is executed, it implements the above-mentioned Kyber-based wireless sensor network authentication method.
[0064] Optionally, the readable storage medium of the computer device may include: read-only memory (ROM), random access memory (RAM), solid-state drives (SSDs), or optical discs, etc. The random access memory may include resistive random access memory (ReRAM) and dynamic random access memory (DRAM).
[0065] The computer device of the present invention includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the above-described Kyber-based wireless sensor network authentication method.
[0066] The processor can be a central processing unit (CPU), or other general-purpose processors, 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, discrete hardware components, etc.
[0067] The memory can be used to store computer programs or modules. The processor implements various functions of the Kyber-based wireless sensor network authentication method by running or executing the computer programs or modules stored in the memory and by accessing data stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, applications required for at least one function, etc.; the data storage area can store data created based on the use of the terminal, etc. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart media cards (SMC), secure digital cards (SD cards), flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices.
[0068] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A wireless sensor network authentication method based on the Kyber algorithm, wherein the wireless sensor network includes users, gateways, and sensors, characterized in that, include: The gateway generates a master key and a long-term key pair based on the post-quantum cryptography algorithm Kyber, and generates a user long-term key pair for the user and a sensor long-term key pair for the sensor, respectively. In response to a user-generated authentication request, the gateway determines the target sensor among multiple sensors based on the authentication request; The user, the gateway, and the target sensor perform authentication to generate a session key for encrypting data transmission between the user and the target sensor, including: The user generates a temporary key pair, and the gateway authenticates the user based on the gateway's long-term key pair and the user's long-term key pair; if the gateway successfully authenticates the user, the target sensor authenticates the user and the gateway based on its sensing long-term key pair. If the target sensor successfully authenticates the user and the gateway, the target sensor generates a temporary sensing key pair and generates a first key material based on the user's temporary key pair; the user authenticates the gateway and the target sensor based on the temporary sensing key pair and the first key material; if the user successfully authenticates the gateway and the target sensor, the user generates a session key based on the first key material. The user generates a second key material based on the sensor temporary key pair and sends it to the target sensor via the gateway. If the target sensor authenticates the user, the target sensor generates a session key identical to the user's based on the first key material and the second key material.
2. The wireless sensor network authentication method based on the Kyber algorithm according to claim 1, characterized in that, The gateway, based on the post-quantum cryptography algorithm Kyber, generates the gateway's master key and long-term key pair, including: The gateway generates a random number and uses the random number as the master key; The gateway invokes the key generation function of the post-quantum cryptography algorithm to generate the gateway's long-term key pair.
3. The wireless sensor network authentication method based on the Kyber algorithm according to claim 1, characterized in that, The gateway generates a long-term user key pair for the user, including: The gateway receives the user's identity identifier and login password sent by the user through the first secure channel; The gateway determines a user-specific key based on the user identity identifier and the master key, and calculates a first verification value and a second verification value based on the user-specific key; The gateway invokes the key generation function of the post-quantum cryptography algorithm to generate the user's long-term key pair; The gateway sends the first verification value, the second verification value, and the user long-term key pair to the user storage through the first secure channel.
4. The wireless sensor network authentication method based on the Kyber algorithm according to claim 1, characterized in that, The gateway generates a long-term sensing key pair for the sensor, including: The gateway receives the sensor identification identifier sent by the sensor through the second security channel; The gateway determines the sensor-specific key based on the sensor's identity identifier and the master key; The gateway calls the key generation function of the post-quantum cryptography algorithm to generate the long-term sensing key pair for the sensor; The gateway sends the sensor identity identifier, the sensor-specific key, and the long-term sensing key pair to the sensor storage via the second secure channel.
5. The wireless sensor network authentication method based on the Kyber algorithm according to claim 1, characterized in that, The gateway determines the target sensor from multiple sensors based on the authentication request, including: Parse the authentication request to obtain the user's identity identifier; The gateway queries the local database based on the user identity identifier and obtains the sensor identity identifier associated with the user identity identifier from the local database; The gateway determines the target sensor and the corresponding target sensor long-term key pair based on the sensor identity identifier.
6. The wireless sensor network authentication method based on the Kyber algorithm according to claim 5, characterized in that, The gateway long-term key pair includes a gateway long-term public key and a gateway long-term private key; the user long-term key pair includes a user long-term public key and a user long-term private key; the sensor long-term key pair includes a sensor long-term public key and a sensor long-term private key. The user generates a temporary key pair, and the gateway authenticates the user based on the gateway long-term key pair and the user long-term key pair. If the gateway authenticates the user, the target sensor authenticates the user and the gateway based on its long-term sensing key pair, including: The user calls the key generation function of the post-quantum cryptography algorithm to generate the user temporary key pair, which includes the user temporary public key and the user temporary private key; The user generates first authentication information based on the user's long-term public key and the user's temporary public key, and then encrypts the first authentication information based on the gateway's long-term public key before sending it to the gateway; The gateway decrypts the first authentication information based on the gateway's long-term private key, and then authenticates the user based on the decrypted first authentication information. If the gateway authenticates the user, the gateway forwards the first authentication ciphertext, which is encrypted by the user's temporary public key, to the target sensor based on the sensor's long-term public key. The target sensor decrypts the first authentication ciphertext based on the sensing long-term private key to obtain the first authentication plaintext, and authenticates the user and the gateway based on the first authentication plaintext.
7. The wireless sensor network authentication method based on the Kyber algorithm according to claim 6, characterized in that, The target sensor generates a temporary sensing key pair and generates a first key material based on the user temporary key pair; The user authenticates the gateway and the target sensor based on the sensor temporary key pair and the first key material, including: The target sensor calls the key generation function of the post-quantum cryptography algorithm to generate the sensor temporary key pair, which includes a sensor temporary public key and a sensor temporary private key. The target sensor calls the key encapsulation operation function of the post-quantum cryptography algorithm and executes the key encapsulation operation function based on the user's temporary public key to generate the first encapsulated ciphertext and the first key material; The target sensor sends a second authentication ciphertext, which is encrypted by the first encapsulated ciphertext, the first key material, and the sensor temporary public key, to the user via the gateway based on the user's temporary public key. The user decrypts the second authentication ciphertext using the user's temporary private key to obtain the second authentication plaintext, and then authenticates the target sensor based on the second authentication plaintext.
8. The wireless sensor network authentication method based on the Kyber algorithm according to claim 7, characterized in that, The user generates a second key material based on the sensor temporary key pair and sends it to the target sensor via the gateway. If the target sensor authenticates the user, the target sensor generates a session key identical to the user's based on the first key material and the second key material, including: The user calls the key encapsulation operation function of the post-quantum cryptography algorithm and executes the key encapsulation operation function based on the sensor temporary public key to generate the second encapsulated ciphertext and the second key material; The user sends the third authentication ciphertext, which is encrypted by the second encapsulated ciphertext, the second key material, and the sensor temporary public key, to the target sensor via the gateway based on the sensor temporary public key. The target sensor authenticates the user based on the sensor's temporary private key and the third authentication ciphertext; If authentication is successful, the target sensor calls the key derivation function of the post-quantum cryptography algorithm to generate a session key identical to that of the user based on the first key material and the second key material.
9. A computer-readable storage medium, characterized in that, It is a computer-readable storage medium on which a computer program is stored, which, when executed, implements a wireless sensor network authentication method based on the Kyber algorithm as described in any one of claims 1-8.
10. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, at least one program, code set, or instruction set, the at least one instruction, at least one program, code set, or instruction set being loaded and executed by the processor to implement a wireless sensor network authentication method based on the Kyber algorithm as described in any one of claims 1 to 8.
