A Static-loop-current Attack Against the Kirchhoff-Law-Johnson-Noise (KLJN) Secure Key Exchange System

: In this study, a new attack against the Kirchhoff-Law-Johnson-Noise (KLJN) key distribution system is explored. The attack is based on utilizing a parasitic voltage-source in the loop. Relevant situations often exist in the low-frequency limit in practical systems, especially when the communication is over a distance, or between different units within an instrument, due to a ground loop and/or electromagnetic interference (EMI). Our present study investigates the DC ground loop situation when no AC or EMI effects are present. Surprisingly, the usual current/voltage comparison-based defense method that exposes active attacks or parasitic features (such as wire resistance allowing information leaks) does not function here. The attack is successfully demonstrated and proposed defense methods against the attack are shown.


.2. Conditional Security
Conditionally secure key exchange systems are the ones used generally nowadays. They are software protocols installed at Alice and Bob. Such algorithms utilize computational complexity and achieve only (computationally) conditional security (see e.g., [1,2]). The system is temporarily secure provided the adversary has limited computational resources. A major goal of quantum computer developments is to crack these types of key exchange systems (e.g., the Shor algorithm). From an information-theoretic point of view, security is non-existent because Eve has all the information to crack the encryption, but she needs a long time to do that unless she has a quantum computer or a yet-to-be-discovered classical algorithm that can do the job in a short time. The security is not future-proof.

Unconditional (Information-Theoretic) Security
In order to achieve unconditional (information-theoretic) security at the key exchange, proper laws of physics with a special hardware are utilized. Two major classes of physics-based schemes have emerged for unconditional security: (i) Quantum key distribution (QKD) [3,4] concepts assume single photons and utilize quantum physics. The underlying laws of physics are Heisenberg's uncertainty principle and the related quantum no-cloning theorem [5]. Even though there are serious debates about the actual level of unconditional security a practical QKD can offer (see e.g., ), most scientists agree that QKD is unique in its offering information-theoretic security via (a dark) optical fiber and also through air at night, provided the visibility is good.
(ii) The Kirchhoff-Law-Johnson-Noise key distribution method that is based on the statistical physical features of the thermal noise of resistors . The related law of physics is the fluctuation-dissipation-theorem (FDT). Some of its advantages are: It works via wire connections including power, phone, and internet lines, which can be used as information channels [31,32] to connect all homes and other establishments. It can be integrated on a chip, which implies excellent robustness, low price, and applicability in bankcards, computers, instruments, and physical unclonable function (PUF) hardware keys [33,34]. Its low price allows general applications such as unconditional security for the control of autonomous vehicular networks [35,36].

