Background
In recent years, due to emerging applications of industrial automation, smart devices and smart cities, the internet of things attracts great attention of people. The sensing layer of the internet of things is composed of a group of sensors which are distributed in a scattered manner in space and are provided with special purposes, the sensors are used for monitoring and recording physical data in the environment and organizing the collected data in a central mode, and the sensing data have extremely high utilization value and need to be collected and processed safely and efficiently. Meanwhile, due to the application purpose and resource limitation characteristics of the wireless sensor network, the wireless sensor network becomes an attractive target for intrusion and other attacks. Therefore, the safety problem of the wireless sensor network is the basis for guaranteeing the normal operation of the Internet of things system, and the wireless sensor network has research value and application value.
The security requirements of the wireless sensor network are built based on three properties of the information system's security Class (CIA), including confidentiality, integrity, and availability. Confidentiality refers to the security mechanisms that must ensure that only the intended recipient is able to properly parse the message content and prevent unauthorized access and use; confidentiality is the basis for CIA, while integrity is the assurance that unauthorized users cannot destroy or alter the content of sensitive information; availability refers to the security mechanism's ability to perform security tasks without interruption while ensuring that the system or network is able to perform the security tasks. The identity authentication of the sensor equipment is a source problem for guaranteeing the security requirement of the wireless sensor network, and only if the security and verifiability of the equipment identity in the network are guaranteed, the basis can be provided for subsequent security mechanisms and data collection tasks.
Sensor authentication often occurs in the following scenarios:
(1) the authentication procedure in the protocol is used to establish a secure channel between two terminal devices or one device and the server.
(2) When a sensor device retrieves sensed data collected by other sensors and stored in the cloud, the integrity and authenticity of the data needs to be verified to ensure that the data is not tampered with or partially lost. The digital signature of the sensing data is suitable for the situation, and in order to verify the correctness of the data signed by the private key, the equipment needs to verify the public key certificate of the equipment to verify the public key, so that the identity of the equipment is ensured to be real and reliable.
In a wireless sensor network, Authentication schemes based on a symmetric cryptosystem, such as a scheme of a μ TESLA (micro time, Efficient, Streaming, Loss-complete Authentication) broadcast Authentication protocol and an extension protocol thereof, have the problems of time synchronization, delayed time existing in key disclosure, incapability of performing Authentication in time, dos (denial of service) attack and the like. The identity authentication scheme based on the asymmetric cryptosystem for broadcasting can solve the problem based on the symmetric cryptosystem. In addition, most of the identity authentication schemes currently in mainstream are based on a public key cryptosystem and a digital signature technology, and although there are many improved technologies and methods for wireless sensor networks, when the wireless sensor networks are in interactive communication with external networks, digital signatures and digital certificates still need to be verified, so that it is necessary to implement efficient asymmetric encryption algorithms in the wireless sensor networks with limited computation, storage and energy resources.
In the traditional internet, a Public Key Infrastructure (PKI) mechanism is mainly used, an x.509 digital Certificate containing relevant information such as a user Public Key is constructed through a trusted Certificate Authority (CA), and any user can obtain the user Public Key in the Certificate by obtaining the CA Public Key, so that data signed by a private Key and sent by a Certificate holder are verified, and the identity of a data sender is verified. The certificate authentication process requires certain encryption and decryption operations and storage resources, which can be easily completed on a common computing device or server, but is not suitable for a sensor network which requires energy saving and has limited computing and storage resources. For example, using an optimized approach to certificate verification requires only one signature verification operation, rather than verifying the complete certificate chain, but certificate verification still requires 1.9s of time and certificate-based public key operations account for 95% of the total processing time, which is a reluctant case.
Therefore, how to perform fast certificate verification in a wireless sensor network and solve the storage and communication resource consumption caused by certificate storage and transmission is a problem to be solved. Traditionally, as many verified certificates are cached as possible, but this is not reasonable on internet of things devices with limited memory resources. And it is a very time consuming operation for each internet of things device to verify each public key certificate separately by the CA's public key. The above method is not suitable for sensor terminals with limited storage and computational resources.
Disclosure of Invention
The invention provides a large-scale wireless sensor network collaborative identity authentication method, aiming at solving the technical problems of how to execute rapid certificate authentication in a wireless sensor network and solving the consumption of storage and communication resources caused by certificate storage and transmission; meanwhile, the safety and the reliability of the network are protected. The invention designs a locator CLOc and cold start improved algorithm based on cuckoo hash in a large-scale wireless sensor network based on a cooperation idea, and introduces a trust model to realize an efficient, safe and complete cooperative identity verification protocol.
The technical scheme of the invention is as follows:
a large-scale wireless sensor network collaborative identity authentication method comprises the following specific steps:
step (1), network initialization after cold start improvement
When the network is initialized, the cluster head nodes in the wireless sensor network based on the clustering routing protocol need to verify the identities of all sensors in a cluster, the time consumption is serious, and the cold start problem is generated. Therefore, a cold start improvement algorithm at network initialization is proposed. The network initialization after the cold start improvement is specifically as follows: when the network is initialized, the CLOC locator is empty, the CLOC is a mapping set of a public key certificate and a device ID for verifying the public key certificate, and the data structure of the CLOC locator is divided into two parts of index (key) and storage content (value); the non-cluster-head nodes are divided into two groups by the cluster-head nodes according to a Hungarian matching algorithm, and the nodes between the two groups randomly and mutually execute independent verification processes.
Step (2), independent verification process
The equipment receives the certificate which needs to be independently verified, and executes the certificate verification operation of the public key password. And if the certificate verification is successful, performing the inserting operation of the CLOC locator. Construction of CRC32(PKcer) As an index, where PKcerFor certificate public key values, CRC32Is a 32-bit Cyclic Redundancy Check function (A Cyclic Redundancy Check-32, CRC-32); construction of CRC32(PKcer)||CRC32(IDXver)>>24||IDXverAs stored contents, whereinIDXverIs the verifier's own sensor device ID. The constructed CLOC positioner can realize the quick positioning of the sensor equipment which verifies the public key certificate. After the equipment constructs the index of the CLoc locator and completes the construction of the storage content, the index is sent to the coordinator<NEW-CACHE>And (5) message, finishing updating the CLoc locator.
The coordinator works as follows:
the coordinator is responsible for receiving the CLoc locator update value sent by the sink node and updating the CLoc locator update value to all equipment in the network at regular time; in addition, the coordinator periodically queries the certificate revocation list from the CA and notifies the device to delete certificate records that need to be deleted from the locator, notifying the verifier of the certificate to delete its cached certificate. If the trust value of a device is still below the initial set value after a given time, the node is removed from the locator by the coordinator.
The trust value setting mode is as follows:
in order to better quantify the trust degree of the sensor equipment in the cooperative verification process, a subjective logic framework is introduced to construct a communication trust model, and a related trust value is calculated by depending on the honest verification event number s and the dishonest verification event number f in the record
The range of the trust value T is 0,1]A value of 1 indicates that trust is fully possible and a value of 0, on the contrary, indicates that trust is not possible at all. Initially, the trust value between each two devices is initially set to 0.5. And calculating to obtain a direct trust value according to the honest and dishonest event number in the verification process, and updating the trust value based on the sliding time window.
Step (3), collaborative verification process
After initialization is complete, when sensor device d is ready1Needs to communicate with another device d2When establishing the secure communication, the public key certificate C needs to be verified2The verification process is as follows:
first of all device d1Searching local CLOC locator, inquiring whether other equipment is verified and cachedCertificate C2. If the CLoc locator returns verification and caches the certificate C2The device of (1) verifies whether the CRC check value of the public key is consistent, then verifies whether the ID of the device is consistent with the CRC checked value, and if both are correct, communicates with the verifier device queried to cooperatively verify the certificate C2(ii) a If the query result of the CLoc locator indicates that no equipment is cached and the certificate C is verified2Or verifying that the CRC check value of the public key does not accord with the check value obtained by indexing in the CLOC locator, and then equipment d1And (5) carrying out the flow of independently verifying the certificate, and synchronizing the step (2).
The invention has the advantages that: based on the idea of cooperative verification, the invention executes an efficient certificate verification process and designs a cold start improved algorithm, thereby reducing a large amount of encryption and decryption calculation operations and the storage space requirement of nodes, and saving the calculation, storage and energy resources of sensor nodes; meanwhile, the designed locator CLOC structure based on cuckoo hash has the advantages of low memory consumption, quick query and low construction complexity, and meets the requirement of collaborative verification; finally, a trust model which is converted into a wireless sensor network design is introduced, so that intrusion tolerance can be realized, and network security is protected.
Detailed Description
The following detailed description of the embodiments of the invention is provided in connection with the accompanying drawings.
The structure of the locator CLOC based on the cuckoo hash is shown in figure 1, and similar to the basic cuckoo hash, the CLOC firstly constructs a hash table for storing key values. Second, two hash functions h are required1(·),h2(. cndot.) is used to determine two possible locations for the interpolated value.
The insertion operation of the CLoc positioner was as follows:
(1) CRC-3 public key value attached to certificate to be verified2, calculating the function: CRC32(PKcer)。
(2) Calculating the Key CRC to be stored in the locator32(PKcer)||CRC32(IDXver)>>24||IDXver。
(3) And inputting the obtained 32-bit check code into a hash function to obtain the first possible storage position of the Key.
(4) If the position is occupied by other key values, a greedy algorithm is executed according to the insertion strategy of the cuckoo hash.
(5) Finally, the Key value is inserted into the locator.
The delete operation of the CLoc locator was as follows:
(1) firstly, calculating the value of a public key of a certificate to be deleted to obtain a CRC-32 check code value: CRC32(PKcer)。
(2) Calculating two hash functions corresponding to the CRC-32 check code value to obtain a value h of two possible positions1(CRC32(PKcer)),h2(CRC32(PKcer))。
(3) Judging whether the value in the first possible position is the same as the Key value to be deleted or not, and if so, setting the position to be a null value; if not, searching whether the value in the second possible position is the same as the Key value to be deleted, and if so, setting the position to be a null value; if the value identical to the Key value to be deleted is not found in the two positions, the value returns to-1, which indicates that the verification information of the certificate is not stored in the locator, and the deletion operation fails.
The query operation of the CLoc locator is as follows:
(1) the CRC-32 check code value for the public key value of the certificate to be queried is first calculated: CRC32(PKcer)。
(2) Calculating two hash functions corresponding to the CRC-32 check code value to obtain a value h of two possible positions1(CRC32(PKcer)),h2(CRC32(PKcer))。
(3) Determining the first possible positionChecksum value and calculated CRC32(PKcer) Whether the Key values are the same or not is judged, if so, the Key values of the corresponding positions are returned; if not, searching whether the value in the second possible position is the same as the Key value to be inquired, and if so, returning the Key value of the corresponding position; if the same value as the Key value that is desired to be queried is not found in either of the two locations, a return is made to-1, indicating that the validator information associated with the credential has not been stored in the locator and that the credential has not been validated by the other device.
The cold start improved algorithm designed by the invention is schematically shown in fig. 2, after the network is initialized, if the number of nodes in the cluster is even, the cluster head constructs a bipartite graph G (S, E), wherein S is S
1∪S
2,
E is the set of edges. The cluster head calculates a maximum match according to the Hungarian algorithm, and each matched edge belongs to S
1Aggregated sensor node independent verification of belonging to S
2In order to avoid mutual interference between sensors, the cluster head recalculates a maximum match, leaving each matched edge as S
2Aggregated sensor node independent verification of belonging to S
1And the sensor nodes are gathered, so far, the verification is completed. Based on a cold start improved algorithm, the resource consumption of cluster head nodes can be obviously reduced, and the service life of the network is prolonged.
The invention introduces a trust model based on a subjective logic framework, and the direct trust value is based on a certificate verification result between the verification request sensor equipment and the verifier equipment. Monitoring the behavior of sensor nodes in a wireless sensor network based on previous communication behavior has considerable uncertainty due to the unstable and noisy communication channel between the two sensor nodes. To resolve this uncertainty, the present invention applies a subjective logical framework to compute direct trust. A triple T ═ b, d, u, a } is defined, where b, d, u correspond to the degree of confidence, the degree of distrust, and the degree of uncertainty, and a represents the base ratio, i.e., the prior probability in the absence of evidence, where a ═ 0.5 indicates the degree to which the degree of uncertainty affects the mean. b, d, u ∈ [0,1], b + d + u ═ 1. Wherein the calculation formula is as follows:
in the process of one round of data receiving and sending, the edge server receives and records the successful honest verification event number s and the dishonest verification event number f. The direct confidence value is calculated as follows:
the complete and efficient cooperative identity authentication protocol provided by the invention is driven by an event that a non-cluster head node and a cluster head node establish safe communication in an LEACH routing protocol, and performs authentication cooperation by sending messages between devices, as shown in FIG. 3. Based on an LEACH routing protocol, when the round of cluster head node election in the network is finished, the cluster head node broadcasts to inform all the sensor equipment of the condition that the sensor equipment is called as the cluster head node; each non-cluster head node decides which cluster to join according to the strength of a received signal when a message sent by the cluster head node reaches the non-cluster head node, communicates with the corresponding cluster head node, and attaches a certificate and a public key of the non-cluster head node. The cluster head node firstly checks the certificate cached locally to see whether the cluster head node verifies that the public key certificate is cached; if the cached public key certificate is not valid, the cluster head node sends a request to the cluster head node to verify the validity of the public key certificate. Otherwise, the cluster head node needs to query the cuckoo hash-based locator CLoc to confirm whether any device verifies and caches the certificate, and obtain the device index serial number of the verifier device. Wherein, after the network initialization, in order to prevent the cold start problem, the invention designs a cold start improvement algorithm.
Each sensor device stores a locator CLoc based on the cuckoo hash, and constructs the locator structure at the time of initialization, if the cluster head node obtains the index serial number of the verifier device and the check codes are consistent, the cluster head node sends a message < REQUEST _ VALI, C, h, v > to the corresponding device for cooperative verification, wherein the REQUEST _ VALI indicates the message type, C is the certificate to be verified, h represents the cluster head node, and v indicates the verifier device. If the check codes are not consistent, the cluster head node interrupts the cooperative verification mechanism and selects itself to perform independent verification.
The edge server periodically and dynamically updates the required new values in the locator to keep the content of the locator of all the devices consistent dynamically. The sensor device independently verifies and CACHEs the certificate of a certain device, and sends a NEW _ CACHE message to the edge server, the edge server collects all certificate UPDATE messages of the round of the wireless sensor network, and then sends the value to be updated to the sink node by using an UPDATE _ CLOC message, and the sink node distributes the value to all devices.
In the cooperative authentication protocol flow of the invention, there are two authentication modes, and the specific authentication flow is as follows:
(1) collaborative authentication
In order to request the joint authentication certificate C, the cluster head node sends a message<REQUESTVALIC, h, v > to verifier v, and once device v receives the message, it retrieves its cache to find the public key k corresponding to the certificate C+If the certificate exists and is the same as C which requests verification, a message is replied to the cluster head node<REPLYVALIC, h, v, Correct' > mark the result of the cooperative verification is Correct; if k is+Consistently, a certificate exists, but not consistent with C requesting authentication, a message will be sent<REPLY _ VALI, C, h, v, Wrong' > identifies error of the cooperative verification result; if k is+Reply message if there is no certificate cached in device v<REPLY _ NO _ CERT, C, h, v > identifies that NO certificate was found, and the reason for the lack of a certificate may be as follows: (1) there is a lack of space for caching certificates. (2) A false match.
When the cluster head node receives the message REPLY _ VALI and the Correct' identifier, the cluster head node indicates that the non-cluster head node is credible, the cluster head node establishes safe communication with the non-cluster head node, and then a time slice of communication is distributed to the cluster head node; if the cluster head node receives the message REPLY _ VALI and Wrong' identification, the cluster head node indicates that the non-cluster head node is not credible, the cluster head node discards the certificate and transmits the message to the sink node, the sink node forwards the message to the edge server, the non-cluster head node is removed from the network after the verification of the edge server, and if the edge server finds that the cluster head node defamation is performed, the cluster head node is removed from the network; when the cluster head node receives the message REPLY _ NO _ CERT, it indicates that the non-cluster head node is not authenticated by other sensor devices, and the cluster head node will authenticate the non-cluster head node by itself.
The cluster head node may send the result of the device v assisting its verification to the edge server to update the trust value of the verifier device. The message < UPDATE _ true, h, t, E > is sent where E contains one or more REPLY _ VALI messages it received in the previous round.
(2) Independent authentication
If the cluster head node verifies the certificate of the non-cluster head node and the attached public key by itself, the processing procedure consumes the calculation and energy consumption resources of the cluster head node and generates a certain time delay. When the certificate is verified, the cluster head node stores the verified certificate in its own local space for caching the certificate. In this process, the cluster head node needs to CHECK whether the certificate is revoked, the cluster head node needs to send a message < CHECK _ rev, C, h, t > to the edge server, where t represents a timestamp at the time of sending, to inquire whether the certificate is revoked, if the certificate is in the revocation list, the edge server sends a message < rev _ CERT, C, h, t > to the cluster head node to recall the certificate, and the cluster head node deletes the certificate from its cache. If the certificate is not revoked, the certificate public key and the cluster head node are added into an update list of the edge server, and are distributed to the whole network equipment after the subsequent data transmission round is finished. Before issuing, the edge server checks whether the verification result is correct.