CN111770089B - Authentication method for blockchain sensor and blockchain network - Google Patents

Authentication method for blockchain sensor and blockchain network Download PDF

Info

Publication number
CN111770089B
CN111770089B CN202010603948.1A CN202010603948A CN111770089B CN 111770089 B CN111770089 B CN 111770089B CN 202010603948 A CN202010603948 A CN 202010603948A CN 111770089 B CN111770089 B CN 111770089B
Authority
CN
China
Prior art keywords
blockchain
random number
sensor
state information
operation value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010603948.1A
Other languages
Chinese (zh)
Other versions
CN111770089A (en
Inventor
斯雪明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujian Fulian Technology Co ltd
Original Assignee
Fujian Fulian Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Fulian Technology Co ltd filed Critical Fujian Fulian Technology Co ltd
Priority to CN202010603948.1A priority Critical patent/CN111770089B/en
Publication of CN111770089A publication Critical patent/CN111770089A/en
Application granted granted Critical
Publication of CN111770089B publication Critical patent/CN111770089B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • H04L63/0435Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply symmetric encryption, i.e. same key used for encryption and decryption
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • H04L63/083Network architectures or network communication protocols for network security for authentication of entities using passwords
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Abstract

The application discloses an authentication method for a block chain sensor and a block chain network, wherein the method comprises the following steps: obtaining a first integrated operation value and a second integrated operation value through integrated operation according to the identity, the current task random number and the previous task random number; carrying out encryption operation on the current task state information by taking the first integration operation value as a key to obtain a ciphertext; obtaining a third integrated operation value and a fourth integrated operation value through integrated operation according to the current task random number, the identity and the stored last task random number; judging whether the second integration operation value and the third integration operation value are equal; when the second integration operation value is equal to the third integration operation value, the fourth integration operation value is used as a secret key to decrypt the ciphertext to obtain a plaintext; and comparing the plaintext with the stored last task state information to obtain a comparison operation result, and finishing the authentication of the block chain sensor. The method solves the problem that the credibility of the current block chain sensor cannot be guaranteed.

Description

Authentication method for blockchain sensor and blockchain network
Technical Field
The present application relates to the field of blockchain technologies, and in particular, to an authentication method for a blockchain sensor and a blockchain network.
Background
With the advance of hardware base such as Very Large Scale Integration (VLSI) and micro electro mechanical system technology (MEMS technology) and Radio Frequency (RF) technology, the development of sensor technology is faster and wider, and the application range is wider. With the development of sensor technology, the safety performance of the sensor becomes an important parameter in the analysis of the market demand of the sensor. For example, in the internet of things, sensors may be used to identify or track a product, and only if a sensor is trustworthy, may the product be trustworthy. Therefore, the internet of things and the block link are combined to form a credible internet of things, and the method is an important means for ensuring the credibility of products.
Fig. 1 is a diagram of a trusted internet of things topology combining an internet of things and a blockchain. As shown in fig. 1, a terminal 01 in the internet of things corresponds to a node in a block chain, a plurality of terminals 01 are connected with each other, each terminal 01 manages a plurality of sensors 02, and the sensors 02 track one or more products (not shown in fig. 1), and it can be seen that the credibility of the products is guaranteed by the credibility of the sensors 02. To ensure the credibility of the sensor, the sensor is firstly required to be changed into a block chain sensor, namely, the credibility of the block chain sensor is ensured by the characteristics of decentralization, non-tampering, whole-course trace, traceability, collective maintenance, public transparency and the like of the block chain.
Generally, the safety hazard for sensors in a blockchain, i.e. blockchain sensors, arises from three aspects: the sensor network is easy to be attacked based on the potential safety hazard. However, for data transmitted by an attacked sensor, there is no effective authentication method for authenticating the security of the sensor.
However, the sensors applied in the blockchain are generally installed in unattended places, so that they are vulnerable to physical attacks or are maliciously forged and transmitted data is easily maliciously tampered with. At present, no effective authentication method is available for identity authentication and security authentication of transmitted data of the blockchain sensor, so that the credibility of the blockchain sensor cannot be guaranteed.
Disclosure of Invention
The application provides an authentication method for a blockchain sensor and a blockchain network, which are used for solving the problem that the credibility of the blockchain sensor cannot be guaranteed because no effective authentication method is available for carrying out identity authentication and security authentication of transmitted data on the blockchain sensor at present.
In a first aspect, an authentication method for a blockchain sensor includes:
acquiring a current task random number, current task state information, a previous task random number and an identity of a block chain sensor;
performing integration operation on the identity and the last task random number to obtain a first integration operation value; performing the integration operation on the last task random number, the current task random number and the identity to obtain a second integration operation value;
performing encryption operation on the current task state information by taking the first integration operation value as a secret key to obtain a ciphertext;
acquiring a stored last task random number and last task state information;
performing the integration operation on the current task random number, the identity and the stored last task random number to obtain a third integration operation value; integrating the identity identification and the stored random number of the last task to obtain a fourth integrated operation value;
determining whether the second integrated operation value and the third integrated operation value are equal;
when the second integration operation value is equal to the third integration operation value, the fourth integration operation value is used as a secret key to decrypt the ciphertext to obtain a plaintext;
and comparing the plaintext with the stored last task state information to obtain a comparison operation result, and finishing the authentication of the block chain sensor.
In a second aspect, a blockchain network for blockchain sensor authentication includes a plurality of blockchain nodes capable of peer-to-peer communication and blockchain sensors connected to the blockchain nodes, at least one of the blockchain nodes performing an authentication operation on the blockchain sensor as an authentication node, the authentication node being configured to perform the following steps:
acquiring a current task random number, current task state information, a previous task random number and an identity of a block chain sensor;
performing integration operation on the identity and the last task random number to obtain a first integration operation value; performing the integration operation on the last task random number, the current task random number and the identity to obtain a second integration operation value;
performing encryption operation on the current task state information by taking the first integration operation value as a secret key to obtain a ciphertext;
acquiring a stored last task random number and last task state information;
performing the integration operation on the current task random number, the identity and the stored last task random number to obtain a third integration operation value; integrating the identity identification and the stored random number of the last task to obtain a fourth integrated operation value;
determining whether the second integrated operation value and the third integrated operation value are equal;
when the second integration operation value is equal to the third integration operation value, the fourth integration operation value is used as a secret key to decrypt the ciphertext to obtain a plaintext;
and comparing the plaintext with the stored last task state information to obtain a comparison operation result, and finishing the authentication of the block chain sensor.
In a third aspect, a blockchain network for authentication of blockchain sensors includes a plurality of blockchain nodes capable of point-to-point communication and blockchain sensors connected to the blockchain nodes, at least one of the blockchain nodes performing an authentication operation on the blockchain sensor as an authentication node, the blockchain sensor being configured to perform the following steps:
acquiring a current task random number, current task state information, a previous task random number and an identity of a block chain sensor;
performing integration operation on the identity and the last task random number to obtain a first integration operation value; performing the integration operation on the last task random number, the current task random number and the identity to obtain a second integration operation value;
performing encryption operation on the current task state information by taking the first integration operation value as a secret key to obtain a ciphertext;
sending the current task random number, the second integration operation value and the ciphertext to the authentication node;
the authentication node is configured to perform the steps of:
acquiring a stored last task random number and last task state information;
performing the integration operation on the current task random number, the identity and the stored last task random number to obtain a third integration operation value; integrating the identity identification and the stored random number of the last task to obtain a fourth integrated operation value;
determining whether the second integrated operation value and the third integrated operation value are equal;
when the second integration operation value is equal to the third integration operation value, the fourth integration operation value is used as a secret key to decrypt the ciphertext to obtain a plaintext;
and comparing the plaintext with the stored last task state information to obtain a comparison operation result, and finishing the authentication of the block chain sensor.
In view of the above technical solutions, an authentication method for a blockchain sensor and a blockchain network provided in the present application include: acquiring a current task random number, current task state information, a previous task random number and an identity of a block chain sensor; performing integration operation on the identity and the last task random number to obtain a first integration operation value; performing the integration operation on the last task random number, the current task random number and the identity to obtain a second integration operation value; performing encryption operation on the current task state information by taking the first integration operation value as a secret key to obtain a ciphertext; acquiring a stored last task random number and last task state information; performing the integration operation on the current task random number, the identity and the stored last task random number to obtain a third integration operation value; integrating the identity identification and the stored random number of the last task to obtain a fourth integrated operation value; determining whether the second integrated operation value and the third integrated operation value are equal; when the second integration operation value is equal to the third integration operation value, the fourth integration operation value is used as a secret key to decrypt the ciphertext to obtain a plaintext; and comparing the plaintext with the stored last task state information to obtain a comparison operation result, and finishing the authentication of the block chain sensor.
According to the authentication method for the blockchain sensor and the blockchain network, the identity of the blockchain sensor, the random number of the previous task and the state information of the previous task are stored in the blockchain link points in advance, and whether the identity of the blockchain sensor is forged or tampered is authenticated by comparing the identity of the blockchain sensor to be authenticated with the identity stored in the blockchain node. And comparing whether the difference between the current task state information and the last task state information stored in the blockchain node is within a preset difference range through encryption and decryption operation of the symmetric key so as to authenticate whether the data transmitted by the blockchain sensor is forged or tampered. Therefore, the authentication method for the blockchain sensor and the blockchain network provided by the application can ensure the credibility of the blockchain sensor and the credibility of data stored in the blockchain network.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of a trusted IOT topology in which IOTs are combined with blockchains;
fig. 2 is a flowchart of a first authentication method for a blockchain sensor according to an embodiment of the present disclosure;
FIG. 3 is a flowchart of a second authentication method for blockchain sensors according to an embodiment of the present disclosure;
fig. 4 is a block chain network topology diagram for block chain sensor authentication according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The blockchain network can comprise a plurality of blockchain nodes capable of realizing point-to-point communication, each blockchain node can be connected with one or more blockchain sensors, the blockchain sensors are generally used for collecting data, and the blockchain nodes can manage the one or more blockchain sensors and can carry out uplink storage on the data collected by the blockchain sensors.
In a first aspect, fig. 2 is a flowchart of a first authentication method for a blockchain sensor according to an embodiment of the present disclosure. As shown in fig. 2, taking a single blockchain node and a single blockchain sensor as an example, the authentication method for the blockchain sensor provided by the present application is specifically described as follows:
in the authentication method for the blockchain sensor provided by this embodiment, step S1 is first executed to obtain the current task random number, the current task state information, the previous task random number, and the identity from the blockchain sensor. The last task random number and the identification of the blockchain sensor can be stored in the blockchain sensor in advance, and the identification of each blockchain sensor is unique and represents the identification of the blockchain sensor. The random number of the current task is generated by the blockchain sensor according to the current task, the random number of the previous task is generated by the blockchain sensor when the previous task is performed, and the random numbers of different tasks are different and unique and can be used as the characterization codes of different tasks. The current task state information may include data collected by the blockchain sensor from the current task and a generated timestamp, the type of data being determined by the type of blockchain sensor. For example, when the blockchain sensor is a pressure sensor, then the collected data is pressure data. The current task state information may also include other data, which is not specifically limited or listed herein.
Further executing step S2, performing an integration operation on the identity and the last task random number to obtain a first integration operation value; and performing integration operation on the last task random number, the current task random number and the identity to obtain a second integration operation value. The integration operation may be one of a hash operation, a data splicing operation, and a data superposition operation, and may be other operation modes as long as it is possible to integrate a plurality of data into a set of data for application, which is not specifically limited in the present application.
Continuing to execute step S3, performing an encryption operation on the current task state information with the first integration operation value as a key to obtain a ciphertext.
Step S4 may be performed in parallel with any of steps S1-S3, step S4, of acquiring the last task random number and the last task state information that have been stored within the blockchain node. The last task random number and the last task state information stored in advance in the block chain link point are the same as the last task random number and the last task state information stored in the block chain sensor, and only the storage positions are different.
Continuing to execute the step S5, performing integration operation on the current task random number, the identity and the stored last task random number to obtain a third integration operation value; and performing integration operation on the identity and the stored last task random number to obtain a fourth integration operation value. Step S5 must be executed after step S4 and step S1, or after step S4 and step S2, or after step S4 and step S3.
The process continues to the determining step S6, where it is determined whether the second integration value and the third integration value are equal.
When the result of the determination in step S6 is that the second integration operation value and the third integration operation value are equal, step S7 is executed to perform a decryption operation on the ciphertext using the fourth integration operation value as a key to obtain a plaintext. And when the second integrated operation value is not equal to the third integrated operation value, executing step S7', recording both the current task random number and the current task state information as invalid, and completing the authentication of the blockchain sensor. Steps S7 and S7' are two possible outcomes of the determination of step S6. The steps S6-S7' can authenticate the identity of the blockchain sensor by determining whether the second integrated operation value and the third integrated operation value are equal, and determining whether the identity of the blockchain sensor is legal. For example, if the blockchain sensor is forged, the last task random number, the current task random number, and the identity stored in the blockchain sensor are acquired as forged or tampered data instead of real data, and the last task random number stored in the blockchain sensor is different from the last task random number already stored in the blockchain node, so that the second integration operation value is not equal to the third integration operation value. Therefore, the current blockchain sensor is judged to be illegal, the data sent by the blockchain sensor is marked as invalid, and the authentication process of the blockchain sensor is ended. When the blockchain sensor is legal, the last task random number, the current task random number and the identity label stored in the blockchain sensor are not forged or tampered, and the second integration operation value and the third integration operation value are equal, so that the current blockchain sensor is judged to be legal, and subsequent authentication action is continued.
In addition, in step S3 and step S7, the encryption operation and the decryption operation may use a symmetric key algorithm, that is, the key used in the encryption operation is the same as the key used in the decryption operation, so that the ciphertext can be decrypted by the fourth integrated operation value to obtain the plaintext when the first integrated operation value is equal to the fourth integrated operation value. For example, when the blockchain sensor is illegal, the id stored in the blockchain sensor for calculating the first integrated operation value and the last task random number are forged or tampered, so that the id and the last task random number are different from the id stored in the node for calculating the fourth integrated operation value, and the first integrated operation value and the fourth integrated operation value are not equal to each other, and finally, the decryption of the ciphertext cannot be realized by using the fourth integrated operation value. Therefore, step S7 is also an identity authentication for the blockchain sensor.
After the identity authentication of the blockchain sensor is passed through steps S6 and S7, step S8 is continued, and the comparison operation is performed between the plaintext and the last stored task state information to obtain a comparison operation result, thereby completing the authentication of the blockchain sensor. The step S8 can be understood as a data authentication step for the blockchain sensor.
Specifically, the comparison operation in step S8 may be a difference value operation, and a difference value between the plaintext and the last stored task state information is taken as a comparison operation result.
Further, when the comparison operation result is within the preset difference value range, the block chain sensor passes the authentication, and the current task random number and the current task state information are both linked and stored, so that the authentication of the block chain sensor is completed. And when the comparison operation result is out of the preset difference range, the authentication of the block chain sensor fails, and the current task random number and the current task state information are marked as invalid to finish the authentication of the block chain sensor.
Furthermore, a difference value between the plaintext and the stored last task state information is taken as a comparison operation result, and the plaintext and the stored last task state information can be specifically converted into a binary code form respectively; and comparing the binary codes of the two codes, and counting the bits with difference to obtain a comparison operation result.
The preset difference range is a preset difference digit range, and the preset difference digit range is set for the number of allowable difference digits and can be set according to specific conditions. For example, assume that the plaintext binary code is 110001010111101, assume that the last state information binary code is 110001010110111, the difference bit number between the two is 2 bits, and assume that the preset difference bit number is 0-7 bits, and the 2 bits are in the range of 0-7 bits. Therefore, when the comparison operation result is within the preset difference value range, the block chain sensor passes the authentication, and the current task random number and the current task state information are both linked and stored, so that the authentication of the block chain sensor is completed.
In addition, it may be set that the authentication of the blockchain sensor is completed once every lapse of a preset time interval. The authentication of the blockchain sensor may be that the blockchain link point initiates an authentication request, or that the blockchain sensor initiates an authentication request by itself, that is, the authentication request may be initiated by the blockchain link point or the blockchain sensor of the blockchain network, so as to trigger an authentication process. The preset time interval may be set according to specific needs, and the application is not particularly limited.
In the authentication method for the blockchain sensor provided by this embodiment, the identity of the blockchain sensor, the random number of the previous task, and the state information of the previous task are stored in the blockchain link point in advance, and the identity of the blockchain sensor is authenticated whether to be forged or tampered by comparing the identity of the blockchain sensor to be authenticated with the identity already stored in the blockchain node. And comparing whether the difference between the current task state information and the last task state information stored in the node is within a preset difference range through encryption and decryption operation of the symmetric key so as to authenticate whether the data transmitted by the block chain sensor is forged or tampered. The authentication method for the blockchain sensor provided by the embodiment can perform identity authentication on the blockchain sensor and perform data authentication on data transmitted by the blockchain sensor, so as to ensure the credibility of the blockchain sensor and the credibility of the data stored in the blockchain network.
When the blockchain network includes n blockchain nodes capable of implementing peer-to-peer communication, m may be connected to the ith blockchain nodeiThe authentication method for the blockchain sensor provided by the present application is exemplified below for a plurality of blockchain nodes and a plurality of blockchain sensors.
Fig. 3 is a flowchart of a second authentication method for a blockchain sensor according to an embodiment of the present disclosure. As shown in fig. 3, the present embodiment provides an authenticator for a blockchain sensorThe method first executes step S1 to obtain the current task random number R of the jth blockchain sensor of the ith nodeijCurrent task state information STAijLast task random number Rij' and identification IDij
Wherein, i is 1,2,3 … n, j is 1,2,3 … mi
Continuing to step S2, the ID is identifiedijAnd the last task random number Rij' Hash operation is performed to obtain the first integrated operation value H (ID)ij‖Rij') to a host; and, for the last task, random number Rij', current task random number RijAnd an identity IDijPerforming Hash operation to obtain a second integrated operation value H (R)ij′‖Rij‖IDij)。
Continuing to step S3, the first integrated operation value H (ID) is usedij‖Rij') for the current task state information STAijPerforming encryption operation to obtain ciphertext
Figure BDA0002560198070000061
Step S4 may be performed in parallel with any of steps S1-S3, S4, obtaining the last task random number CR that has been storedij' and last task State information CSTAij. It should be noted that, in step S4, the identification ID is actually required to be used as the basis of the identificationijCalling the stored random number CR of the last task in the database of the blockchain nodeij' and last task State information CSTAij
Continuing to step S5, the current task is given a random number RijID, IDijAnd the last task random number CR that has been storedij' Hash operation is performed to obtain a third integrated operation value H (CR)ij′‖Rij‖IDij) (ii) a And, for the identity IDijAnd the last task random number CR that has been storedij' Hash operation is performed to obtain the fourth integrated operation value H (ID)ij‖CRij′)。
Continuing to execute the determination step S6, the second integration value H (R) is determinedij′‖Rij‖IDij) And a third integrated operation value H (CR)ij′‖Rij‖IDij) Whether or not equal. R if the identity of the blockchain sensor has not been forged or tampered withij′=CRij', and further H (R)ij′‖Rij‖IDij)=H(CRij′‖Rij‖IDij). Or, the transmission data of the block chain sensor in the data transmission process is not forged or tampered, then RijAnd IDijIs also trusted and the second integrated value is equal to the third integrated value.
When H (R)ij′‖Rij‖IDij)=H(CRij′‖Rij‖IDij) Then, step S7 is executed to integrate the value H (ID) with the fourth integrated operation valueij‖CRij') is a secret key, and the encrypted text is decrypted to obtain a plaintext
Figure BDA0002560198070000071
When H (R)ij′‖Rij‖IDij)≠H(CRij′‖Rij‖IDij) Then, step S7' is executed to generate the current task random number RijAnd current task state information STAijAnd all the data are marked as invalid, and the authentication of the jth blockchain sensor of the ith node is completed.
Continuing to step S8, the plaintext is written
Figure BDA0002560198070000072
With the last task state information CSTA already storedijAnd performing comparison operation to obtain a comparison operation result, and finishing the authentication of the jth block chain sensor of the ith node. At the first integrated operation value H (ID)ij‖Rij') and a fourth integrated operation value H (ID)ij‖CRij') equal, the ciphertext can be decrypted into plaintext, so that the plaintext
Figure BDA0002560198070000073
With the last task state information CSTA already storedijThe comparison is actually made to the current task state information STAijWith last task state information CSTAijMaking an alignment.
Specifically, a difference value between the plaintext and the stored previous task state information is taken as a comparison operation result, and the plaintext and the stored previous task state information can be converted into a binary code form respectively; carrying out modulo two addition operation on the binary codes of the two codes to obtain a modulo two addition code; and counting the '1' in the modulo two addition code to obtain a comparison operation result.
In this embodiment, the preset difference range is a preset difference value range, and the preset difference value range is a setting of an allowable number of "1" in the modulo two addition code, and may be set according to specific situations. The modulo two addition operation rule is addition carry-less, so when two binary codes are subjected to modulo two addition operation, the addition of the same number is equal to 0, and the addition of different numbers is equal to 1. For example, assume that the plaintext binary code is 11000100000000, assume that the last state information binary code is 11000111111111, the modulo two addition code is 11111111, the number of "1" in the modulo two addition code is 8, and assume that the preset difference value range is 0-7, and 8 are out of the range of 0-7. Therefore, the authentication of the blockchain sensor fails, the current task random number and the current task state information are marked as invalid, and the authentication of the blockchain sensor is completed.
It is easily understood that, if there may be a difference between the current task and the previous task, the current task state information generated by the blockchain sensor and the previous task state information already stored in the node may also be a difference, but when there is a great difference between the current task and the previous task, the blockchain sensor may be attacked or tampered, so that corresponding data authentication needs to be performed on the blockchain sensor.
In a second aspect, fig. 4 is a first block chain network topology diagram for block chain sensor authentication provided in an embodiment of the present application. As shown in fig. 4, the present application provides a blockchain network for blockchain sensor authentication, comprising a plurality of blockchain nodes 1 capable of point-to-point communication and a blockchain sensor 2 connected to the blockchain nodes 1, at least one blockchain node 1 performing an authentication operation on the blockchain sensor as an authentication node 3, the authentication node 3 being configured to perform steps S1-S8.
In a third aspect, referring to fig. 4, the present application provides a second blockchain network for blockchain sensor authentication, comprising a plurality of blockchain nodes 1 capable of point-to-point communication and a blockchain sensor 2 connected to the blockchain nodes 1, at least one blockchain node 1 as an authentication node 3 performing an authentication operation for the blockchain sensor 2, the blockchain sensor 2 being configured to perform steps S1-S3, and an information transfer step: and sending the current task random number, the second integration operation value and the ciphertext to the authentication node.
The authentication node 3 is configured to perform steps S4-S8.
The same and similar parts in the various embodiments in this specification may be referred to each other. In particular, for the embodiments, since they are substantially similar to the method embodiments, the description is simple, and the relevant points can be referred to the description in the method embodiments.

