# SDR Proof-of-Concept of Full-Duplex Jamming for Enhanced Physical Layer Security
## 3 SDR Testbed Implementation  
In this work we explore the usage of the adapted SCS-HK scheme (Section 2.1) along with interference generation (Section 2.2) by the receiver which causes SI (Section 2.3) that must be canceled using the mechanisms described in Section 2.4. The schema of the proposed mechanisms is shown in Figure 1, whereby [PERSON] generates jamming noise to be mixed with the transmitted signal in such a way that [PERSON] cannot recover the signal of interest, while [PERSON] uses the advantage of the knowledge of the generated jamming noise to better estimate the transmitted signal. The developed proof-of-concept testbed uses Ettus Universal Software Radio Peripheral (USRP) B210 devices, programmed using GNU radio (source code is available at [36]).  
Figure 3 represents a more detailed flow graph implementation of [PERSON]'s side, which includes the SCS-HK scheme discussed. The data is obtained with the File Source block that creates samples that are adapted to be further managed by the Repack Bits block. The generated samples go through the Additive Scrambler with Key custom block to improve security (using the key as the seed) and enable symbol synchronization on the receiver side (to solve the whitening sequences problem). In the GNU-radio additive scrambler stock block, the input is treated as a continuous stream, i.e., without any seed reset; therefore, one bit error leads to multiple bit errors on the remaining stream. This can be solved by packetizing the output data of the scrambler, resetting the seed with a pre-established one and a frame of bits. Additionally, the SCS-HK uses a random key as the seed which is appended to the scrambled data. The scrambled data is then encoded using the FEC Encoder block with the algorithm that is defined in it, e.g., a (1100, 442) LDPC code in this case. The puncture component is the final step in which some bits of the payload are erased with a pre-established pattern \(P_{\text{PATTERN}}\). This operation is performed by the Puncture 64 Bits custom block. Finally, the header is mixed with the payload by combining the Vector Source and the Stream Mux blocks, thus creating the final packet.  
Figure 4 depicts [PERSON]'s implementation, where the Decoding block is an aggregation of the necessary blocks to decode the signal transmitted from [PERSON], whereby a SI cancellation mechanism (e.g., LMS Filter) is employed. Finally, note that [PERSON]'s flow graph is simplyan attempt to decode the received signal with the Decoding block alone, without any knowledge of the interference generated by [PERSON].  
The biggest challenge we faced when using the LMS/NLMS/RLS/QRD-RLS Filter blocks was that the noisy jamming sample that is mixed with the signal to be input in the second entry (i.e., picked up by [PERSON]'s receiving antenna) must be time aligned with its respective original jamming sample, i.e., both inputs of the adaptive filter need to be synchronized (in regards to the jamming samples) in order to work properly. The problem is created because the path through USRP Sink block, air/wireless channel and USRP Source block takes more time to travel compared with the direct path on the flow graph. The solution found was to create a block that delays the noise stream to synchronize it with the receiving stream. Therefore, the block selects the first \(X\) noise samples and performs a correlation operation against the mixed signal to find the value needed to delay the noise stream. This block was called Synchronization and works with a sliding window with size \(X\) on top of the mixed stream to perform a correlation operation on that window. If the result of the correlation is greater than a desired threshold, the delay is found, and the noise stream is delayed by the determined value to align with the other stream. Otherwise, the window will slide and perform the correlation operation again, until convergence.