On the KLJN Secure Key Distribution
The KLJN scheme  utilizes the thermal noise of resistors (or the emulation of that by a specific hardware). In the core scheme Alice and Bob have two identical pairs of resistors, R L and R H (R L < R H ), respectively (see Figure 1).
The key exchange protocol of a single secure bit is as follows: Alice and Bob randomly pick one of their resistors (R L or R H ), connect it to the wire channel, and keep them there during the bit exchange period while they execute voltage and/or current measurements to learn the resistor value at the other end (see below).
The noise voltage generators shown in Figure 1 with each resistor can be the resistors' own thermal noise, or an external noise generator emulating a much higher, common noise-temperature that is publicly agreed. The power density spectra of the voltage and current in the channel are given by the Johnson-Nyquist formulas [11] S where k is the Boltzmann's constant, T is the common temperature, and R A and R B are the actually connected resistances at Alice's and Bob's ends, respectively, with R A , R B ∈ {R L , R H }. After the measurement and spectral analysis, Equations (1) and (2) have two unknown variables, namely, the values of R A and R B , and thus Eve can find the values of the connected resistors, but not necessarily their locations, by solving these equations. We can represent the four different situations of the connected resistors (R L and/or R H ) at Alice's and Bob's ends by the indices of the connected resistors, LL, LH, HL, and HH, respectively. As all the resistors have the same (noise) temperature, the ideal system is in thermal equilibrium, where the second law of thermodynamics guarantees zero net power-flow. Hence, Eve cannot use the evaluation of power flow to determine the locations of the momentarily connected resistors unless they have the same resistance values. On the other hand, Alice and Bob can determine the connected resistor values by using Equations (1) or (2) since they know the value of their own connected resistors. When R A = R B , which happens at 50% of the bit exchange attempts, the results are discarded.
where k is the Boltzmann's constant, T is the common temperature, and R A and B R are the actually connected resistances at Alice's and Bob's ends, respectively, with R A , R B ∈ R L , R H { } . After the measurement and spectral analysis, Equations (1) and (2) have two unknown variables, namely, the values of R A and B R , and thus Eve can find the values of the connected resistors, but not necessarily their locations, by solving these equations.
We can represent the four different situations of the connected resistors ( R L and/or R H ) at Alice's and Bob's ends by the indices of the connected resistors, LL, LH, HL, and HH, respectively. As all the resistors have the same (noise) temperature, the ideal system is in thermal equilibrium, where the second law of thermodynamics guarantees zero net power-flow. Hence, Eve cannot use the evaluation of power flow to determine the locations of the momentarily connected resistors unless they have the same resistance values. On the other hand, Alice and Bob can determine the connected resistor values by using Equations (1) or (2) since they know the value of their own connected resistors. When R A = R B , which happens at 50% of the bit exchange attempts, the results are discarded. On Former Attacks Against the KLJN Secure Key Distribution Several attacks have been proposed but no attack has been able to compromise the unconditional security of the KLJN scheme because each known attack can efficiently be nullified by a corresponding defense scheme.
The attacks can be categorized into two classes: (i) Passive attacks that utilize the non-ideal or parasitic features in a practical KLJN system for information leaks. Non-zero wire resistance (see [37,38]) poses the greatest known threat, and the most efficient attack is power balance measurement (Second Law Attack) [39]. An efficient defense is based on a proper temperature-offset [39,40]. Temperature-inaccuracies [41] and resistance-inaccuracies [42] can also cause information leaks. On the other hand, these inaccuracies can compensate for each other [43] if used in a creative way. Non-zero cable capacitance [44] or cable inductance can also yield information leaks that can be fixed by specific designs including the proper Figure 1. The core of the Kirchhoff-Law-Johnson-Noise (KLJN) system. U HAn (t), U LAn (t), U HBn (t), and U LBn (t) are the (thermal) noise voltage generators for the related resistances R H and R L , respectively. U(t) and I(t) are the measured noise voltage and the current in the wire that are used to evaluate the power density spectra S u ( f ) and S i ( f ), respectively.

On Former Attacks Against the KLJN Secure Key Distribution
Several attacks have been proposed but no attack has been able to compromise the unconditional security of the KLJN scheme because each known attack can efficiently be nullified by a corresponding defense scheme.
The attacks can be categorized into two classes: (i) Passive attacks that utilize the non-ideal or parasitic features in a practical KLJN system for information leaks. Non-zero wire resistance (see [37,38]) poses the greatest known threat, and the most efficient attack is power balance measurement (Second Law Attack) [39]. An efficient defense is based on a proper temperature-offset [39,40]. Temperature-inaccuracies [41] and resistance-inaccuracies [42] can also cause information leaks. On the other hand, these inaccuracies can compensate for each other [43] if used in a creative way. Non-zero cable capacitance [44] or cable inductance can also yield information leaks that can be fixed by specific designs including the proper choice of frequency range and privacy amplification. Transients can also be utilized for attack [45] but there are various means of defense against these [46,47]. The newest KLJN system, the random-resistor-random-temperature KLJN (RRRT-KLJN) scheme [48], is robust against the above vulnerabilities, or at least, no known attack exists against it yet.
(ii) Active attacks, where Eve either modifies the information channel or she injects an extra current into it. Current injection attacks [30,49] and man-in-the-middle attacks [50] are examples which have been explored [56]. Due to the current and voltage comparison [50] feature and its more advanced cable-modeling version [49], active attacks are, so far, the least efficient attacks against the KLJN scheme.
(iii) Flawed attacks. There are some proposed attack methods that are based on misconceptions and they do not work. See their brief summary and criticism in, for example, papers [51][52][53][54][55] and the book [56].

