{'fraction_non_alphanumeric': 0.05078280671790492, 'fraction_numerical': 0.011784799316823228, 'mean_word_length': 4.209371293001186, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Physical Layer Security of RIS-Assisted Communications under Electromagnetic Interference

This work investigates the impact of the ever-present electromagnetic interference (EMI) on the achievable secrecy performance of reconfigurable intelligent surface (RIS)-aided communication systems. We characterize the end-to-end RIS channel by considering key practical aspects such as spatial correlation, transmit beamforming vector, phase-shift noise, the coexistence of direct and indirect channels, and the presence of strong/mild EMI on the receiver sides. We show that the effect of EMI on secrecy performance strongly depends on the ability of the eavesdropper to cancel such interference; this puts forth the potential of EMI-based attacks to degrade physical layer security in RIS-aided communications.


I. INTRODUCTION
Reconfigurable intelligent surfaces (RIS) have drawn full attention thanks to their outstanding potential to enhance coverage, spectral/energy-efficiencies and security of forthcoming wireless systems. An RIS is usually built as a planar metasurface containing a large number of simple, nearly passive reflecting elements. These can be dynamically configured to tune the phases and amplitudes of the impinging waves on the RIS, helping to overcome the detrimental effects of the wireless channel [1]. While RISs have a tremendous potential to be a game-changer technology on the verge of 6G, practical impairments related to their implementation and deployment are known to limit their performance; these are the cases of imperfect phase-shift compensation [2], spatial correlation [3] or, very recently, electromagnetic interference (EMI) [4].
One of the potential use cases of RIS is physical layer security (PLS) [5], as a way to remarkably improve network security by exploiting the inherent randomness (e.g., noise, fading, interference) [6] of the wireless propagation medium. A large body of research has been motivated by the potential of integrating both RIS and PLS to enable secure and intelligent radio environments [7][8][9][10]. However, even though the effect of the EMI present in any wireless environment is known to affect RIS-aided communications [4], its effects in physical layer security have not been analyzed yet. Since EMI can appear from intentional and non-intentional (e.g., natural pollution/radiation) causes [4], it can play a key role in compromising the security of communications. From a PLS perspective, intentional signals can be induced in a cooperative jamming-eavesdropping fashion. In this situation, the eavesdropper may be able to cancel out such interference, which can provide an advantage over the legitimate node when decoding the information.
Based on the previous considerations, in this work we explore the PLS of RIS-assisted wireless communications affected by EMI. We consider a practical RIS scenario on which key aspects such as spatial correlation, phase-shift errors, and the coexistence of direct and indirect channels are considered, together with EMI. All these factors are integrated into statistical approximations for the equivalent signal-tonoise ratios (SNRs) of interest, which allow us to derive closed-form solutions for the secrecy outage probability (SOP) of the underlying system, assuming different considerations of EMI-awareness at the end nodes. Finally, through illustrative examples, we provide valuable insights on the role of EMI for the system's secure performance. Notation and terminology: Upper and lower-case bold letters denote matrices and vectors; f (·) (·) denotes a probability density function (PDF); F (·) (·) is a cumulative density function (CDF); U[a, b] denotes a uniform distribution on [a, b]; CN (·, ·) is the circularly symmetric complex Gaussian distribution; C denotes the set of complex numbers; E[·] is expectation operator; Var [·] is variance; Γ(·) is the gamma function [11, Eq. (6.1.1)]; Υ(·, ·), the lower incomplete gamma function [11,Eq. (6.5.2)]; 2 F 1 (·, ·; ·; ·) is Gauss hypergeometric function [11,Eq. (15.1.1)]; B (·, ·) is the Beta function [11, Eq. (6.2.2)]; diag (x) is a diagonal matrix with diagonal given by x; I N is the identity matrix of size N × N ; · is the Euclidean norm of a complex vector; (·) H is the Hermitian transpose; mod (·) is the modulus operation; ⌊·⌋ is the floor function, and sinc(w) = sin(πw)/(πw) is the sinc function.
II. SYSTEM AND CHANNEL MODELS We consider an RIS-assisted wiretap system consisting of a transmitter node Alice (A) with M antennas communicating with a single-antenna legitimate receiver Bob (B) via an RIS equipped with N nearly passive reconfigurable elements in the presence of a single-antenna eavesdropper Eve (E), as illustrated in Fig. 1. We also assume that the RIS is subject to EMI, which is produced by controllable/uncontrollable sources in the far-field of the RIS. According to [4], the received signals at both B and E can be written as where i ∈ {B, E} indicates either the legitimate or the eavesdropper channels, P is the transmit power at A, x is the transmitted signal with E{|x| 2 } = 1, and n i ∼ CN (0, σ 2 i ) is the additive white Gaussian noise with σ 2 i power. The EMI effect is denoted by the vector ν ∈ C N ×1 , h d,i ∈ C M×1 refers to the direct channel between A-to-B or A-to-E, w ∈ C M×1 denotes the beamforming vector at A, and g n is the nth row vector of G. In such a setup, the phases φ 1...n and the transmit beamforming vector w are jointly optimized [12] to maximize the received signal-to-noise ratio (SNR) at B. However, in practice, discrete phase-shifts and imperfect channel information at the RIS induces a residual random phase noise. We denote this error term as ϕ n , so the designed phase-shifts of the nth RIS element deviate from the optimal ones as ∆ n = φ n +ϕ n [2]. Based on the above, the composite channel observed by the receiver nodes without considering the EMI effect can be formulated as where Φ = diag(e j∆1 , . . . , e j∆N ) is the imperfect phase-shift matrix on the RIS and w * = ∈ C M×1 is the maximum ratio transmission (MRT) beamforming vector computed using the distributed algorithm described in [12]. Under isotropic scattering, the channel coefficients in (2) including spatial correlation on the RIS are formulated as [3] wherein β 1 , β 2,i , and β d,i encompass the average path loss attenuation for the links between A-to-RIS, RIS-to-i, and Ato-i, respectively. Moreover, where d H is the horizontal width and d V refers to the vertical height, and R ∈ C N ×N is the spatial correlation matrix on the RIS. To compute R, we resort to the scheme in [3] for a practical RIS setup. Hence, we assume a rectangular RIS geometry with N = N V N H elements, where N V and N H indicate the number of elements per row and per column, respectively. In this context, and under isotropic Rayleigh fading, the (a, b)th entry of the spatial correlation matrix R can be expressed as ζ ∈ {a, b}, and λ is the wavelength. Before getting into the received SNR formulations at the end nodes, the distribution of the EMI needs to be specified. Therefore, based on [4, Corollary 1], the EMI, denoted by ν, is distributed as where R under isotropic conditions is also given by (4), and σ 2 EMI is the EMI power produced by incoming waves on the RIS, generated by external (either intentional or nonintentional) sources. With the above formulations and from (1), the received SNR at B or E is given by and for the sake of convenience, we define γ i = P/σ 2 i as the average transmit SNRs for B or E, respectively. The parameter δ i ∈ {0, 1} is defined for convenience, in order to incorporate two situations: for δ E = 0, we have an EMI-aware eavesdropper which is capable to cancel out the interference, when it is intentionally originated from a colluding jammer. For δ E =1, the EMI-unaware eavesdropper is affected by EMI just like the legitimate receiver. In all instances δ B = 1, implying that the legitimate receiver does not have the ability to cancel out interference. Now, for the subsequent analytical derivations, we need to find an approximate statistical distribution for X i . To that end, we resort to the Moment-Matching Method (MoM) as described in the following section.

III. APPROXIMATE RIS CHANNEL MODELING
Although the MoM can be used for any target distribution, we formally demonstrate that Gamma and Exponential distributions offer excellent performance for approximating the equivalent RIS channels. Hence, in the following Propositions, we approximate X i as follows: Proposition 1. The distribution of X B can be approximated by a Gamma distribution, which is characterized by two parameters k B and θ B , i.e., where and Θ = R H ΦRR H Φ H R, and α i = Proof. See Appendix A.
Proposition 2. The distribution of X E can be approximated as a Exponential distribution, i.e., where Proof. See Appendix A.

IV. PLS PERFORMANCE
According to (6), the required Eve's PDF and Bob's CDF to derive the PLS performance metrics are given below.
A. SNR Distributions 1) Distribution of γ E : Using (10), the PDF of the received SNR at E is obtained by carrying out a standard transformation of variables from (6), i.e., γ E = γ E |X E |. This yields, 2) Distribution of γ B : Using (7), and after a simple transformation of variables, i.e., γ B = γ B |X B |, the CDF of the received SNR at B is obtained as

