# A Framework for Constructing a Secure Domain of Sensor Nodes
## 6 Conclusions  
The usefulness of the presented framework was experimentally confirmed. The proposed framework could be easily extended by developing procedures for building trust between cooperating domains (clusters). It will enable secure data exchange between the security domains of sensor nodes. For military applications, in addition to security, one of the basic parameters of the applicability of the solution is the time of system preparation and its scalability. The experiments confirmed that the time of secure domain deployment is fully acceptable. The linear dependence of the number of operations performed, depending on the number of nodes creating the domain, was determined experimentally. Significant activities of the first stage of preparing a secure sensor node domain are described in detail in Reference [15]. The procedures presented in this study relate to the activities of the second stage of creating a secure domain of sensor nodes including, in particular, initiation of the first sensor node of the domain, registration of subsequent sensor nodes in the domain, and refreshment and confirmation of the status of the domain nodes. Other activities that are intended to be performed during the regular operation of the created domain are not described in this paper. In the presented procedures, particular attention was paid to the security of procedures--only sensor nodes prepared in the first stage had the possibility of effectively implementing the second-phase procedures. During the execution of each of the second-stage procedure, the XBee wireless link was used for data exchange. The asymmetrical cryptography (RSA-2018) was only used in the first step of the registration procedure of the sensor node in the domain to protect the data transmitted. In all other data protection activities (both those stored in the node's resources and those transmitted between domain nodes), AES symmetric cryptography was used in CBC (Cipher Block Chaining) mode. All described procedures were supported by TPM. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multicolumn{1}{c}{**Value of**} & \multicolumn{1}{c}{**Packet Length**} & \multicolumn{1}{c}{**sensor\_packet\_req**} & \multicolumn{1}{c}{**sensor\_packet\_ans**} \\
**Distance (mm)** & **Protect** & **(b)** & **(ms)** & **Transfer (ms)** & **(ms)** \\ \hline \(56\) & NO & 22 & 7.13 & 12.91 & 0.28 \\ \(56\) & AES & 22 & 87.29 & 12.94 & 86.87 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Transfer time of sensor data acquired by the Gateway node [17]. During the registration procedure of the node in the domain, a special NTAG tag was verified, which was generated for each sensor node during the preparation of this node in the first stage. The use of this tag eliminated the possibility of registration occurring in the domain of the node in which unauthorized impact in the resources of the sensor node occurred before this node was registered in the domain. The procedures necessary to present the operation of the secure domain of sensor nodes were implemented. For this purpose, a domain demonstrator comprising four mobile sensor nodes was prepared, one of which served as a Master, another node acted as a Gateway, and the others worked as Replicas. During the experiments, data generated by nodes of a secure domain were collected by the G node and sent to the recipient via the prepared MQTT broker. Selected results of performed experiments are presented in Reference [15]. Our future work will include the implementation of procedures for detecting damaged/misbehaving sensor nodes of the domain. Another crucial issue is the development of procedures for selecting new nodes to perform the Master and Gateway roles in case of damage to a node that has performed such roles and procedures for protecting sensor nodes from unauthorized influences on its hardware configuration or its data resources. The second direction of our future study will be to modify solutions using newer TPM implementations in version 2.0 and cryptographic algorithms based on elliptical curves.