The Situation that Eve Utilizes for the Attack
In practical KLJN systems, in order to save a wire, the common end of the resistors (see Figure 1) is often connected to the ground. In practical situations there is often an imbalance, a voltage difference between various locations of the ground that is due, for example, to ground loop currents or electromagnetic interference (EMI) [53]. This potential information leak was pointed out in [53] as a potential source of information leaks in the case of significant cable resistance. However, it was not realized in [53] that information leaks can exist even at zero cable resistance. The present study is directly relevant for DC current-based ground loops (such as during secure communication between different units in instruments [33,34]). For EMI-induced ground loops, our DC-limited study is only a first step in addressing a more general situation (which should be investigated in future works).
In this paper, we explore this new information leak in the DC parasitic voltage limit. Hence, consideration was given to situations where during the bit exchange period, the relative change in the parasitic voltage is small. For the sake of simplicity but without the limitation of generality, we assume that the imperfection is represented by a positive DC voltage generator located at Alice's end (see Figure 2).
Due to Kerckhoffs's principle of security, that is, the assumption that the enemy knows everything except the momentary key, we must assume that Eve knows the polarity and value of this DC voltage (if she does not know it at first, she will be able to extract it via long-time averaging). The direction of the current I(t) is assumed to point from Alice to Bob. The voltage U(t) and current I(t) in the wire contain the sum of a DC component and an AC (stochastic, that is, noise) component.
random-resistor-random-temperature KLJN (RRRT-KLJN) scheme [48], is robust against the above vulnerabilities, or at least, no known attack exists against it yet.
(ii) Active attacks, where Eve either modifies the information channel or she injects an extra current into it. Current injection attacks [30,49] and man-in-the-middle attacks [50] are examples which have been explored [56]. Due to the current and voltage comparison [50] feature and its more advanced cable-modeling version [49], active attacks are, so far, the least efficient attacks against the KLJN scheme.
(iii) Flawed attacks. There are some proposed attack methods that are based on misconceptions and they do not work. See their brief summary and criticism in, for example, papers [51][52][53][54][55] and the book [56].

The Situation that Eve Utilizes for the Attack
In practical KLJN systems, in order to save a wire, the common end of the resistors (see Figure  1) is often connected to the ground. In practical situations there is often an imbalance, a voltage difference between various locations of the ground that is due, for example, to ground loop currents or electromagnetic interference (EMI) [53]. This potential information leak was pointed out in [53] as a potential source of information leaks in the case of significant cable resistance. However, it was not realized in [53] that information leaks can exist even at zero cable resistance. The present study is directly relevant for DC current-based ground loops (such as during secure communication between different units in instruments [33,34]). For EMI-induced ground loops, our DC-limited study is only a first step in addressing a more general situation (which should be investigated in future works).
In this paper, we explore this new information leak in the DC parasitic voltage limit. Hence, consideration was given to situations where during the bit exchange period, the relative change in the parasitic voltage is small. For the sake of simplicity but without the limitation of generality, we assume that the imperfection is represented by a positive DC voltage generator located at Alice's end (see Figure 2).
Due to Kerckhoffs's principle of security, that is, the assumption that the enemy knows everything except the momentary key, we must assume that Eve knows the polarity and value of this DC voltage (if she does not know it at first, she will be able to extract it via long-time averaging). The direction of the current I(t) is assumed to point from Alice to Bob. The voltage U(t) and current I(t) in the wire contain the sum of a DC component and an AC (stochastic, that is, noise) component.  Let us analyze the resulting voltages and currents. The current in the wire is where I DC is its DC component and I n (t) is its AC (noise) component in which U An and U Bn , with U An ∈ {U LAn ; U HAn } and U Bn ∈ {U LBn ; U HBn }, are the voltage noise sources of the chosen resistors, R A and R B , respectively. The voltage on the wire is From Equations (3) and (6) we obtain where U DCw and U ACw (t) represent the DC and AC voltage components in the wire, respectively. The DC component can be written as The DC component is different during Alice's and Bob's LH and HL bit situations of secure bit exchange, which yields information leaks. In the LH situation, that is, when R A = R L and R B = R H , the DC component of the voltage on the wire is (9) and, in the HL bit situation, Note that as we have been assuming that in the given KLJN setup R H > R L , in this particular situation U HL < U LH .
For later usage, we evaluate the average of U LH and U HL and call this quantity the threshold voltage, U th , where The effective (RMS) amplitude U ACw of the noise voltage on the wire is identical in both the LH and HL cases: Note that the voltage and current noises in the wire follow a normal distribution since the addition of normally distributed signals results in a signal that has normal (Gaussian) distribution with a corresponding mean (see Equation (10)) and variance.
For an illustration of the information leak, see Figure 3. The DC component, that is, the mean value of the resulting (AC + DC) Gaussian depends on the bit situation during the secure key exchange. This dependence poses as a source of information for Eve about the secret key. This feature will be exploited below for the new attack scheme.

