## 4 Proposed Key Management Infrastructure Design for IACS
### Key Establishment Phase  
* Field level devices: Any pair of field devices establish secure communication between themselves using their preshared polynomial shares. Sinceb devices have the polynomial shares of the same polynomial equation, they can get the same shared secret key (Section 3.1). A nonce is used to prevent the replay attack. * Control level devices: Any pair of control devices establish secure communication between themselves using their preshared secret row and a seed value. Equation (3) and Figure 3 confirm that the same shared secret key is generated between any two control level devices (Section 3.2). A nonce is used to prevent the replay attack. * Plant level devices: Any pair of plant devices establish secure communication between them using their preshared elliptic curve parameters. The same key is generated on both devices (Section 3.3), e.g., _PD1_ and _PD2_, because _PK1_ = _K1_ \(\times\)_P2_ = _K1_ \(\times\) (_K2_ \(\cdot\) _G_) = (_K2_ \(\times\) _KD_) \(\times\) \(G\) = _K2_ \(\times\)_PI_ = _K2_ \(\times\) _(_KI_ \(\cdot\) _G_) = _K2_ \(\times\) _PI_ = _PK2_, where _PK1_ and _PK2_ are the shared secret key generated between the devices, _KI_ and _K2_ are the private keys and _P1_ and _P2_ are the public keys of the devices respectively. Nonce is used to prevent the replay attack. Algorithm 3 depicts the key establishment process for IACS devices. In Algorithm 3, _PK_ is the pair-wise key and _SK_ is the session key generated between the devices. ```
1:if Communication is between Field device (FD1) \(\rightarrow\) Field device (FD2) then
2: FD1 \(\xrightarrow{ID1}\) FD2
3: FD2: Computes _PK_ and generates nonce
4: FD2 \(\xrightarrow{ID2||\{nonce\}_{PK}}\) FD1
5: FD1: Computes _PK_ and _SK_ (nonce \(\times\) _PK_)
6: FD1 \(\xrightarrow{\{Data\}_{SK}||Hash(Data)}\) FD2
7: FD2: Computes _SK_ and checks for integrity of received data
8:elseif Communication is between Control device (CD1) \(\rightarrow\) Control device (CD2) then
9: CD1 \(\xrightarrow{\textit{SeedS1}}\) CD2
10: CD2: Computes _PK_ and generates nonce
11: CD2 \(\xrightarrow{\textit{SeedS2}||\{nonce\}_{PK}}\) CD1
12: CD1: Computes _PK_ and _SK_ (nonce \(\times\) _PK_)
13: CD1 \(\xrightarrow{\{Data\}_{SK}||Hash(Data)}\) CD2
14: CD2: Computes _SK_ and checks for integrity of received data
15:elseif Communication is between Plant device (PD1) \(\rightarrow\) Plant device (PD2) then
16: PD1 \(\xrightarrow{\textit{Public keyPD1}}\) PD2
17: PD2: Computes _PK_ and generates nonce
18: PD2 \(\xrightarrow{\textit{public keyPD2}||\{nonce\}_{PK}}\) PD1
19: PD1: Computes _PK_ and _SK_ (nonce \(\times\) _PK_)
20: PD1 \(\xrightarrow{\{Data\}_{SK}||Hash(Data)}\) PD2
21: PD2: Computes _SK_ and checks for integrity of received data
22:endif

### Key Storage

CKMI server maintains all the active keys used for secure communication at field, control and plant level networks. It maintains a database containing the attributes key store reference, network _ID_, Device _ID_, key generation date, and key expiry date. The key store database contains the cryptographic keying materials of key establishment parameters of the devices (Figure 4). The records in the key store are encrypted using a password known by the crypto officer. A redundant copy of the database and key store are maintained (backup) by the CKMI server to recover the parameters if keying materials are lost. * Field level devices: Key store contains Join key, device polynomial shares, polynomial equation and _FGK_ used for field level network devices. * Control level devices: Key store contains Join key, device secret rows, seed values and _CGK_ used for control level network devices. * Plant level devices: Key store contains Join key, elliptic curve parameters, private and public keys of the devices and _PGK_ used for plant level network devices. ### Device Addition

When a new authenticated device is required to be added to the network, it goes through the device registration phase (Section 4.2). Algorithm 4 depicts the device addition process for IACS devices. Figure 4: Key storage.