Claims (12)

1. An authentication method for a blockchain sensor, comprising:
acquiring a current task random number, current task state information, a previous task random number and an identity of a block chain sensor;
performing integration operation on the identity and the last task random number to obtain a first integration operation value; performing the integration operation on the last task random number, the current task random number and the identity to obtain a second integration operation value;
performing encryption operation on the current task state information by taking the first integration operation value as a secret key to obtain a ciphertext;
acquiring a last task random number and last task state information which are stored by a block chain node;
performing the integration operation on the current task random number, the identity and the last task random number stored by the block chain node to obtain a third integration operation value; integrating the identity and the last task random number stored by the block chain node to obtain a fourth integrated operation value;
determining whether the second integrated operation value and the third integrated operation value are equal;
when the second integration operation value is equal to the third integration operation value, the fourth integration operation value is used as a secret key to decrypt the ciphertext to obtain a plaintext;
and comparing the plaintext with the last task state information stored in the block chain node to obtain a comparison operation result, and finishing the authentication of the block chain sensor.
2. The authentication method for a blockchain sensor according to claim 1, wherein the authentication of the blockchain sensor is completed once every lapse of a preset time interval.
3. The authentication method for a blockchain sensor according to claim 1 or 2, wherein the integration operation is one of a hash operation, a data stitching operation and a data superposition operation.
4. The authentication method for a blockchain sensor according to claim 1 or 2, wherein the current task state information includes data collected by the blockchain sensor and a generated time stamp.
5. The authentication method for a blockchain sensor according to claim 1 or 2, wherein the encryption operation and the decryption operation employ a symmetric key algorithm, and the first integrated operation value and the fourth integrated operation value are equal.
6. The authentication method for blockchain sensors according to claim 1 or 2, further comprising:
and when the second integration operation value is not equal to the third integration operation value, marking the current task random number and the current task state information as invalid, and finishing the authentication of the block chain sensor.
7. The authentication method for the blockchain sensor according to claim 1 or 2, wherein the comparison operation is a difference value operation, and a difference value between the plaintext and the last task state information already stored in the blockchain link point is taken as a comparison operation result.
8. The authentication method for blockchain sensors of claim 7, further comprising:
when the comparison operation result is within a preset difference value range, the block chain sensor passes authentication, and the current task random number and the current task state information are both linked and stored, so that the authentication of the block chain sensor is completed;
and when the comparison operation result is out of the preset difference range, the block chain sensor fails to authenticate, the current task random number and the current task state information are marked as invalid, and the authentication of the block chain sensor is completed.
9. The method of claim 8, wherein the taking a difference value between a plaintext item and a last task state information already stored in the blockchain link point as a comparison operation result comprises:
converting the plaintext into a binary code form to obtain a plaintext binary code;
converting the last task state information stored by the block chain node into a binary code form to obtain a last state information binary code;
and comparing the plaintext binary code with the previous state information binary code, and counting the bits with difference between the plaintext binary code and the previous state information binary code to obtain a comparison operation result.
10. The method of claim 8, wherein the taking a difference value between a plaintext item and a last task state information already stored in the blockchain link point as a comparison operation result comprises:
converting the plaintext into a binary code form to obtain a plaintext binary code;
converting the last task state information stored by the block chain node into a binary code form to obtain a last state information binary code;
performing modulo two addition operation on the plaintext binary code and the previous state information binary code to obtain a modulo two addition code;
and counting 1's in the modulo two addition code to obtain a comparison operation result.
11. A blockchain network capable of authenticating a blockchain sensor, comprising a plurality of blockchain nodes capable of point-to-point communication and blockchain sensors connected to the blockchain nodes, at least one of the blockchain nodes performing an authentication operation for the blockchain sensor as an authentication node,
the authentication node is configured to perform the steps of:
acquiring a current task random number, current task state information, a previous task random number and an identity of a block chain sensor;
performing integration operation on the identity and the last task random number to obtain a first integration operation value; performing the integration operation on the last task random number, the current task random number and the identity to obtain a second integration operation value;
performing encryption operation on the current task state information by taking the first integration operation value as a secret key to obtain a ciphertext;
acquiring a last task random number and last task state information which are stored by a block chain node;
performing the integration operation on the current task random number, the identity and the last task random number stored by the block chain node to obtain a third integration operation value; integrating the identity and the last task random number stored by the block chain node to obtain a fourth integrated operation value;
determining whether the second integrated operation value and the third integrated operation value are equal;
when the second integration operation value is equal to the third integration operation value, the fourth integration operation value is used as a secret key to decrypt the ciphertext to obtain a plaintext;
and comparing the plaintext with the last task state information stored in the block chain node to obtain a comparison operation result, and finishing the authentication of the block chain sensor.
12. A blockchain network capable of authenticating a blockchain sensor, comprising a plurality of blockchain nodes capable of point-to-point communication and blockchain sensors connected to the blockchain nodes, at least one of the blockchain nodes performing an authentication operation for the blockchain sensor as an authentication node,
the blockchain sensor is configured to perform the steps of:
acquiring a current task random number, current task state information, a previous task random number and an identity of a block chain sensor;
performing integration operation on the identity and the last task random number to obtain a first integration operation value; performing the integration operation on the last task random number, the current task random number and the identity to obtain a second integration operation value;
performing encryption operation on the current task state information by taking the first integration operation value as a secret key to obtain a ciphertext;
sending the current task random number, the second integration operation value and the ciphertext to the authentication node;
the authentication node is configured to perform the steps of:
acquiring a last task random number and last task state information which are stored by a block chain node;
performing the integration operation on the current task random number, the identity and the last task random number stored by the block chain node to obtain a third integration operation value; integrating the identity and the last task random number stored by the block chain node to obtain a fourth integrated operation value;
determining whether the second integrated operation value and the third integrated operation value are equal;
when the second integration operation value is equal to the third integration operation value, the fourth integration operation value is used as a secret key to decrypt the ciphertext to obtain a plaintext;
and comparing the plaintext with the last task state information stored in the block chain node to obtain a comparison operation result, and finishing the authentication of the block chain sensor.
CN202010603948.1A 2020-06-29 2020-06-29 Authentication method for blockchain sensor and blockchain network Active CN111770089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010603948.1A CN111770089B (en) 2020-06-29 2020-06-29 Authentication method for blockchain sensor and blockchain network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010603948.1A CN111770089B (en) 2020-06-29 2020-06-29 Authentication method for blockchain sensor and blockchain network