B. SOP Analysis
In this section, we consider the well-known wiretap PLS setup for passive eavesdropping (e.g., Eve only monitors the network by trying to intercept the messages), where the channel state information of Eve's channel is not available at Alice. In this scenario, Alice's only choice is to encode the data into codewords at a constant secrecy rate R S . According to [13], the secrecy capacity is computed as C S = max {C B − C E , 0}, wherein C B = log 2 (1 + γ B ) and C E = log 2 (1 + γ E ) are the channel capacities at B and E, respectively. Notice that secure communication can be guaranteed only in those instants when R S ≤ C S , and is compromised otherwise, i.e., a secrecy outage occurs (e.g., data leakage to E). Mathematically, the SOP = Pr {C S < R S }, and its tight lower bound SOP L can be defined as [13] Proposition 3. The SOP L for RIS-assisted MISO wireless communications affected by EMI is obtained as Proof. SOP L can be obtained directly from [14, Eq. (7)] with the respective substitutions and after some manipulations.
Notice that the SOP L without EMI is also given by (15) as a by-product, by setting σ 2 EMI = 0 and substituting k i and θ i for their corresponding ones in (8) and (11).

V. NUMERICAL RESULTS AND DISCUSSIONS
We now evaluate the impact of EMI on the system secure performance, with special focus on the cases with EMI-aware and EMI-unaware eavesdropper; these are referred to as EA and EU in the sequel, for the sake of compactness. The phase noise term ϕ n for the RIS is modeled as a zero-mean Von Mises random variable (RV) with shape parameter κ [2], where a smaller κ implies a larger phase error. For all figures, a carrier frequency of 3 GHz is used, so λ = 0.1m, and P/σ 2 i = 124 dB, which corresponds to transmitting 20 dBm over 1 MHZ of bandwidth with a 10 dB noise figure, so that σ 2 i = −104 dBm. For all SOP traces, we set R S = 1 bps/Hz. For Fig. 2, only the indirect RIS channels are considered, whereas Fig. 3 includes the presence of both direct and indirect channels. For convenience of discussion, we define ρ = P β1 σ 2 EMI as in [4] as the ratio between the signal power and EMI power at each of the RIS elements. Monte Carlo (MC) simulations are provided to double-check the validity of the approximations made throughout the analysis. Fig. 2a illustrates the received average SNRs in the presence/absence of EMI, for both the legitimate and eavesdropper's links (B and E, respectively) as a function of N . The system parameters are set to: κ = 3, Aβ 1 = Aβ 2,i = −72 dB, M = 4, and the correlation matrix is built by setting d H = d V = λ/4. Here, we examine how the presence of EMI at the end nodes impacts the received SNRs. As pointed out in [4] for the SISO case with perfect phase compensation, the average SNR at the legitimate receiver scales with N 2 , i.e., it benefits from both the aperture and passive beamforming gains of the RIS. In the presence of EMI, the aperture gain (i.e., the ability of collecting energy proportionally to the size of the RIS) is cancelled out because it affects equally to the desired signal and the EMI; hence, Bob's SNR scales now with N . With regard to the case of Eve, she cannot benefit from any sort of passive beamforming gain, since the RIS is optimized only taking into account Bob's CSI. Thus, in the absence of EMI, Eve's SNR scales with N (as stated in [7]). When EMI affects the system, the aperture gain is also cancelled out and hence Eve's SNR tends to saturate (i.e., does not grow with N ). We can also anticipate that in the EA scenario, since the scaling laws for the legitimate and eavesdropper's SNRs are coincident (i.e., scale with N ), one of the key advantages of RIS for PLS is eliminated.  In Fig. 2b, we present the SOP vs. β 2,B for different values of N and considering the EA/EU scenarios. The remaining system parameters are: κ = 7, Aβ 1 = −47 dB, Aβ 2,E = −80 dB, M = 5, d H = d V = λ/3, and ρ = 20 dB. We see that the case without EMI and the EU scenario yield comparable secrecy performances, since the effect of EMI is similar for both the legitimate and illegitimate SNRs when the remaining parameters are fixed. However, in the EA scenario we see the effect of EMI severely deteriorates the secrecy performance, since Eve's ability to cancel out the interference causes the appearance of an irreducible SOP floor. This suggests the possibility of designing EMI-based attacks to the RIS with the help of a malicious jammer in collusion with Eve. In all instances, we note that the statistical approximations made in Section III closely match MC simulations. Fig. 2c illustrates the effect of spatial correlation on the SOP as a function of ρ. The remaining parameters are set to: N = 100 κ = 5, Aβ 1 = Aβ 2,i = −58 dB, and M = 2. This figure explores the effects on the SOP of changing the area of the RIS by arranging the N elements closer, which also increases spatial correlation, in the presence of EMI and assuming the EA scenario. We consider d H = d V ∈ {λ/2, λ/3, λ/5}. Depending on the amount of EMI, two opposite behaviors are observed: in the high-EMI regime, i.e. lower values of ρ, a smaller RIS with closely arranged elements seems the preferred choice for having a better PLS performance. In this case, having a smaller RIS is beneficial since the amount of EMI collected by the RIS is lower. As ρ grows, i.e. EMI power is reduced, and then having the RIS elements more separated starts becoming benefitial for PLS; in other words, the passive beamforming gain becomes dominant compared to the amount of EMI collected by the RIS.
Finally, Fig. 3 evaluates the SOP performance as a function of the direct path power β d,i , i.e., the cases when both Bob and Eve experience a direct path. We assume the EA scenario with ρ ∈ {20, 25, 30, 40} dB, and include the case without EMI as a reference. The system parameter values are: N = 196, κ = 5, Aβ 1 = Aβ 2,B = −52 dB, Aβ 2,E = −62 dB, d H = d V = λ/4, and M = 2. Since in the EA scenario the EMI only affects the legitimate link, we see that the SOP improves as ρ grows. We observe that as the LOS power for both links grows, (i.e., β d,i ↑) the SOP tends to saturate to a large non-operational value due to EMI. For moderate values of ρ, a floor value for the SOP is also observed when β d,i ↓, i.e., when the LOS power is not dominant. In this specific setup, assuming an operational SOP value of 10 −3 , this target PLS performance cannot be achieved when ρ ∈ {20, 25, 30} regardless of the LOS condition.