The Attack Scheme
The attack consists of three steps: measurement, evaluation, and guessing. (i) Measurement: During a single secure bit exchange, Eve measures N independent samples of the wire voltage.
(ii) Evaluation: She evaluates the fraction γ of these N samples that are above U th , which is 14) where N + is the number of samples that are above U th .
(iv) Eve's correct guessing probability p is given as where n tot is the total number of guess bits and n cor is the number of correctly guessed bits. The situation p = 0.5 indicates perfect security against Eve's attack.
In the next section, we demonstrate the attack method via computer simulation.

The Attack Scheme
The attack consists of three steps: measurement, evaluation, and guessing.
(i) Measurement: During a single secure bit exchange, Eve measures N independent samples of the wire voltage.
(ii) Evaluation: She evaluates the fraction γ of these N samples that are above U th , which is γ = N + N (14) where N + is the number of samples that are above U th .
(iv) Eve's correct guessing probability p is given as where n tot is the total number of guess bits and n cor is the number of correctly guessed bits. The situation p = 0.5 indicates perfect security against Eve's attack.
In the next section, we demonstrate the attack method via computer simulation.

Simulation Results
To test Eve's correct guessing probability p for the LH situation, we assumed that Alice and Bob selected R L = 1 kΩ and R H = 10 kΩ. During these experiments, the DC voltage was kept at a constant level of 0.1 V (see Figures 2 and 3). To generate noise, we used the white Gaussian noise function (wgn) from the Matlab communication system toolbox to test the success statistics of the attack scheme while varying the temperature. The effective bandwidth ∆ f and the range of temperatures were 1 MHz and 10 8 < T < 10 18 K, respectively. At lower temperatures p was 1, within the statistical inaccuracy of simulations; at the high-temperature limit it converged to 0.5. The duration of the secure bit exchange period was characterized by the number N of independent noise samples used during the exchange of the particular bit.
We tested secure key length M = 700 bits at different bit exchange durations represented by sample/bit numbers N = 1000, 500, and 200, respectively. Figure 4 shows Eve's correct guessing probability (p) of a key bit versus temperature. With temperature approaching infinity, the effective noise voltage on the wire also approaches infinity and the Gaussian density function is symmetrically distributed around the threshold voltage U th . Thus, the probabilities of finding the noise amplitude above or below U th are identical (0.5) Therefore, Eve's correct guessing probability represents the perfect security limit, p = 0.5. noise voltage on the wire also approaches infinity and the Gaussian density function is symmetrically distributed around the threshold voltage U th . Thus, the probabilities of finding the noise amplitude above or below U th are identical (0.5) Therefore, Eve's correct guessing probability represents the perfect security limit, p = 0.5. The observed dependence can be interpreted by the behavior of the error function (see also Equations (8) and (12)) where ( ) U t is the instantaneous voltage amplitude in the wire and the error function is The observed dependence can be interpreted by the behavior of the error function (see also Equations (8) and (12)) where U(t) is the instantaneous voltage amplitude in the wire and the error function is The noise in the KLJN scheme is a bandlimited white noise, and thus, in accordance with the Johnson formula, the effective noise voltage scales as Therefore, when temperature T is converging towards infinity, p converges to the perfect security limit of 0.5 (see Figure 4).

Some of the Possible Defense Techniques Against the Attack
Based on the considerations above, the impact of the attack can be eliminated by various means. The most natural ways are: (i) Cancelling the effect of the DC-voltage sources. For example, Bob can use a variable DC source that compensates for its effect. Similarly, eliminating ground loops is also beneficial.
(ii) Alice and Bob can increase the effective temperature, that is, the amplitudes of their noise generators (see Equation (18) and Figure 4).
(iii) Alice and Bob can increase the bandwidth to increase the effective value of the noise (see Equations (18) and (20)). However, the bandwidth must stay below the wave limit [54] to avoid information leaks due to reflection, and thus the applicability of this tool is strongly limited.

Conclusions
The KLJN secure key exchange scheme is a statistical physical system that offers unconditional (information-theoretic) security. For a detailed survey and its history, see the recent book [56].
In this paper a novel attack against the KLJN protocol is shown which has revealed that uses a frequently occurring parasitic feature, namely the imbalance of voltages between the ground points at the two ends. We showed that, in the DC limit, such parasite voltages and currents could cause information leaks. The present study is directly relevant for DC current-based ground loops (for example, during secure communication between different units in instruments [33,34]). The attack was demonstrated via computer simulation and proper defense protocols were shown to eliminate the information leak. For AC-type ground loops, our DC-limited study is only a first step in addressing a more general situation (which should be investigated in future works).