## 4 Proposed Key Management Infrastructure Design for IACS
### Key Establishment Phase
* Plant level devices:
* If CKMI server needs to update the private key of the specific device, it considers a new private key \(d_{i}\) (where \(d_{i}\) ranges from 1 to \(n\)-1). The new private key is encrypted using the Join key and sent to the device. The public key of the device is updated in the public key directory. * If CKMI server needs to modify all the security parameters of the device, it uses commissioning device. For plant level devices, the new parameters include elliptic curve domain parameters, new private key, join key and _PGK_. ```
1:if Key update is for Field devices then
2: CKMI server \(\xrightarrow{\{new\,\textit{polynomial\,\textit{share}}||ID\}\varepsilon_{j_{ \textit{jointkey}}}}\) Field device
3:elseif Key update is for Control devices then
4: CKMI server:
5: Updates the seed value of the corresponding device in the public matrix
6: Performs matrix multiplication \(A\) = Symmetric matrix (\(S\)) \(\times\) public matrix (\(P\)) and take transpose \(A^{T}\)
7: CKMI server \(\xrightarrow{\{new\,\textit{secret\,\textit{row}}||seed\,\textit{value}\} \varepsilon_{j_{\textit{jointkey}}}}\) Control device
8: CKMI server: Updates the public matrix in public key directory
9:elseif Key update is for Plant devices then
10: CKMI server \(\xrightarrow{\{new\,\textit{private\,\textit{key}}||public\,\textit{key}\} \varepsilon_{j_{\textit{jointkey}}}}\) Plant device
11: CKMI server: Public key of the device is updated in public key directory
12:endif
```
**Algorithm 6** Key update. ### Archival

Archival refers to off-line long-term storage of post-operational keys. The keying material that is no longer in regular use is archived. The cases where archiving can be needed includes instances of crypto period expiry and cases when the key material of a device is compromised. * The archived contents for the field level devices include polynomial shares and the _ID_ used, polynomial equation, Join key and _FGK_. * Control level devices: The archived contents for the control level devices include a public matrix (seed values), secret symmetric matrix (secret rows), Join key and _CGK_. * Plant level devices: The archived contents for the plant level devices include parameters of elliptic curves, the private key and Join key of the device and the _PGK_. ### Key Recovery

If the session key is lost due to device failure or crash in communication, the IACS devices themselves regenerate the pair-wise key by repeating the operations, as discussed in key establishment phase (Section 4.3). Algorithm 7 depicts the key recovery process for IACS devices. * Field level devices: The session key is regenerated using the polynomial shares followed by the operations, as discussed in the key establishment phase. * Control level devices: The session key is regenerated using the secret row and seed value followed by matrix multiplication operations, as discussed in the key establishment phase. * Plant level devices: The session key is regenerated using the private key and public key followed by scalar multiplication operations, as discussed in the key establishment phase. In the case that all security parameters of the device are destroyed, key recovery is made by CKMI server by reinstalling the parameters using the commissioning device. ```
1:if Pair-wise key is lost between field devices then
2: Devices regenerate it by exchanging IDs and substitute it in their polynomial shares. 3:elseif Pair-wise key is lost between control devices then
4: Devices regenerate it by exchanging seed values and by performing matrix multiplication operation. 5:elseif Pair-wise key is lost between plant devices then
6: Devices regenerate it by exchanging public keys and by performing scalar multiplication operation. 7:elseif All the security parameters of the device are lost then
8: Key recovery is done by CKMI server using the commissioning device
9:endif
```

**Algorithm 7** Key recovery.