## 6 Networked ATM-CPS Security Assurance Architecture
### The Method of ATM-CPS Information Security Assurance Based on Blockchain Trusted Model
In the decentralized environment, blockchain technology, as a trust creation machine, ensures its authenticity and reliability by technical advantages of its distributed structure (the ledger in the blockchain is distributed on multiple nodes in the network, each node has a complete ledger, and the transaction bookkeeping is completed by multiple nodes distributed throughout the network), trust mechanism (the blockchain uses the principles of cryptography and authorization technology to establish a consensus mechanism to achieve the openness and transparency of the system so as to establish a good trust relationship between all trading parties in the system), and the tamper-proof time sequence (the consensus mechanism and encryption algorithm ensure that the ledger data cannot be tampered with. At the same time, the timestamp in the chain storage structure ensures the data stored in the block have strong traceability and verifiability). As a trust access mechanism, the blockchain edge layer monitors the ATM in real time. The digital signature algorithm of domestic password SM9 (a Chinese national standard cryptographic algorithm) is adopted to realize the digital signature function. Therefore, all nodes of the blockchain edge layer and the ATM layer need to submit identity tags to the blockchain network layer to generate private keys. Therefore, there is a certain foundation of trust among them. (a) Blockchain network layer. The block node is responsible for generating private keys for each node in the edge layer and each node in the ATM system layer. The Key Generation Center (KGC) ring replaces a single KGC in the SM9 standard algorithm. Let the number of nodes in the blockchain network layer be \(n\), and all nodes agree on a random number \(ks\in[1,N-1]\) as the signature master private key to calculate the signature master public key \(p_{pub-s}=[ks]p_{2}\). In addition, each member generates a random number \(ke_{i}\in[1,N-1]\) to calculate the element \(p_{pub-i}=[ke_{i}]p_{2}\) in G2. Then, sum \(p_{pub-e}=\left[\sum\limits_{i=1}^{n}Ke_{i}\right]p_{2}\). Among them, \(ks\), \(p_{pub-s}\) and \(p_{pub-e}\) are jointly held by the members in the ring, and each member keeps its \(ke_{i}\) secret while disclosing its public key \(p_{pub-i}\) to the members in the ring. If a \(KGC_{i}\) in the ring generates a key for node \(A\), its private key is \(ke_{i}\), the set of public keys in the ring is \(R=\left\{p_{pub-1},p_{pub-2},\cdots,p_{pub-h}\right\}\), and the node \(A\) is identified as \(ID_{A}\). Now, it needs to ring sign the message \(M\) and perform the following steps (Algorithm 1). ```
start  Calculate \(g=e\Big{(}p_{1},p_{pub-s}\Big{)}\) // in group \(G_{T}\)  Generate \(r\in[1,N-1]\)  Calculate \(w=g^{r}\)  Calculate \(h=H_{2}(M||R||w,N)\)  Calculate \(t_{1}=H_{1}(ID_{A}||hid,N)+ks\)  Calculate \(S=[t_{2}]p_{1}\) // \(t_{2}=(t_{1}r)^{-1}(r-h)\cdot ke_{i}\text{mod}N\)  Calculate \(l=ks\cdot r\cdot ke_{i}{}^{-1}\); \(\sigma=(h,R,S,l)\) // the ring signature of message \(M\). end
```  
**Algorithm 1**Ring signature is performed on message \(M\). ```
start  Calculate \(g=e\Big{(}p_{1},p_{pub-s}\Big{)}\) \(t=g^{h^{\prime}}\)  Calculate \(p_{\mathcal{Y}}=[h_{1}]p_{\mathcal{Z}}+p_{pub-s}\) \(//h_{1}=H_{1}(IDA||hid,N)\) \(p_{\mathcal{Z}}=[l]p_{\mathcal{Y}}\)  Calculate \(u=e(\mathcal{S}^{\prime},p_{\mathcal{Z}})\)  Calculate \(w^{\prime}=u\cdot t\)  Calculate \(h_{2}=H_{2}(M^{\prime}||R^{\prime}||w^{\prime},N)\) if \(h_{2}\
eq h^{\prime}\)  Verification failed  else \(d_{i}=ke_{i}\cdot t_{1}{}^{-1}\text{mod}N\) // for each KGC  Sends \(d_{i}\) to node \(A\) through a secure channel  Calculate \(ds_{A}=\sum\limits_{i=1}^{n}\Big{[}d_{i}\Big{]}p_{1}\) // as the signature private key. end
```  
**Algorithm 2**Verification. In the identity-based cryptographic algorithm SM9, a single KGC generates a user signature key through the master private key and user identity, which has the problem of key escrow.