The Cryptographic Key Distribution System for IoT Systems in the MQTT Environment
Abstract
:1. Introduction
- During the implementation, there was a problem with the hardware implementation of the commercially available TPM module. Several TPM hardware models tested (including the LetsTrust TPM and Optiga TPM) do not support encryption/decryption commands using symmetric keys. According to the [22] TCG specification, such modules should encrypt and decrypt. When developing the concept, I did not assume the existence of such a problem. The discovery of this problem made it necessary to change the concept of the whole system. I assumed that the hardware TPM would generate and store the keys, as well as secure the data stored in the hardware TPM’s resources and the node’s SD memory. A software TPM simulator will be used as a cryptographic coprocessor for symmetric encryption. This approach necessitated the secure transfer of symmetric keys, generated and stored in the hardware TPM, to the software TPM. I developed and implemented the procedure of duplicating keys and securely transferring the keys. The study refers to it in Section 3.5.
- In the presented system, the operation of a node was modelled as a state machine. The statuses for each node were defined, a state transition diagram was developed, and all functions implementing the node’s state change were designed. I devoted Section 3.7 to describing the states of KS-type and N-type nodes.
- Detailed descriptions of the implemented procedures are given in Section 3.8 and its subsections. There are three items that have expanded the list of implemented procedures compared to the concept. The names of the procedures are similar, but their contents are often entirely different.
- A simplified way of handling the contexts of the data exchange protocol used between nodes in the system was introduced. The presented modifications forced minor changes to the file structures of the nodes stored in each node’s SD memory.
- The implemented KGRD system has been tested. I evaluated the security level of the solutions used in the existing system. This is discussed in Section 3.9 and its subsections.
- a description of the modified solutions for the KGRD system designed to securely generate, distribute, and renew sensor nodes’ cryptographic keys;
- a description of a method of creating a trust for KGRD system nodes using a hardware TPM (to create local trust structures) and a software TPM as a crypto coprocessor;
- a description of the method of protecting the sensitive data of the system nodes;
- a description of the method of protecting sensitive data of nodes and the data exchange between system nodes;
- a description of how to use MQTT to transfer data among system nodes securely;
- an assessment of the solution’s resilience to the most common attacks on IoT networks;
- the implementation of the KGRD system demonstrator.
2. The General Concept of the Key Generation, Renewal, and Distribution (KGRD) System
2.1. The Idea behind the KGRD System
2.1.1. Collaboration between Clusters of IoT Nodes and Other IT Systems
2.1.2. MQTT Service
2.1.3. Components of the KGRD System
- KS (Key Server)—the system’s most important node. Its main task will be to handle N-type nodes and, in particular, generating keys for symmetric cryptography and securely distributing keys to target nodes,
- AC (Authorization Centre)—the node will provide identifiers for authorised N-type nodes, and it will be the intermediary for the exchange of credentials necessary to register N-type nodes in the internal files of the KS node,
- N1, N2, … Nk (Node)—nodes for which the KS node will provide keys,
- Broker—node necessary for the operation of the MQTT service, but in the KGRD system, it will only mediate the exchange of data between the other system nodes.
2.1.4. The Idea of Acquiring a Key
3. Solutions in the KGRD System
3.1. Requirements for the KGRD System
- KGRD generates symmetric keys only for authorised clients;
- the KGRD system works on the open Internet—KS and AC nodes of the system can build a trust relationship between each other using Certification Authority;
- the KS node will generate keys using a high entropy random number generator—this could be a quantum random number generator, for example;
- the AC node will be the source of authorised customer data for the KS node;
- the MQTT protocol will be used to exchange the data between system elements, especially during the cryptographic keys distributing procedure;
- the nodes of the system will cryptographically secure the stored data and data transmitted between the nodes of the system;
- each N-type node will have to be appropriately prepared and then registered in the KS node resources before it begins regular operation;
- the AC node will be responsible for providing the credential data to the N-type nodes necessary for the N node registration procedure;
- all cryptographic procedures of the KGRD system will be supported by a hardware TPM module (local trust structure creating, encryption/decryption, HMAC determination, key generating, etc.).
3.2. Protection of the Resources of Each Node of the System
3.3. KS Node Description
- local trust structure;
- own node’s data;
- a description of the nodes authorised to be served by the KGRD system;
- temporary data containing generated cryptographic material for nodes in generating or renewing keys.
- SRK and ANK asymmetric keys (RSA2048), which are the beginning of the local trust structure;
- Keys—other elements of the local trust structure:
- ○
- NK (Node Key) (AES128—16 bytes)—symmetric key for protecting the data in local SD memory;
- ○
- NKsign (16 bytes)—key required to calculate HMAC for data encrypted with NK key;
- N_ID (4 bytes)—sensor node identifier in the KGRD system;
- BA (Broker Address)—IP address of MQTT broker;
- NKiv (16 bytes)—initialization vector for NK (random string);
- TOPIC1 (16 bytes)—N nodes use this topic to initiate key generation and distribution; this topic subscribes to the KS node; this topic is randomly generated and is known for all registered N nodes;
- RN (1 byte)—variable describing the node’s roles and status.
- File node_desc—stores descriptions of N-type nodes that can use the KGRD system. There is one record in the file that includes a description of one node. Only the N_ID field in each file record is given in explicit form. The other fields are encrypted using the NK key. An HMAC is determined using the NKsign key for the N_ID field and the encrypted portion of the record. If only the N_ID and NTAG fields are filled in the record, it means that the node with the N_ID is not yet registered and cannot use the services of the KGRD system. Each file record includes the following fields (based on [21]):
- N_ID (Node ID) (4 bytes)—the identifier for a node that is authorised to register in the system;
- NTAG (Node Tag) (32 bytes)—field containing data to authenticate the node during its registry; SHA256 digest is determined from the concatenation of the N_ID field, the private part of the ANK key, and a 4 byte area containing the number of this node’s description entry in the node_desc file;
- NKSK (Node to Key server Security Key) (16 bytes)—symmetric key for the encryption of data transmitted between the KS node and the registered N_ID node (node registration procedure generates this key–only the registered node and KS node know this key);
- NKSKiv (16 bytes)—initialization vector for NKSK (random string);
- NKSKsign (16 bytes)—key required to calculate HMAC for data encrypted with NKSK key (only the N_ID node and KS node know this key);
- TOPIC2 (16 bytes)—N_ID node uses this topic (subscribes) to receive data from the KS node during key generation and distribution; this topic is randomly generated and is known for N_D and KS nodes;
- HMAC–HMAC hash value is determined for the entire record using the NKsign key.
- File gen_keys—the file store generated keys and topics from when these data were generated until the nodes for which these data were generated acknowledge receipts of these data. The identifiers, N_ID1 and N_ID2, are in plain text. The remaining areas are encrypted using the KS node’s NK key. HMAC is determined using the NKsign key for the N_ID1 and N_ID2 identifiers and the encrypted portion record. Each file record includes the following areas:
- N_ID1 (4 bytes)—identifier of the node initiating key generation and distribution for nodes N_ID1 and N_ID2;
- N_ID2 (4 bytes)—identifier of the second element in the pair;
- NNSK (Node to Node Security Key) (16 bytes)—symmetric key for the encryption of data transmitted between nodes N_ID1 and N_ID2;
- NNSKiv (16 bytes)—initialization vector for NNSK (random string);
- NNSKsign (16 bytes)—key required to calculate HMAC for data encrypted with a NNSK key;
- TOPIC3—the N_ID1 node uses this topic (subscribes) to receive data from node N_ID2; the N_ID2 node uses this topic (publishes) to send data from node N_ID1;
- TOPIC4—the N_ID1 node uses this topic (publishes) to send data from node N_ID2; the N_ID2 node uses this topic (subscribes) to receive data from node N_ID1.
3.4. N Node Description
- N node local trust structure;
- own node’s data;
- data that are necessary to ensure the protection of data transmission between N nodes (identifiers, keys, initialization vectors, and “topic” strings).
- SRK and ANK asymmetric keys (RSA2048), which are the beginning of the node’s local trust structure;
- Keys—other elements of the local trust structure:
- ○
- NK (Node Key) (AES128—16 bytes)—symmetric key for protecting the data in local SD memory;
- ○
- NKsign (16 bytes)—key required to calculate HMAC for data encrypted with the NK key;
- ○
- NKSK (Node to Key server Security Key) (AES128—16 bytes)—symmetric key for the encryption of data transmitted between the node and KS node (only the node and KS node know this key);
- NTAG (Node Tag) (32 bytes)—field containing data to authenticate the node during its registry; AC node passes this tag to the node when initializing the node in the KGRD system;
- N_ID (4 bytes)—identifier of the sensor node; passed by the AC node;
- RN (1 byte)—variable describing the node’s roles and status;
- BA (Broker Address)—IP address of MQTT broker;
- NKiv (16 bytes)—initialization vector for NK (random string);
- NKSKiv (16 bytes)—initialization vector for NKSK (random string);
- TOPIC1 (16 bytes)—the node uses this topic (publishes) to initiate the generation and distribution of symmetric keys (KS node subscribes to this topic);
- TOPIC2—the node subscribes to this topic while exchanging data with the node KS, while generating and distributing symmetric keys.
- N_ID (4 bytes)—identifier of the second node in the pair with which the data exchange will be secured using cryptographic material stored in this record;
- CTime (Creation Time of the key) (8 bytes)—timestamp of the moment the cryptographic material is received from the KS node;
- NNSK (Node to Node Security Key) (16 bytes)—symmetric key for the encryption of data transmitted between the local node and node N_ID (known only for the local node and node N_ID);
- NNSKiv (16 bytes)—initialization vector for NNSK (random string);
- NNSKsign (Node to Node Security Key for signing) (16 bytes)—key required to calculate HMAC for the data encrypted with the NNSK key;
- TOPIC3—the local node uses this topic (subscribes) to receive data from node N_ID; the N_ID node uses this topic (publishes) to send data to the local node;
- TOPIC4—the local node uses the topic to send (publishes) data to node N_ID; the N_ID node uses this topic (subscribes) to receive data from the local node;
3.5. Ways of Implementing the N Node
- a standalone device with hardware TPM v.2.0 that meets all TCG specifications [22];
- a standalone device with a hardware TPM that does not meet all the requirements of the TCG specification [22] and, in particular, does not support encryption/decryption functions (such hardware TPM modules are available on the market, e.g., Infineon Iridium SLx 9670 and LetsTrust TPM 2.0);
- a standalone device using a software-based TPM simulator that has implemented all the functions described in the TCG specification [22];
- a software component that does not require a TPM fully emulates an N-type node’s operation. This component can obtain keys from the KGRD system for a traditional IT system to work with other N-type nodes.
- Obtain the public part of the key from the S2 system, which is to be the new parent of the duplicated key (for example, CCK), and transfer it to the S1 system.
- Execute the ANK key duplication command in the hardware TPM of the S1 system using the public part of the SRK key of the S2 system. The result is three files containing: the private part of the ANK key and the ANK key seed (both secured by the public key of the SRK system S2), as well as the public part of the ANK key.
- Execute a key duplication command (e.g., NK) by the S1 module using the public part of the key from the S2 module (e.g., CCK). The result is three files containing: the private part of the duplicated key (NK) and the seed of that key (both bound to the public key CCK of the S2 system), as well as the public part of the duplicated key. These files require no other security and can be transferred to the S2 system.
- Import the contents of the transferred files into the key hierarchy in the S2 system, starting with the new parent of the duplicate key (as an NK_v key).
3.6. AC Node Description
- The configuration of the AC node must comply with the security recommendations for nodes operating on the Internet (an example of such requirements is given in the final section of Section 3.8).
- Data exchange between the KS and AC node must be secured using mechanisms that use a recognised Certification Authority.
- The KS node will prepare credentials for new N nodes.
- The credentials for the N node will be transmitted, via a secure link, from the KS node to the AC node in a form that ensures the confidentiality and integrity of the data. The data packet will contain, among other things, an identifier for the node (N_ID) and a specially prepared NTAG tag. This tag is prepared so that it can be used only by the node for which it was prepared to register only with the KS node that prepared this tag.
- The credentials will be transmitted to the N node in a protected and controlled environment using a secure link, such as an SSH service.
3.7. Status of Nodes and Activities in the KGRD System
3.8. Procedures in the KGRD System
- The procedure for starting the Broker node.
- The procedure for initiating the KS node (KS_init).
- The procedure for preparing the credentials for an N node (KS_prep_cred).
- The procedure for establishing a cooperation KS node with the Broker node (KS_work).
- The procedure for initiating the N node (N_init).
- The procedure for setting the list of cooperators for node N (N_init_ses_keys).
- The procedure for registration of the N node in the KGRD system (N_register).
- The procedure for establishing a cooperation N node with the Broker node (N_work).
- The procedure for generating and distributing symmetric keys (N_request_key) involves three steps:
- (a)
- request a set of cryptographic keys and topics;
- (b)
- provide the generated cryptographic material to the destination node;
- (c)
- confirm the transfer of cryptographic material.
- Procedure for secure data exchange between nodes (N_data_send).
- The procedure for renewing and distributing a symmetric key involves three steps:
- (a)
- request the renewal of cryptographic material—includes activities such as notifying the other party of the initiation of the procedure,
- (b)
- deliver renewed cryptographic material to the nodes concerned,
- (c)
- confirm the transfer of cryptographic material.
- The procedure for restarting the node after powering on again (KS_start, N_start).
- Update the system firmware.
- Remove default installed and unnecessary accounts from the node’s operating system (e.g., in Raspbian, remove the account named “pi”) and change the passwords of the remaining accounts to something other than the default (as required by the security policy).
- Create another account that will be dedicated to the remote management of the node acting as a Broker. Logging into this account must require a password. This account can have the superuser privilege (to use “sudo” command) but with the superuser account password enforced.
- Run an SSH service that allows remote login via a secure link. The SSH service should be configured so that only selected accounts can be remotely logged in.
- Run and configure the MQTT service to force the use of TLS protocol (port tcp/8883). This approach requires certificates for the broker and the broker’s clients. A way to obtain such certificates is to use a self-signed Certificate Authority and server-side certificates on the Broker node. The generated certificates for the clients can be forwarded to the N nodes, via the AC node, as they pass their credentials to the nodes.
- Run and configure the local firewall (e.g., UFW) so that the node only supports the ports required for operation:
- to support SSH (port tcp/22) and, additionally, block traffic for six or more post-connection attempts from the same IP address in the last 30 s (to prevent brute force attacks),
- to support MQTT over a secured link (port tcp/8883)
- Disable all services that are not needed for broker operation in the system.
- Disable all unnecessary interfaces of the system, e.g., Bluetooth, Serial ports.
3.8.1. The Procedure for Starting the Broker Node
3.8.2. The Procedure for Initiating the KS Node
- the generation of trust structure in hardware TPM, including SRK and ANK keys;
- the generation of symmetric keys, NK and NKsign, and attaching them to the created trust structure—these keys and the NKiv field will be used to secure the node’s resources stored in SD memory;
- the generation of a temporary trust structure in a software TPM, including CCRK and CCK keys;
- the duplication of the NK key from the hardware TPM module and securely importing this key (NK_v) into the trust structure in the software TPM module;
- the creation and initialization of the following areas in the NVRAM of the hardware TPM: N_ID, BA, TOPIC1, NKiv, and RN;
- set the status for the KS node to “INIT_FULL” in the RN field.
3.8.3. The Procedure for Preparing the Credentials for the N Node
3.8.4. Establishing Cooperation KS node with the Broker Node
3.8.5. The N Node Initiation Procedure
3.8.6. Procedure for Setting the List of Cooperators for Node N
3.8.7. The Registration Procedure for the N Node in the KGRD System
- (1)
- Generate node registration request—a node sending a registration request to a KS node initiates the authentication process of that node in the system and expects to send NKSK and NKSKsign keys, NKSKiv, and TOPIC1 strings. Activities to be performed:
- The N node builds the nksk_key_req frame (Figure 19). The frame payload is encrypted, and the HMAC digest is calculated. Both of these protection actions use the NTAG field as a key.
- The N node sends the nksk_key_req frame using the TOPIC0 topic.
- (2)
- Generate cryptographic material: generate NKSK and NKSKsign keys, the NKSKiv initialization vector, and update the node_desc file entry for the N_ID node. Activities to be performed:
- The KS node verifies the HMAC digest from the received nksk_key_req frame and then decrypts the payload of that frame using the NTAG field from the node’s N_ID description as the key in both actions.
- The KS node generates the NKSK and NKSKsign keys, as well as the NKSKiv vector. It then prepares the node’s N_ID description. After encrypting the payload of this description with the NK and NKiv keys and determining the HMAC from NKsign, it saves the updated entry in the local node_desc file. Description of the way to modify the entry fields (only the N_ID field is not encrypted):
- N_ID and NTAG—remain unchanged,
- NKSK, NKSKiv and NKSKsign—generated by KS node,
- TOPIC2 = TOPIC2 field from nksk_key_req frame.
- The KS node sends back a confirmation of node registration (nksk_key_ans frame Figure 20) using the TOPIC2 from the received frame. The confirmation frame contains the fields NKSK, NKSKiv, NKSKsign, and TOPIC1. The frame payload is encrypted using the registered node’s NTAG. HMAC is also determined, using the registered node’s NTAG, for concatenating the explicit part of the frame and the result of the encryption.
- (3)
- Acquire NKSK, NKSKiv, NKSKsign and TOPIC1. Activities to be performed:
- The N node verifies the HMAC digest from the received nksk_key_ans frame, and then, it decrypts the payload of that frame using the node as the key in both actions.
- Save the received data in NVRAM of TPM.
3.8.8. Establishing Cooperation N Node with the Broker Node
3.8.9. The Procedure for Generating and Distributing Symmetric Keys
3.8.10. Secure Data Exchange between N-Type Nodes
- (1)
- Prepare data frame. Activities to be performed:
- The N_ID1 node prepares the node_data_req frame (Figure 27). The frame contains N_ID1 (identifier of the node sending the data), N_ID2 (data recipient identifier), and DATA fields. The N_ID1 node encrypts the N_ID2 and DATA fields, using an NNSK and NNSKiv key known only to both nodes, and determines the HMAC for all areas in the frame using the NNSKsign key that is also known only to them;
- the N node sends the nksk_data_req frame using TOPIC3 topic. The N_ID2 node subscribes to this topic to receive data from the N_ID1 node.
- (2)
- Receive data. Activities to be performed:
- The N_ID2 node first verifies the HMAC digest from the received node_data_req frame, and then, it decrypts the payload of that frame using the NNSK and NNSKiv fields generated for N_ID1 and N_ID2 nodes;
- the N_ID2 node extracts data from the received frame;
- the N_ID2 node sends back a confirmation of the data frame (node_data_ans frame Figure 28) using the TOPIC3 subscribed by the N_ID1 node. The N_ID2 encrypts the field N_ID1 using the NNSK and NNSKiv, and it determines HMAC using NKSKsign.
3.8.11. The Procedure for Renewing the Keys
3.8.12. Procedure for Restarting the Node after Powering on Again
- after powering off the KS node, when this node is in one of the states {INIT_FULL, READY, WORK};
- after powering off the N node, when this node is in one of the states {INIT_FULL, KWN_COOP, REGISTERED, WORK}.
- Generate a temporary trust structure in a software TPM, including CCRK and CCK keys.
- Duplicate the NK key from the hardware TPM module and securely import this key (NK_v) into the trust structure in the software TPM module.
3.9. Security Evaluation of KGRD System Solutions
3.9.1. System Reboot or System Crash
3.9.2. Node Replication Attack
3.9.3. Sensor Impersonation
- N_ID of the node;
- the private part of the ANK key;
- the 4 byte area containing the number of the entry about the description of this node in the node_desc file.
3.9.4. Attack on Transmitted Data
3.9.5. Denial of Service
3.9.6. Routing Attacks
3.9.7. Botnet Activities
4. Results
4.1. Demonstrator
- Exporting these credentials for N nodes to an external node_desc_export file—on the KS node, export activity extended the function of preparing the credential data for N nodes.
- Importing credentials for an initialised node N—an initialised node N imports one set of the credential data from the node_desc_export file before starting the procedure for initializing that node.
- Setting the list of cooperators of the node being initialized—the initialised node N obtains a list of N node identifiers from the node_desc_export file.
4.2. Test Cases
5. Discussion
- hardware generation of asymmetric and symmetric cryptographic keys;
- hardware generation of random numbers with high entropy;
- secure storage of cryptographic material of the internal NVRAM of the TPM;
- creating key hierarchies that can be used to build local trust structures;
- hardware support for encryption/decryption;
- support for Platform Configuration Registers that can be used for protection and attestation; internal node resources (this property was not used in the presented study).
- a limited list of supported asymmetric algorithms—RSA2048, RSA3072, RSA16384, ECC256, ECC384, and ECC521 are available;
- a limited list of supported symmetric algorithms—3DES, AES128, and AES256 are available;
- a limited list of supported hash functions—SHA-1, SHA256, SHA384, SHA512, and HMAC are available;
- the ability to generate key hierarchies based on RSA keys only;
- some hardware implementations do not support certain functions, e.g., encryption and decryption for symmetric algorithms. This problem was essential to implementing the solution to the previously published solution concept.
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Diffie, W.; Hellman, M.E. New Directions in Cryptography. IEEE Trans. Inf. Theory 1976, 22, 644–654. [Google Scholar] [CrossRef]
- Will, A.; Challener, D.; Goldman, K. History of the TPM. In A Practical Guide to TPM 2.0; Apress Media: Berkeley, CA, USA, 2015. [Google Scholar]
- Cecchinato, N.; Toma, A.; Drioli, C.; Oliva, G.; Sechi, G.; Foresti, G.L. A Secure Real-time Multimedia Streaming through Robust and Lightweight AES Encryption in UAV Networks for Operational Scenarios in Military Domain. In Proceedings of the Conference on Military Communication and Information Systems (ICMCIS), Udine, Italy, 17–18 May 2022. [Google Scholar]
- Keoh, S.L.; Kumar, S.S.; Tschofenig, H. Securing the Internet of Things: A standardization perspective. IEEE Internet Things J. 2014, 1, 265–275. [Google Scholar] [CrossRef]
- Frustaci, M.; Pace, P.; Aloi, G.; Fortino, G. Evaluating Critical Security Issues of the IoT World: Present and Future Challenges. IEEE Internet Things J. 2018, 5, 2483–2495. [Google Scholar] [CrossRef]
- Furtak, J.; Zieliński, Z.; Chudzikiewicz, J. Procedures for sensor nodes operation in the secured domain. Concurr. Comput. Pract. Exp. 2019, 32, e5183. [Google Scholar] [CrossRef]
- Furtak, J.; Zieliński, Z.; Chudzikiewicz, J. A Framework for Constructing a Secure Domain of Sensor Nodes. Sensors 2019, 19, 2797. [Google Scholar] [CrossRef] [PubMed]
- Dammak, M.; Senouci, S.M.; Messous, M.A.; Elhdhili, M.H.; Gransart, C. Decentralized Lightweight Group Key Management for Dynamic Access Control in IoT Environments. IEEE Trans. Netw. Serv. Manag. 2020, 17, 1742–1757. [Google Scholar] [CrossRef]
- Zhu, B.; Susilo, W.; Qin, J.; Guo, F.; Zhao, Z.; Ma, J. A Secure and Efficient Data Sharing and Searching Scheme in Wireless Sensor Networks. Sensors 2019, 19, 2583. [Google Scholar] [CrossRef] [PubMed]
- Park, M.; Park, Y.; Jeong, H.; Seo, S. Key Management for Multiple Multicast Groups in Wireless Networks. IEEE Trans. Mob. Comput. 2012, 12, 1712–1723. [Google Scholar] [CrossRef]
- Zhong, H.; Luo, W.; Cui, J. Multiple multicast group key management for the Internet of People. Concurr. Comput. Pract. Exp. 2016, 29, e3817. [Google Scholar] [CrossRef]
- Tan, H.; Chung, I. A Secure and Efficient Group Key Management Protocol with Cooperative Sensor Association in WBANs. Sensors 2018, 18, 3930. [Google Scholar] [CrossRef]
- Mehdizadeh, A.; Hashim, F.; Othman, M. Lightweight decentralized multicast–unicast key management method in wireless IPv6 networks. J. Netw. Comput. Appl. 2014, 42, 59–69. [Google Scholar] [CrossRef]
- Ding, W.; Hu, R.; Yan, Z.; Qian, X.; Deng, R.H.; Yang, L.T.; Dong, M. An Extended Framework of Privacy-Preserving Computation with Flexible Access Control. IEEE Trans. Netw. Serv. Manag. 2020, 17, 918–930. [Google Scholar] [CrossRef]
- Kung, Y.; Hsiao, H. GroupIt: Lightweight Group Key Management for Dynamic IoT Environments. IEEE Internet Things J. 2018, 5, 5155–5165. [Google Scholar] [CrossRef]
- Abdmeziem, M.R.; Tandjaoui, D.; Romdhani, I. A Decentralized Batch-Based Group Key Management Protocol for Mobile Internet of Things (DBGK). In Proceedings of the IEEE International Conference on Computer and Information Technology; Ubiquitous Computing and Communications; Dependable, Autonomic and Secure Computing; Pervasive Intelligence and Computing, Liverpool, UK, 26–28 October 2015. [Google Scholar] [CrossRef]
- Abdmeziem, M.R.; Charoy, F. Fault-Tolerant and Scalable Key Management Protocol for IoT-Based Collaborative Groups. In Security and Privacy in Communication Networks. SecureComm 2017; Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering; Lin, X., Ghorbani, A., Ren, K., Zhu, S., Zhang, A., Eds.; Springer: Cham, Switzerland, 2017; Volume 239. [Google Scholar]
- Johnsen, F.; Zieliński, Z.; Wrona, K.; Suri, N.; Fuchs, C.; Pradhan, M.; Furtak, J.; Vasilache, B.; Pellegrini, V.; Dyk, M.; et al. Application of IoT in Military Operations in a Smart City. In Proceedings of the International Conference on Military Communications and Information Systems (ICMCIS), Warsaw, Poland, 22–23 May 2018. [Google Scholar] [CrossRef]
- Suri, N.; Zieliński, Z.; Tortonesi, M.; Fuchs, C.; Pradhan, M.; Wrona, K.; Furtak, J.; Vasilache, B.; Street, M.; Pellegrini, V.; et al. Exploiting smart city IoT for disaster recovery operations. In Proceedings of the IEEE 4th World Forum on Internet of Things (WF-IoT), Singapore, 5–8 February 2018. [Google Scholar] [CrossRef]
- Manso, M.; Guerra, B.; Furtak, J.; Johnsen, F.; Michaelis, J.; Ota, D.; Suri, N.; Wrona, K. Connecting the Battlespace: C2 and IoT Technical Interoperability in Tactical Federated Environments. In Proceedings of the ICCRTS, Quebec, QC, Canada, 25 October 2022. [Google Scholar] [CrossRef]
- Furtak, J. Cryptographic Keys Generating and Renewing System for IoT Network Nodes—A Concept. Sensors 2020, 20, 5012. [Google Scholar] [CrossRef] [PubMed]
- Trusted Computing Group. Trusted Platform Module Library Specification (Part 1–4), Family 2.0, Level 00, Rev. 01.59, Trusted Computing Group, 2019-11-08. Available online: https://trustedcomputinggroup.org/resource/tpm-library-specification/ (accessed on 25 May 2023).
- Furtak, J. Data Exchange Protocol for Cryptographic Key Distribution System Using MQTT Service. In Proceedings of the Conference On Computer Science And Intelligence Systems (FedCSIS), Sofia, Bulgaria, 4–7 September 2022. [Google Scholar] [CrossRef]
- Healy, M.; Newe, T.; Lewis, E. Security for Wireless Sensor Networks: A Review. In Proceedings of the IEEE Sensors Applications Symposium, New Orleans, LA, USA, 17–19 February 2009; pp. 80–85. [Google Scholar] [CrossRef]
- Kolias, C.; Kambourakis, G.; Stavrou, A.; Voas, J. DDoS in the IoT: Mirai and Other Botnets. Computer 2017, 50, 40–44. [Google Scholar] [CrossRef]
- Singh, S.; Sharma, P.K.; Moon, S.Y.; Park, H.J. Advanced lightweight encryption algorithms for IoT devices: Survey, challenges and solutions. J. Ambient Intell. Humaniz. Comput. 2017. [Google Scholar] [CrossRef]
- McKay, K.; Bassham, L.; Sonmez Turan, M.; Mouha, N. Report on Lightweight Cryptography, NIST Interagency/Internal Report (NISTIR); National Institute of Standards and Technology: Gaithersburg, MD, USA, 2017. [CrossRef]
Topic | Node | Purpose |
---|---|---|
TOPIC0 1 | KS | An N-type node will use this topic to send the first request in the registration procedure |
TOPIC1 | KS | An N-type node will use this topic to send subsequent requests in the registration procedure |
TOPIC2 | N | KS node will use this topic to send messages to N-type nodes |
TOPIC3mn | Nm | The Nm node will use this topic to receive messages published by the Nn node |
TOPIC4mn | Nm | The Nm node will use this topic to publish messages to the Nn node |
State Name | Node Type | Description | Conditions That Must Be Met |
---|---|---|---|
NOT_INIT | KS, N | node is not initialized | The trust structures for the node and the required data have not been created in the NVRAM of the TPM |
INIT_FULL | KS, N | node initiated in full | The trust structure is generated in the hardware TPM |
The required data is generated in the NVRAM of the hardware TPM | |||
The trust structure is generated in the software TPM | |||
INIT | KS, N | node initialized after powering on again | The trust structure is generated in the hardware TPM |
The required data is generated in the NVRAM of the hardware TPM | |||
LACK of trust structure in the software TPM | |||
READY | KS | ready to register N nodes | KS node is fully initiated |
File “node_desc” is generated | |||
forwarded credentials for nodes N | |||
REGISTERED | N | node N registered | N node is fully initiated |
There is an NKSK key in the trust structure in the hardware TPM | |||
In the NVRAM of the hardware TPM, the existence of fields NKSKiv, NKSKsign and TOPIC1 | |||
There is an NKSK_v key in the trust structure in the software TPM | |||
WORK | KS | ready for normal operation | KS node is ready to register N nodes |
Communication with the MQTT broker is up and running | |||
WORK | N | ready for normal operation | N node is registered |
Communication with the MQTT broker is up and running | |||
KWN_COOP | N | known cooperators | N node is fully initiated |
File “ses_keys” is generated | |||
INIT_REG | N | After power on again, when the N node was previously in a REGISTERED state | Forwarded credentials for nodes N |
There is an NKSK key in the trust structure in the hardware TPM | |||
In the NVRAM of the hardware TPM, the existence of fields NKSKiv, NKSKsign and TOPIC1 |
Operation | Number 1 | Time [s] |
---|---|---|
Generation NNSK, NNSKiv and NNSKsign with the gen_keys file support (on the KS node) | (2) | 7 |
Receiving NNSK, NNSKiv, NNSKsign with the ses_keys file support (on the N2 node) | (4) | 4 |
Update the gen_keys file (on the KS node) | (5) | 7 |
Support of ses_key file (on the N1 node) | (6) | 4 |
Procedure | Operation | Number | Time [s] |
---|---|---|---|
The KS node initialization procedure 1 | Generating local trust structure (SRK, ANK) | (1) | 40–60 |
Generate keys NK and NKsign | (2) | 4 | |
Generating a temporary trust structure (CCRK, CCK) | (3) | 15–20 | |
Duplicating and importing NK | (4) | 8–10 | |
Generate N_ID, TOPIC1 and NK_iv and set BA address | (5), (6), (7) | 5–7 | |
The N node initialization procedure 2 | Generating local trust structure (SRK, ANK) | (1) | 40–60 |
Generate keys NK and NKsign | (2) | 4 | |
Generating a temporary trust structure (CCRK, CCK) | (3) | 15–20 | |
Duplicating and importing NK | (4) | 8–10 | |
Load N_ID and NTAG | (5) | 2 | |
Generate NKiv, NKSKiv, NKSKsign, and TOPIC | (6) | 4–6 | |
set BA address | (7) | 1 | |
N node registration procedure 3 | Generate NKSK, NKSKiv and NKSKsign, and node_desc file support | (2) | 4–5 |
Data exchange between nodes N1 and N2 4 | Acquire data | (2) | 2 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the author. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Furtak, J. The Cryptographic Key Distribution System for IoT Systems in the MQTT Environment. Sensors 2023, 23, 5102. https://doi.org/10.3390/s23115102
Furtak J. The Cryptographic Key Distribution System for IoT Systems in the MQTT Environment. Sensors. 2023; 23(11):5102. https://doi.org/10.3390/s23115102
Chicago/Turabian StyleFurtak, Janusz. 2023. "The Cryptographic Key Distribution System for IoT Systems in the MQTT Environment" Sensors 23, no. 11: 5102. https://doi.org/10.3390/s23115102
APA StyleFurtak, J. (2023). The Cryptographic Key Distribution System for IoT Systems in the MQTT Environment. Sensors, 23(11), 5102. https://doi.org/10.3390/s23115102