Publications (2)

Publication Number Publication Date
CN111770089A CN111770089A (en) 2020-10-13
CN111770089B true CN111770089B (en) 2022-04-08

Family

ID=72722898

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010603948.1A Active CN111770089B (en) 2020-06-29 2020-06-29 Authentication method for blockchain sensor and blockchain network

Country Status (1)

Country Link
CN (1) CN111770089B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472546B (en) * 2021-09-02 2022-05-24 杭州链城数字科技有限公司 Data trusted processing method, block chain platform and terminal equipment
CN114339653B (en) * 2022-03-04 2022-05-24 杭州格物智安科技有限公司 Block chain system based on wireless sensor network and data recording method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789047A (en) * 2017-03-03 2017-05-31 钱德君 A kind of block chain identification system
CN107579817A (en) * 2017-09-12 2018-01-12 广州广电运通金融电子股份有限公司 User ID authentication method, apparatus and system based on block chain
CN108881287A (en) * 2018-07-18 2018-11-23 电子科技大学 A kind of Internet of things node identity identifying method based on block chain
CN109146484A (en) * 2018-08-31 2019-01-04 深圳付贝科技有限公司 Common recognition verification method, digging mine machine and block catenary system based on block chain
CN109728898A (en) * 2019-03-08 2019-05-07 湖南师范大学 Internet-of-things terminal safety communicating method based on block chain technology
EP3512228A1 (en) * 2018-01-10 2019-07-17 E.On Se Method for securely providing analytics result and sensor device to determine authentic data
CN110535647A (en) * 2018-05-25 2019-12-03 上海诚频信息科技合伙企业(有限合伙) Believable data transmission method, system, electronic equipment, storage medium
CN110944301A (en) * 2019-12-02 2020-03-31 重庆瑞坤科技发展股份有限公司 Intelligent cell equipment monitoring system based on block chain and key management method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110400136B (en) * 2018-04-27 2021-05-14 腾讯科技(深圳)有限公司 Account management method, device, server and storage medium based on block chain
CN108737980A (en) * 2018-04-28 2018-11-02 深圳众厉电力科技有限公司 A kind of power transformer chamber environmental data collecting and processing system based on block chain technology
US11063760B2 (en) * 2018-08-22 2021-07-13 Sasken Technologies Ltd Method for ensuring security of an internet of things network
CN110443073A (en) * 2019-07-31 2019-11-12 南瑞集团有限公司 A kind of anti-tamper date storage method, apparatus and system based on block chain
CN110599342B (en) * 2019-09-23 2021-08-06 腾讯科技(深圳)有限公司 Block chain-based identity information authorization method and device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106789047A (en) * 2017-03-03 2017-05-31 钱德君 A kind of block chain identification system
CN107579817A (en) * 2017-09-12 2018-01-12 广州广电运通金融电子股份有限公司 User ID authentication method, apparatus and system based on block chain
EP3512228A1 (en) * 2018-01-10 2019-07-17 E.On Se Method for securely providing analytics result and sensor device to determine authentic data
CN110535647A (en) * 2018-05-25 2019-12-03 上海诚频信息科技合伙企业(有限合伙) Believable data transmission method, system, electronic equipment, storage medium
CN108881287A (en) * 2018-07-18 2018-11-23 电子科技大学 A kind of Internet of things node identity identifying method based on block chain
CN109146484A (en) * 2018-08-31 2019-01-04 深圳付贝科技有限公司 Common recognition verification method, digging mine machine and block catenary system based on block chain
CN109728898A (en) * 2019-03-08 2019-05-07 湖南师范大学 Internet-of-things terminal safety communicating method based on block chain technology
CN110944301A (en) * 2019-12-02 2020-03-31 重庆瑞坤科技发展股份有限公司 Intelligent cell equipment monitoring system based on block chain and key management method

