## 4 Proposed Key Management Infrastructure Design for IACS
### Device Registration/Device Join Phase  
When a device is connected to the CKMI server for initial bootstrapping, the CKMI server sends a request for the device to send the resource configuration details. The device sends the unique device _ID_ and the resource configuration details (the type of device and resource footprint (battery power, memory, and processing capacity)). The resource configuration details are encrypted using the Join key. The CKMI server authenticates the device by decrypting the received message using the Join key of the corresponding device. Based on the resource configuration details, appropriate crypto mechanisms will be loaded into the device.  
* Field level devices: If the device belongs to field level category, polynomial method key establishment parameters, i.e., a polynomial share from the polynomial pool and a corresponding _ID_ used for generating the polynomial share, are sent to the device. The keying materials are encrypted using the Join key. The _FGK_ is loaded in all authenticated field devices for securing the broadcast messages to be sent by the CKMI server to all field level devices.
* Control level devices: The rows of matrix \(A\) are used as the key material for the devices to generate the secret key. Thus, each device will get a secret row from the secret matrix \(A\) and the corresponding column seed value from the public matrix \(P\). The keying materials are encrypted using the Join key and sent to the control devices. The _CGK_ is loaded in all authenticated control devices for securing the broadcast messages to be sent by the CKMI server to all control level devices. Public matrix _(P)_ is made available in the public key directory.
* Plant level devices: If the device belongs to the plant level category, it will load the elliptic curve domain parameters and a random number \(d_{i}\) (private key of the device). The keying materials are encrypted using the Join key and sent to the plant devices. The _PGK_ is loaded in all authenticated plant level devices for securing the broadcast messages to be sent by the CKMI server to all plant level devices. The elliptic curve parameters and public keys of the devices are made available in the public key directory.  
Algorithm 2 depicts the Device registration/Device join process for IACS devices.  
```
1:CKMI server \(\xrightarrow{\textit{Request for configuration details}}\)IACS device
2:IACS device \(\xrightarrow{\textit{DeviceID}||\{\textit{Configuration details}\}_{E_{\textit{Join keying}}}}\)CKMI server
3:if Device \(\in\) field level category then
4:CKMI server \(\xrightarrow{\{\textit{polynomial method keying materials}||FGK\}_{E_{\textit{Join keying}}}}\)Field level device
5:elseif Device \(\in\) control level category then
6:CKMI server \(\xrightarrow{\{\textit{matrix method keying materials}||CGK\}_{E_{\textit{Join keying}}}}\)Control level device
7:elseif Device \(\in\) plant level category then
8:CKMI server \(\xrightarrow{\{\textit{ECDH method keying materials}||PGK\}_{E_{\textit{Join keying}}}}\)Plant level device
9:endif
```  
**Algorithm 2** Device registration and Key distribution for IACS devices.