## 2 CRP Mechanism Based on Digital Files
### Generation of an Orderly Subset of Responses  
In the scheme described in Section 2.1, the responses generated from the CRP mechanism are directly converted into cryptographic keys K to encrypt a message M. To enhance security, we developed a scheme in which the ephemeral key K is picked randomly, independent from the CRP mechanism. Algorithm 2 for encryption and Algorithm 3 for decryption are summarized in Figure 2, and shown as follows:  
```
1: Variable input data: [C], [\(M\)]
2: Nonce [\(\omega\)], and stream [S] \(\leftarrow\) random number generator
3:\(\rightarrow\) Use Module 1: Generate a set of responses with C, and [\(\omega\),S]:  Output data: All \(N\), \(P\)-bit long, responses \(\{r_{1},\ldots,r_{N}\}\).
4:\(\rightarrow\) Module 2: Encrypt M and generate a subset of responses with\(\{r_{1},\ldots,r_{N}\}\): 4.1: key \(K\) with f states of \"\(1\)\": \(\{k_{1},\ldots,k_{N}\}\)\(\leftarrow\) random number generator
4.2:\(M^{*}\leftarrow\) encrypt(M, \(K\))
4.3: Filter subset of f responses \(\left\{r^{\prime}_{1},\ldots,r^{\prime}_{f}\right\}\) located at positions of \(K\) with state of \"\(1\)\"
4.4: Erase \(M\), \(K\), and the \(N-f\) responses located at positions of K with state of \"\(0\)\"
5: Output: \(C\), [\(S\), \(\omega\), \(M^{*}\)] and the f responses \(\left\{r^{\prime}_{1},\ldots,r^{\prime}_{f}\right\}\)
```  
**Algorithm 2**Generate a subset of responses with \(C\), and encrypt \(M\)  
The key K, which is randomly picked here, has two purposes: encrypting M and generating an orderly subset of responses. Only the f positions of K with a state of \"\(1\)\" are pointing at positions in the sequence of N responses that are kept, while the responses at the \(N-f\) positions of K with a state of \"\(0\)\" are skipped. The resulting orderly subset of f responses is kept for key recovery. Four totally independent streams are requested to uncover the responses, which are C, \(\omega\), S, and the subset of responses. The size of the responses needed to run this CRP mechanism is higher than the size as presented in  
Figure 2: CRP mechanism with subset of responses. The N responses are generated with the CRP. The subset of f responses corresponds to the position of the randomly picked K with a state of 1.  
Section 2.1. For example, approximately 128 responses, that are 100-bit long, are generated when K is 256-bit long. Therefore, 1.6 Kbytes are retrieved, rather than 256 bits in the simpler protocol. We notice that the orderly subset of responses does not have a fixed length. Assuming that the random number generator of the 256-bit long K has an equal probability to get a state \"0\" or \"1\", the probability \(P(X=x)\) of obtaining an x-bit long subset is shown in Figure 3. The median value of the distribution is 128 and varies approximately from 100 to 160. To obfuscate this information, we add nonces at the end of the subset to keep the length to 160 responses. The key recovery scheme as presented in Section 4 is based on a search from left to right that terminates when the sequence of 256 bits is identified; additional responses are ignored.  
The injection of errors in the subset of responses is detailed in Sections 4 and 5. Provided the BERs remain below an acceptable threshold (i.e., below 25%) the subset of orderly responses can be recognized as part of the iterative search; therefore, ephemeral key K can be recovered. In zero-trust networks, such an obfuscation can disturb opponents sharing the noisy network. Certain attacks are mitigated since the noisy responses are different than the ones generated from F and the CRP mechanism.