VI. CONCLUSIONS
The secrecy performance of RIS-assisted MISO wireless systems affected by EMI has been explored for the first time in the literature. As a first contribution, we provided simple but accurate approximations for the end-to-end RIS channels that incorporate key practical factors such as spatial correlation, phase-shift noise, the existence of direct and indirect channels, and EMI. We also discussed the effects of modifying the number and arrangement of the RIS elements on PLS performance, identifying the key relevance of Eve's EMI-awareness on system's secure performance. The sensitivity of RISassisted communications to EMI-based attacks with jammereavesdropper collusion is put forth, and the development of transmission and optimization techniques that improve PLS performance of RIS-assisted communications in the presence of EMI is identified as a challenging topic for future research. h H 2,B ΦRh 2,B +1, respectively. Following a similar rationale as in [15], the desired and interfering signal terms in (1) are independent, provided that the interfering signal vector ν is independent of the elements of the matrix G with circularlysymmetric Gaussian entries, and independent of the direct link h d,B . Hence, a lower bound of the mean value of X B can be expressed as E[ (2)

APPENDIX
in which µ = δBAσ 2 EMI σ 2 B and η = Aβ 2,B tr R H ΦRΦ H R . Finally, by combining (16) to (21), the terms k B and θ B can be attained as in (8). This completes the proof.

B. Distribution of X E
In this case, we claim that X E can be approximated by an exponential RV with parameter θ E = E [X E ]. Let us define the RVs Y E = |h E | 2 , and Z E =