Systems and methods for consensus-based data security for networked devices
Systems and methods for providing reliability and redundancy of data for networked nodes (e.g., sensors and/or actuators) is provided. Each sensor may operate as network node in the sensor network that may operate as a peer to peer (P2P) consensus network. Each network node may maintain its local copy of a data chain and may generate a data block for updating the data chain. After a threshold number of network nodes generate the same consensus block from the data block, each network node may update its local data chain by appending the consensus block thereto.
1. A method for providing data redundancy and reliability across plurality of network nodes, the method comprising:
commissioning a set of network nodes by providing secret root information thereto during a network commissioning phase;
generating, by a first network node of the set of network nodes, a first data block containing a cryptographic hash derived from the secret root information and data generated or received by the first network node;
broadcasting the first data block to at least a subset of the network nodes;
receiving a second data block generated by a second network node of the network nodes;
generating a first consensus block based upon verifying the second data block;
broadcasting the first consensus block to at least a subset of the set of network nodes;
receiving, by the first network node, respective consensus blocks from one or more other network nodes of the network nodes;
updating, by the first network node, a data chain in response to determining that the number of consensus blocks including the first consensus block exceeds a threshold; and
wherein the second data block includes data generated or received by the second network node and a first consensus bit having a first value, and the first consensus block includes the data that was generated or received by the second network node and a second consensus bit having a second value different from the first value.
2. The method according to claim 1 , further comprising:
aligning a data chain stored by the first network node with the second data block.
3. The method according to claim 2 , wherein aligning the data chain with the second data block comprises:
requesting at least one block in a local data chain of the second network node in response to determining that a second consensus block cannot be chained to the data chain.
4. The method according to claim 1 , wherein the first data block includes a node ID, a payload, a sequence number, a nonce, and a time stamp.
5. The method of claim 1 , wherein the first data block includes a data certificate containing a node ID, next nonce, time rights, and a consensus bit.
6. The method according to claim 5 , further comprising changing the consensus bit when a consensus block is identified.
7. The method of claim 1 , wherein the first network node is a sensor.
8. The method according to claim 1 , wherein the verifying of second data block comprises decrypting an encrypted hash value in the second data block using a public key in the second data block.
9. The method according to claim 1 , wherein updating the data chain includes appending the first consensus block to the data chain.
10. The method according to claim 1 , further comprising commissioning each of the network nodes by providing different secret root information to each of the network nodes.
11. A system for providing data redundancy and reliability, the system comprising:
a plurality of network nodes, a set of network nodes being commissioned by receiving secret root information during a network commissioning phase;
a first network node of the set of network nodes including a processor configured to generate a first data block containing a cryptographic hash derived from the secret root information and data generated or received by the first network node;
the first network node utilizing a communications protocol to:
broadcast the first data block to at least a subset of the network nodes;
receive a second data block generated by a second network node of the network nodes;
the processor further configured to:
generate a first consensus block based upon verifying the second data block;
broadcast the first consensus block to at least a subset of the network nodes;
receive respective consensus blocks via said communications protocol from one or more other network nodes of the network nodes;
update a data chain in response to determining that the number of consensus blocks including the first consensus block exceeds a threshold; and
wherein the second data block includes data generated or received by the second network node and a first consensus bit having a first value, and the consensus block includes the data that was generated or received by the second network node and a second consensus bit having a second value different from the first value.
12. The system according to claim 11 , wherein the processor is further configured to:
align a data chain stored by the first network node with the second data block.
13. The system according to claim 12 , wherein the processor is further configured to:
request at least one block in a local data chain of the second network node in response to determining that a second consensus block cannot be chained to the data chain.
14. The system according to claim 11 , wherein the first data block includes a node ID, a payload, a sequence number, a nonce, and a time stamp.
15. The system of claim 11 , wherein the first data block includes a data certificate containing a node ID, next nonce, time rights, and consensus bit.
16. The system according to claim 15 , wherein the processor is further configured to change the consensus bit when a consensus block is identified.
17. The system according to claim 11 , wherein the first network node is a sensor.
18. The system according to claim 11 , wherein the processor is further configured to decrypt an encrypted hash value in the second data block using a public key in the second data block.