# Protecting Private Communications in Cyber-Physical Systems through Physical Unclonable Functions
## 3 Proposed Encryption Scheme
### Proposed Architecture and Global Overview  
Figure 1 shows the proposed security solution for cyber-physical systems. In this figure, two different modules are presented: a transmitter and a receiver. In the transmitter, a certain discrete-time digital information \(m[n]\) is collected to be transmitted. This information is injected in a symmetric encryption module, represented by \(\varepsilon[\cdot]\) operator, together with a key stream \(k[n]\). As a result, an encrypted message \(e[n]\) is obtained (1).  
\[\mathrm{e}[n]=\varepsilon(m[n],\ k[n]) \tag{1}\]  
This message is then transmitted through a wireless communication module. This module may be based on any existing technology such as Bluetooth, WiFi, or ZigBee. Hereinafter, we are assuming no errors are produced during the wireless transmission or, if produced, they are corrected by the native mechanisms considered by these technologies. For this analysis, thus, we are considering this module as a transparent component. The same solution could be applied to more complex scenarios, but additional mechanisms to manage data transmission should be considered (that are not the focus of this article).  
Information is, then, recovered by the receiver. As a symmetric encryption scheme is being employed, the same encryption function may be employed to decrypt the original information (2). To this function, in this case, it is injected the encrypted message \(e[n]\) and the key stream generated by the receiver \(k^{*}[n]\). A clear information \(m^{*}[n]\) is then obtained.  
\[m^{*}[n]\ =\ \varepsilon(e[n],\ k^{*}[n]) \tag{2}\]  
The recovered information \(m^{*}[n]\) is only equivalent to the original information \(m[n]\) only if encryption key \(k[n]\) and decryption key \(k^{*}[n]\) are equal. To guarantee both key streams have exactly the same sequence, a synchronization signal \(s[n]\) is calculated and injected into the receiver's key generator.  
Figure 1: Global overview of the proposed solution.  
This assumption may be hard to fulfill but different schemes have implemented this mechanism successfully [15; 36]. In particular, in our work, we are employing physical unclonable functions. The key generator design based on PUF (see Section 3.3) guarantees the same sequence is generated in both the transmitter and the receiver (Sections 3.3 and 4 will provide evidence about this requirement). The described synchronization signal ensures, besides, both sequences present the same time base (as seen below).  
This synchronization signal is calculated through a correlation algorithm in the synchronization module (3). In this algorithm, a simple correlation estimator \(c[r]\) between both key streams is obtained. As the key generator guarantees both key streams (\(N\) bits length sequences in the transmitter and the receiver) are the same sequence, it is only necessary to analyze the delay \(r\) between both keys. The delay to be corrected in the receiver's key is the value for which \(c[r]\) is maximum.  
\[c[r]=\sum_{n=0}^{N-1-r}k[n+r]\cdot k^{*}[n] \tag{3}\]  
With this synchronization correction, both stream keys are exactly the same sequence [37], and the symmetric encryption algorithm in the receiver may recover the original information.