Also Published As

Publication number Publication date
CN111770089A (en) 2020-10-13

Similar Documents

Publication Publication Date Title
CN109756338B (en) Authentication apparatus, computer-implemented method of authentication apparatus, and computer-readable medium
US9467293B1 (en) Generating authentication codes associated with devices
US10375057B2 (en) Systems and methods for certificate chain validation of secure elements
US11336641B2 (en) Security enhanced technique of authentication protocol based on trusted execution environment
EA036987B1 (en) Systems and methods for device authentication
CN113691502B (en) Communication method, device, gateway server, client and storage medium
US10856146B2 (en) Electronic device verification
US10547451B2 (en) Method and device for authentication
JP2020530726A (en) NFC tag authentication to remote servers with applications that protect supply chain asset management
CN111770089B (en) Authentication method for blockchain sensor and blockchain network
KR20120053929A (en) The agent system for digital signature using sign private key with double encryption and method thereof features to store in web storage
JP2017524306A (en) Protection against malicious changes in cryptographic operations
CN107480564B (en) Improved RFID group authentication method
KR20120091618A (en) Digital signing system and method using chained hash
CN111008400A (en) Data processing method, device and system
CN112769789B (en) Encryption communication method and system
CN107888548A (en) A kind of Information Authentication method and device
CN111769952B (en) Data processing system of block chain sensor
CN107026729B (en) Method and device for transmitting software
Shah et al. Towards a lightweight continuous authentication protocol for device-to-device communication
US20170330177A1 (en) Payment terminal authentication
Pampori et al. Securely eradicating cellular dependency for e-banking applications
US11399020B2 (en) System and method for authenticating server identity during connection establishment with client machine
WO2016096574A1 (en) Security management system for authenticating a token device by a service provider server
US11528144B1 (en) Optimized access in a service environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant