# Machine Learning for Physical Layer in 5G and beyond Wireless Networks: A Survey
## 4 Security and Privacy in 5G  
In 5G, multi-user and broadband services are provided by the service providers lying above the physical layer. The 3 GPP standardized cellular network is pervasive and capable of handling big data such that all critical and delay-sensitive applications require a latency of less than 1 ms. To provide different types of services--i.e., eMBBS, uRLLC, mMTC 5G--particular technologies will be used to cope with the user requirements [300]. Nonetheless, NGWN security and privacy will be the primary concerns in the future. For instance, a simple distributed denial of service (DDoS) attack may halt the services for a time and could result in disaster, particularly in delay-sensitive use cases; i.e., tele-hospital [301]. The cryptographic technique is a conventional technique for providing security for 5G and beyond networks [302]. A secret key is distributed between two parties in this scheme and acts as an essential primitive. However, due to high complexity in these heterogeneous networks, this technique becomes inefficient and creates bottlenecks in the IoT approach [303]. Cryptography is one of the encryption techniques used by these providers to grant security. Still, it has several loopholes: RSA, one cryptographic type, cannot fight insider attacks. An eavesdropper can break the cryptography technique with enough time and computational power. In distributed and ad-hoc networks, it is not easy to exchange the private keys, which are the base of the RSA algorithm [304]. These constraints indicate that security in the physical layer is a significant concern in 5G networks. Though these conventional cryptographic techniques provide reliable security methods for existing wireless systems, they could not facilitate an optimized IoT scenario platform due to the existence of point-to-point transmission, low latency rate, and heterogeneous infrastructure. Table 9 shows the standard bodies working in the security and privacy domain. In [305], the authors described channel reciprocity-based key generation (CRKG), which overcomes the limitation of the cryptographic technique. It shows potential in the wireless domain to establish secure keys among devices. The authors investigated the technique by deploying 5G with three transmission modes: duplex modes, mmWave transmission, and MIMO systems. The key generation scheme includes four important steps: channel probing is the first step, quantization is the second, information reconciliation is the third, and privacy amplification is the last and final step. When two parties alternately probe in the wireless medium, they acquire correlated measurements that produce channel randomness. Preprocessing techniques are added between the channel sounding and quantization to reduce correlation and boost the reciprocal channel features (time, frequency, or spatial domains). In the third stage of this process, error detection codes and protocols are implemented to share the same keys between two ends. Lastly, privacy amplification evades eavesdropping activities. Due to independent quantization keys for every party, CRKG represents a promising solution for limiting holistic security measures. In [306], OFDM basics are used to generate secret keys to enhance security between two parties. In [307], the authors simplified the extraction procedure by selecting one party to probe the channel and perform quantization measurement instead of choosing two parties. The preliminary key access through this scheme is further covered by the channel phase, followed by mapping,and before the equalization method key is distributed to the other party. The final version of the shared key is then used at the physical layer to perform authentication schemes. Both random signals and masked keys are exchanged between two parties at the physical layer. This approach is also invulnerable to passive and active attacks, in contrast to conventional authentication schemes. Following the guidelines in [308], Figure 8 explains the 5G security and privacy architecture system.