Forty thousand kilometers under quantum protection

Quantum key distribution (QKD) is a revolutionary cryptography response to the rapidly growing cyberattacks threat posed by quantum computing. Yet, the roadblock limiting the vast expanse of secure quantum communication is the exponential decay of the transmitted quantum signal with the distance. Today’s quantum cryptography is trying to solve this problem by focusing on quantum repeaters. However, efficient and secure quantum repetition at sufficient distances is still far beyond modern technology. Here, we shift the paradigm and build the long-distance security of the QKD upon the quantum foundations of the Second Law of Thermodynamics and end-to-end physical oversight over the transmitted optical quantum states. Our approach enables us to realize quantum states’ repetition by optical amplifiers keeping states’ wave properties and phase coherence. The unprecedented secure distance range attainable through our approach opens the door for the development of scalable quantum-resistant communication networks of the future.


Introduction
The quantum threat to secure communications makes top headlines and Niagara Falls of reviews and research explaining how quantum computers using, for example, Shor's algorithm [1], devalue the existing cryptographic schemes.Remarkably, the same advances in quantum physics that have created this quantum threat enable solutions for quantum security.Building upon quantum phenomena, novel quantum cryptography offers methods for unparalleled security, including quantum secure direct communication [2][3][4][5][6][7], probabilistic one-time programs [8][9][10], and quantum key distribution (QKD) [11][12][13][14][15][16][17].The QKD, on which we focus in our present work, allows two parties to share a secret bit sequence for various applications.The existing QKD protocols are efficient over relatively short distances due to the fundamental Pirandola-Laurenza-Ottaviani-Banchi (PLOB) bound [18], which dictates that secret communication rates decrease exponentially with channel length.The simplest approach to resolve this issue is to use the trusted reproduction nodes along the transmission line [19][20][21], which is a compromise to the overall security.The alternative solution is the utilization of quantum repeaters [22][23][24][25][26][27][28][29][30][31][32][33][34][35][36][37] which eliminates the need for trust in the intermediate relay.However, since quantum repetition manipulates fragile entangled states, its implementation at a long scale remains beyond state-of-the-art technologies.
Here, contemplating the physical nature of the quantum states' transmission, we lift the PLOB bound by using restrictions of quantum thermodynamics and the endto-end physical control over losses in the optical quantum channel.We shift the quantum cryptography paradigm building on the same quantum considerations that provide the foundations of the Second Law of Thermodynamics.Our approach ensures signal repetition through optical amplification, presumes no trust at the intermediate channel points, and expands the secure transmission range to global distances.This paves the way for constructing scalable quantum communication networks of the future-a problem that has garnered significant interest in recent years [38][39][40].

General idea
Conventionally, the eavesdropper (Eve) is seen as capable of exploiting all the losses from the transmission channel, irrespective of their origin.This puts a strong restriction on the number of photons in the transmitted quantum states, which significantly complicates their repetition.However, upon close quantum mechanical examination, this presupposition appears unrealistic.In reality, the majority of losses in optical fibers occur due to the light scattering on the quenched disorder and are distributed homogeneously along the line (hereinafter, we will be referring to such losses as to natural losses).In a single mode silica fiber's 1530-1565 nm wavelength window, the standard for modern telecommunications, these losses amount to approximately 4 × 10 −5 of the passing signal's intensity per meter.
We describe the information dynamics of the randomized signal transmitted over an optical channel.This consideration is carried out analogously to consideration of the Second Law of Thermodynamics, i.e., the dynamics of entropy, through the lens of the microscopic quantum mechanical laws [41][42][43].Had the system been isolated, its entropy would not decrease, i.e., Eve would not be able to obtain any information.In the presence of natural losses, the system can no longer be regarded as isolated, and thus, the eavesdropper gets an opportunity to decrease the system's entropy in analogy with the quantum Maxwell demon.However, in order to glean information from the scattering losses of relatively weak signals that we employ for our approach, Eve has to use quantum detection devices spanning an unfeasible length of optical fiber, see Supplementary Note 1.That is why one concludes that in this weak signal regime, Eve is unable to effectively collect and exploit natural losses.
Losses other than natural ones can, in turn, be physically controlled.We propose a technique of physical loss control (line tomography) implying that legitimate users detect local interventions by comparing the constantly updated tomogram of the line with the initial one, knowingly obtained in the absence of Eve.Line tomography involves sending the high-frequency test light pulses and analyzing their reflected (via the technique known as the time-domain reflectometry [44]) and the transmitted components.The coupling of photons to any eavesdropping system is impossible without modifying the fiber medium, which in turn inevitably changes the line tomogram.Unable to perform such radical interventions unnoticed, Eve is thus restricted to introducing small local leakages, which are precisely measured by the users.This implicates the possibility of employing the informationcarrying light states containing the numbers of photons that are sufficient to repeat the states through optical amplification yet not enough to be easily eavesdropped on.
Utilizing a cascade of accessible optical amplifiers to counteract the degradation of signals over extensive distances, as opposed to the employment of quantum repeaters [22][23][24][25][26][27][28][29][30][31][32][33][34][35][36][37], enables global transmission and high key distribution rates.It is important to note that these optical amplifiers should not be viewed as trusted nodes, as the integrity of the transmission scheme is maintained through end-to-end control by legitimate users, and there is no recourse to the form of classical data.
We showcase our approach via a prepare-and-measure QKD protocol utilizing non-orthogonal coherent photonic states |γ 0 ⟩ and |γ 1 ⟩ for encoding 0 and 1 bits.In the protocol's framework, our approach means restricting the fraction of photons leaked to Eve, r E , to ensure that the leaked states | √ r E γ 0 ⟩ and | √ r E γ 1 ⟩ sufficiently overlap, i.e., √ r E γ 0 √ r E γ 1 ∼ 1 (these states become mixed if the transmission channel includes amplifiers, but for now we ignore this fact for the sake of simplicity).
Eve cannot by any means-except by completely blocking part of the signal pulses [45] but this is prevented by the line tomography-extract more information than the Holevo quantity χ E [46] which tends to zero when √ r E γ 0 √ r E γ 1 → 1.The users monitor the value of r E and adapt the parameters of |γ 0 ⟩ and |γ 1 ⟩ to ensure that the intercepted pulses are poorly distinguishable.Thus, we overcome the PLOB bound by what can be called the "channel device-dependent" approach.This approach is no less physically justified as a traditional device-dependent scenario where the eavesdropper is assumed not to be able to substitute some of the equipment at the sender and receiver side.Hence, there are no compromises in security that allow us to increase the secret key distribution distance, only higher device dependence, with correct channel work ensured by tomography methods.

Protocol description
We put forth an exemplary QKD protocol based on our physical control approach.Let the legitimate users, the sender, Alice, and the receiver, Bob, be connected via a classical authenticated communication channel and optical line serving as a quantum channel.The protocol is designed as follows: Initial preparation 0. Alice and Bob carry out initial line tomography to determine the natural losses that Eve cannot exploit.At this and only this preliminary step, the legitimate users must be certain that Eve has no influence on the line.The users share the tomogram via the classical channel.

Line tomography
1. Alice and Bob perform the physical loss control over the line and, through comparison with the initial line tomogram, infer the fraction r E of the signal possibly seized and exploited by Eve.The users also localize the points of Eve's intervention.To update the line tomogram, users exchange information via the classical channel.If the stolen fraction grows too large so that the evaluated legitimate users' information advantage over Eve disappearsthe analytical estimate for this advantage is provided below-the transmission is terminated.

Transmission of quantum states
2. Using a random number generator, Alice produces a bit sequence of the length L. Alice ciphers her bit sequence into a series of L coherent light pulses, which she sends to Bob.The bits 0 and 1 are encoded into coherent states |γ 0 ⟩ and |γ 1 ⟩ respectively.Their parameters are optimized based on the known fraction of the signal seized by Eve r E and Eve's position in the line.The optimal parameters correspond to the maximum key distribution rate at given losses in the channel, the analytical relation for which is presented below.The optimal parameters are considered to be known to Alice and Bob and also to Eve. 5.The users perform error correction.The procedure can be done with well-known classical methods, e.g., linear codes [47][48][49], or with methods designed specifically for the QKD, such as the Cascade protocol [50][51][52].
6.The users estimate Eve's information obtained at the previous stages and perform the privacy amplification procedure to produce a shorter key (e.g., using the universal hashing method [53]) on which Eve has none or negligibly small information.
The steps from 1 to 6 directly constitute the process of key distribution, and the users must repeat them until satisfied with the total shared key length.It is important to note that the key is not generated solely by Alice in step 2; instead, it emerges through the collaborative simultaneous actions of both parties, with postprocessing playing a vital role in the process.
The particular way of encoding bits 0 and 1 into the parameters of coherent pulses |γ 0 ⟩ and |γ 1 ⟩ may vary.For illustrative purposes, we concentrate on the two simplest and straightforward schemes, viz.encoding bits into pulses with (a) different photon numbers, |γ 0 | 2 ̸ = |γ 1 | 2 , and phase randomization [54][55][56], and (b) same photon numbers, |γ 0 | 2 = |γ 1 | 2 , and phases different by π.In both encoding schemes, Alice varies |γ 0 | 2 and |γ 1 | 2 .More sophisticated encoding schemes, for instance, schemes leveraging the pulses' shapes, make exploiting the natural scattering losses even more unsolvable.To complicate the problem further, the cable design may include an encapsulating layer of metal of heavily doped silica, transforming the scattering radiation into heat under the control of the users; see Supplementary Note 2 for details.

Protocol security
Here, we delve into the security of the described protocol, by building upon the following: 1. Alice and Bob each generate random numbers that Eve cannot predict.
2. Other from the transmission channel-which is a fiber line with the embedded optical amplifiersand the classical authenticated channel, users' equipment is isolated from Eve.
3. Eve cannot effectively collect and exploit natural losses from the transmission channel.To eavesdrop on the signal, Eve must introduce new artificial local leakages.Eve can also use the local leakages on the original fiber discontinuities, such as bends or connections.
4. The transmission line between Alice and Bob is characterized by the initial line tomogram.All losses constituting deviations from the initial tomogram are attributed to Eve.

5.
Eve is bound to the beam-splitting attack.She may seize some fraction of the signal at any point of the optical line.With that, she is unable to replace any section of the line with a channel of her own creation since this action is detectable by the line tomography.
Attacks that deviate from the beam-splitting attack necessitate a significant alteration of the line tomogram, in which case the protocol should be terminated; as such, we will not delve into them here.We will refer to the point of Eve's intrusion into the line as the "beam splitter" and assume that any reflection back towards Alice from this point is insignificant.As our analysis will demonstrate, the protocol's efficiency is contingent on Eve's placement along the line.For the sake of simplicity, we will focus on the scenario in which Eve intercepts from a single point at the line.Indeed, with some overhead, the case where Eve intercepts from multiple points-stealing r (i) E from the i-th local leakage-can be reduced to a situation where Eve is at the single worst location for the users among all identified interception points, and she steals the effective overall leakage where we defined r (0) E = 0.This effective overall leakage is detectable by transmittometry, see Sec. "Physical loss control and amplification" for details.The detailed analysis of the multi-point interception and constructive interference will be the subject of our forthcoming publication.
To evaluate the protocol's security, we describe the evolution of Alice's, Bob's, and Eve's quantum systems and quantify the information available to different parties.We examine the case in which the beam splitter is placed immediately following one of the amplifiers, as this arrangement is most advantageous for Eve, but, with minimal adjustments, the same analysis can be applied to any arbitrary beam splitter's position.We derive an analytical expression for the length of the final secure key L f , which represents the users' informational advantage over Eve given the fixed value of r E and the distance between Alice and Eve D AE .This expression depends on the encoding and postselection parameters and should be maximized by the users to determine the parameters' optimal values.The condition L f /L > 0 for the chosen parameters ensures successful secret key generation [57].
At the beginning of the protocol, Alice encodes the logical bits into the coherent states with the different complex amplitudes, 0 → |γ 0 ⟩ , 1 → |γ 1 ⟩.In the photon number encoding scheme, the pulses are different in the average numbers of photons |γ 0 | 2 and |γ 1 | 2 , while the phase of each pulse is random.The photon number measurement at Bob's end is formalized in terms of the projective operators: where Ê0 , Ê1 and Êfail correspond to 0, 1, and failedmeaning that this result should be later discardedoutcomes respectively, |k⟩ is the Fock state of k photons, 1 is the identity operator, µ and θ 1−4 are the postselection parameters tuned by Bob depending on the proportion of the stolen signal.The photon numbers between µ − θ 1 and µ + θ 2 are difficult to relate to 0 or 1, while numbers below µ − θ 3 and above µ + θ 4 are associated with the information corruption: as we show in Supplementary Note 4, optical amplification imposes correlations between pulses received by Bob and Eve, and extreme photon numbers at Bob's end also constitute very distinguishable signals for Eve.
For the phase encoding (note that using this scheme requires that the optical fiber is phase-preserving), the pulses are characterized by the same average photon number, |γ 0 | 2 = |γ 1 | 2 , but by different, although fixed, phases.For instance, the relative phase can be π, γ 0 = −γ 1 = γ ∈ R, and then, to distinguish the pulses, Bob should perform homodyne measurement of the quadrature q corresponding to the real axis in the phase space: where |q⟩ is the eigenstate of q, and θ ′ 1,2 play the same role as θ 1−4 in the photon number encoding case.With this scheme, we deal only with two postselection parameters because probability distributions of measurement results for two pulses are symmetric with respect to q = 0.
For both encoding schemes, the operational values of ) are determined via maximizing the analytical expression for the predicted length of the final secure key L f , which, in turn, depends on the proportion of the stolen signal r E and the distance between Alice and Eve D AE .Correlations between the states at Eve's and Bob's disposal due to optical amplification drastically complicate the analytical description of states' evolution necessary for obtaining the expression for L f .We provide such a description in Methods, while here we write the final state of the combined quantum system of Alice's random bit (A), the signal component seized by Eve (E), and Bob's memory device storing the measurement outcome (B) after the legitimate users discard invalid bits, i.e., conditional to the successful measure-ment outcome: where is the P -function describing amplification (see Sec. "Physical loss control and amplification" and Supplementary Note 3), and integration operations are performed over the complex plane, i.e., and G 1(2) are, respectively, the transmission probability and amplification factor (the ratio of the output photon number to the input one of an amplification channel) of the effective loss and amplification channels equivalent to the cascade of amplifiers and losses before (after) Eve's beam splitter (these values depend on the distances between Alice and Eve, D AE , between Alice and Bob, D AB , and between neighboring amplifiers, d, see Eqs. (58)(59)(60) in Supplementary Note 3), p(✓|a) is the probability of the successful measurement outcomes in the case that Alice sends bit a = {0, 1} (the explicit form is given by Eqs. ( 17) and ( 18) in Methods).
In the case of photon number encoding, Alice randomizes the phase of each pulse.As a result, neither Bob nor Eve would know the phase φ of the incident pulse |γ a ⟩ = ||γ a |e iφ ⟩ which effectively means that the final state of the combined system is described by ρf ABE from Eq. (3) averaged over φ (see Supplementary Note 4 for details): After the invalid bits are discarded, the information available to Eve about the bits kept by Alice (per bit) is given by where S(X) = −tr [ρ X log 2 ρX ] is the quantum von Neumann entropy of system X (which is A, B, E, or their combinations, the corresponding density matrices are obtained from Eq. ( 3), or Eq. ( 5) if there is phase randomization, by taking partial traces), and S(Y|X) = S(XY) − S(X) is the conditional entropy.We calculate the upper bound of I(A, E) differently in the cases of photon number and phase encoding.In the first case, we use the Holevo bound [46], see Supplementary Note 4. In the second case, we also rely on the concavity of relative entropy, see Supplementary Note 5.By performing the error correction procedure, the legitimate users establish a shared bit sequence (raw key) at the price of disclosing an additional error syndrome of the length f • S(A|B), where f ≥ 1 depends on the particular error correction code.As we do not intend to address any specific error correction method, we put f = 1 corresponding to Shannon's limit.After the procedure, Eve's information becomes Ĩ(A, E) = I(A, E) + S(A|B).
To eradicate Eve's information about the raw key, Alice and Bob perform the privacy amplification procedure tailored precisely for the estimated information leakage due to the local line losses and error correction, see Methods.The length of the final key is where L is the number of originally generated random bits, and p ✓ = 1 2 a,b=0,1 p(b|a) is the proportion of bits that are not discarded at the postselection stage.
Taking L and L f as the numbers of bits per unit of time, Eq. ( 7)-the explicit form of which can be obtained using Eqs.(2a or 2b), (3 or 5), and Eqs.(17,18)  ) by maximizing this analytic formula for measured values of r E and D AE .To be able to distribute secret keys, the users have to possess an information advantage over Eve [57], which in our case is indicated by the positivity of the calculated L f /L.If the evaluated L f /L is not positive, the protocol should be terminated.Plots a, d relate to the photon number encoding with different curves corresponding to different values of D AE .We observe that the worst normalized key rate L f /L occurs when Eve is close to the middle of the transmission line.This is explained by the side effects of signal amplification: the closer Eve is to Bob, the more Eve's part of the signal is correlated with Bob's, yet, the noisier it becomes (see Supplementary Note 4).With such a trade-off, Eve gets the largest amount of information, standing somewhere in the vicinity of the line's midpoint.However, in the phase encoding case, shown in b, e panels, correlations outweigh noise even when Eve is close to Bob, resulting in a lower key rate for larger D AB .Plots c, f show the protocol's performance under both encoding schemes in the respective worst-case scenarios: Eve's position is such that the key rate is the lowest.Therefore, as we see from the plots, the photon number encoding scheme appears to be more efficient.

Numerical simulations
As we show in Methods, see Supplementary Note 3 for technical details, the minimal detectable leakage for a long line with M equidistant amplifiers is r min E ∼ M G/n, where G is the amplification factor of a single amplifier, and n is the number of photons in a test pulse.With d = 50 km, G = 10, and n = 10 14 , we get r min E ∼ 10 −6 and r min E ∼ 10 −5 for the 1000 km (M = 20) and 40, 000 km (M = 800) lines, respectively.Close to the loss control precision limit, both encoding schemes allow for high key rates.For the photon number encoding, the maximum L f /L is 0.99 for 1000 km and 0.57 for 40, 000 km.For the phase encoding, the values are 0.98 and 0.27, respectively.
Within the selected ranges of r E , which are above the minimum detectable leakage, and, therefore, such losses are resolvable by the physical loss control, and for the photon number encoding we have L f /L ≳ 10 −4 .Correspondingly, if the initial random number generation rate L = 1 Gbit/s, then for 1000 km we have 0.99 Gbit/s ≳ L f ≳ 100 Kbit/s and for 40,000 km we have 0.57 Gbit/s ≳ L f ≳ 100 Kbit/s.In comparison, the asymptotic behavior of the normalized key rate provided by PLOB at a 1000 km distance is limited to values around 10 −9 , or 1 bit/s for L = 1 Gbit/s, which is several orders of magnitude lower than the rates achievable with our method.To the best of our knowledge, there have been no previously reported QKD protocols that cover tens of thousands of kilometers without using trusted nodes.Furthermore, state-of-the-art Twin-Field QKD realizations [40,58,59] offer key rates that do not exceed a few bits per second at distances comparable to 1000 km.At the same time, the QKD realizations featuring high secret key rates of the order of 1 Kbit/s span relatively short communication distances of a couple of hundred kilometers [60][61][62].

Physical loss control and amplification
Now we outline possible implementations of the basic technological components of the protocol, the physical loss control, and the signal repetition by optical amplifiers.The physical loss control methods are based on analyzing scattered components of the high-energy test pulses sent along the fiber.The optical time-domain reflectometry comprises the injection of test pulses into the fiber and subsequent measurement of the temporal sequence of their back-scattered components.The response delay defines the distance to a particular scattering point, while its magnitude reflects the respective losses.Moreover, characteristic features of the response allow for determining the nature of the detected line discontinuity, see the exemplary experimental reflectogram in Fig. 4 in Methods.
As illustrated in Fig. 2, a log-linear reflectogram features a sequence of linear drops and steep drops (upper trace) corresponding to different discontinuities.To construct a loss profile using this piecewise linear graph, one can employ the ℓ 1 -filtering technique [63], which is commonly used in the processing of reflectometry data [64,65].This approach involves fitting the graph with a sum of a single linear decreasing function and a series of weighted step-like functions by minimizing the objective function based on the ℓ 1 norm.The i-th steplike function's drop (discrete derivative) and its position reveal the corresponding local leak magnitude r (i) E and its respective location (lower trace).In turn, the linear decreasing component defines the homogeneously spread natural scattering losses.
Note, that to obtain an accurate reflectogram one has to make averaging over multiple test runs during which a test pulse travels to the end of the fiber and all its reflections return back.Accumulating sufficient statistics may, in reality, take a few seconds.To resolve this problem and to ensure high operational control speed, we develop the component of tomography which we call transmittometry: Alice sends test pulses comprising a large number of photons to Bob, they cross-check the sent and received photon numbers and obtain the proportion of the transmitted photons (1 − r 0 )(1 − r E ).Knowing the natural losses baseline r 0 , which is determined during the protocol's initial preparation, they infer the the effective overall leakage r E as given by Eq. ( 1).In the spirit of the lock-in method [66,67], the power of a test pulse can be modulated at high frequency so that the pulse contains a large number of periods.By comparing the input and output spectral power peaks at the modulation frequency, which can be determined through the Fourier transform of the time-dependent transmitted and received powers, the users can deduce the proportion of losses.Modulating the power helps to suppress the unwanted contribution of classical noise that may be present in the system.As the modulation frequency increases, the corresponding value of the noise spectral density tends to decrease, raising the transmittometry precision.Unlike reflectometry, transmittometry does not enable the users to localize and identify individual leakages but immediately updates the estimate of the effective overall leakage.Thus, the two control methods complement each other, the users are constantly aware of the magnitude of leakages and can localize them after accumulating sufficient reflectometry statistics.
To discriminate between the intrinsic and artificial line losses, the legitimate users prerecord the initial undisturbed line tomogram, including the reflectogram and the total proportion of losses in the line, and use this tomogram as a reference.The fiber material, silica, has an amorphous nonreproducible structure, making its reflectogram a physically unclonable function [68].With that, the fiber core can be slightly doped, with, e.g., Al, P, N, or Ge, to tune its tomography results and achieve the optimal parameters such as dispersion.The most general eavesdropping attack implies a unitary transformation of the state of the combined system comprising the propagating signal and some ancillary eavesdropping system.However, coupling of photons to devices outside the line requires making significant alterations to the fiber medium, which would inevitably change the reflectogram and hence will be detected.Quantum cryptogra-phy also addresses attacks exercising the partial blocking of the signal and the subsequent unauthorized substitution of the blocked part.Any intervention like that would inevitably and permanently (even if Eve at some point decided to disconnect from the line) affect the tomogram of the transmission line and hence will be detected by the legitimate users.
The key distribution itself should go in parallel with accumulating the reflectometry statistics.If, at some point, the reflectogram shows an intrusion into the line, the users should respond with the appropriate postprocessing of the bits distributed during the formation of the reflectogram.This may possibly come down to discarding the whole bit sequence.Ideally, the physical loss control should be conducted permanently and should not halt even during the pauses in the key distribution.Taking the transmittometry test pulses' duration of the order of 1 ns makes any real-time mechanical intrusion into the line immediately detectable.
The principal task of the physical loss control is to ensure that Eve does not get enough photons to obtain the informational advantage over Bob.With that, signal pulses and test pulses still carry large numbers of photons, making it possible to repeat them via optical amplification.The repeater can particularly be arranged as a doped fiber section embedded into the main line and pumped to produce amplification gain in the primary mode.In telecommunications, the most common dopant is erbium.Pumped at the wavelength of 980 nm, the erbium-doped fiber generates the gain at around 1550 nm which fits into the transmission window of the silica-based fiber.Upon absorption of the pumping radiation, erbium ions transit from the ground state (state 0) to a short-lived state (state 2).From there, they non-radiatively relax to a metastable state (state 1), as illustrated in Fig. 3a.As the signal photonic mode passes through the inverted atomic medium, it stimulates the transition from state 1 to state 0, resulting in a coherently synchronized photon emission.The resulting signal amplification magnitude depends on the erbium ion concentration, the length of the doped fiber segment (active fiber), and the power of the pumping radiation.The interaction between the propagating signal photonic mode (with the annihilation operator â) and the inverted atoms is determined by the Hamiltonian in the rotating wave approximation where atoms are indexed by n, N ≫ 1 is the total number of atoms in the medium, κ is the interaction constant, and states |0⟩ n and |1⟩ n represent respectively states 0 and 1 of the n-th ion.Since the time of relaxation from state 2 to 1 is very small (20 µs against 10 ms for the relaxation from 1 to 0), we take that an ion is effectively a two level system.The Holstein-Primakoff transformation maps the active medium's state with m atoms in state 0 and N −m in state 1 to a Fock state |m⟩ b .This state corresponds to m excitations in the auxiliary bosonic mode associated with the annihilation operator b.With that, we get the following equation The evolution operator describing the signal mode propagation is given by where g = κ √ N t/ℏ, and t is the effective time of interaction between the signal mode and active medium.Amplification is described by a quantum channel acting on the signal's density matrix ρ where the partial trace is taken over the states of the auxiliary mode.Within the P -function formalism, Eq. ( 11) translates into Eq.( 4).Additional details can be found in Supplementary Note 3. Usually, doped fiber amplifiers utilize optical isolators, which allow the light to pass only in one direction.This minimizes the risk of multiple reflections inside the doped fiber section.In our protocol, however, the optical isolators would block the reflected light hindering the end-toend time-domain reflectometry.Besides, the amplifiers typically include tap couplers diverting about 1% of the radiation into the photodetectors to monitor the amplifiers' operation, and this fraction can possibly be seized by the eavesdropper.We hence opt out of both the optical isolators and tap couplers and utilize the design of the bidirectional optical amplifier [69][70][71].The amplifier's sketch is displayed in Fig. 3b.The fiber core is connected to the wavelength-division multiplexing (WDM) system.The WDM system is a beam splitter-like device for guiding the radiation of the different wavelengths into a single optical fiber.In our case, it is intended to feed the doped fiber section with the pumping radiation necessary to excite the active fiber's dopant atoms.Correspondingly, the WDM is connected to the active fiber and the pumping diode.Finally, active fiber is connected to the main fiber line.Provided that the neighboring amplifiers are separated enough, they are not subject to significant cross-talk.
Our preliminary experiments reveal how the 1000 kmlong line with the standard telecom distance d = 50 km between amplifiers can be made stable with the very restricted signal noise in the line, even in the absence of optical isolators.The stability and scalability of our QKD scheme are supported by the remarkable precision of the loss control observed in the experiments.This control precision is accomplished through the use of highresolution reflectometry, complemented by optical amplifiers to extend its range, and lock-in based transmittometry.With the ability to capture leakages above the control resolution, the users maintain an information advantage over potential adversaries attempting to exploit these leakages, as confirmed by analytical calculations.Coupled with the experimentally observed low bit error rates, our QKD system ensures high rates of secure key generation.We find that the signal wavelength of 1530 nm-corresponding to the peak of the amplification factor spectrum of the erbium-doped fiber amplifier-is more preferable than the standard 1550 nm wavelength.Fixing G = 1/T for 1550 nm means greater amplification for the noise in the modes near 1530 nm, which, in turn, may disrupt the stability of the amplifiers' operation, possibly turning them into lasers.But this is not the case if 1530 nm is already the target wavelength itself.
A possible eavesdropping attack on the amplifier may consist of increasing the pumping power and stealing the surplus of the amplified radiation.Of course, hooking up to the line would change its tomogram and thus will be detected.Nevertheless, the following constructive feature of the amplifier will serve as an additional element of protection.The doped fiber section will contain the near minimum number of dopant ions necessary to amplify the signal with the target amplification factor.Let the operational pumping power P p match the target amplification factor G. With the increase of the pumping power, the relative population inversion asymptotically approaches unity, which corresponds to the amplification factor G + δG.The fraction of signal that Eve can possibly steal by inflating the pumping power is limited by δG/G, which is small, if at P p almost all of the ions are already excited.The number of ions and the value of P p should be such that the maximum achievable Eve's makeweight, summed over all amplifiers installed into the line, is smaller than the minimum detectable leakage.

Discussion and conclusions
Quantum cryptography typically assumes channel device independence, suggesting that an eavesdropper can fully exploit all leakages from the quantum channel.This assumption constrains key rates to the PLOB bound [18], where the maximum rate scales as − log 2 (1 − T ) bits per channel with the transmittivity T .Consequently, key rates become impractically small over long distances.
By examining the physical quantum principles governing signal transmission and implementing physical loss control, we shifted this paradigm.In our approach, legitimate users can determine the fraction of losses accessible to an eavesdropper and ensure it contains insufficient information.While Eve struggles to discriminate between weak quantum states, Bob receives signals with relatively large numbers of photons, granting him a significant information advantage.Our approach employs end-to-end line tomography and leverages the impossibility of exploiting natural losses.As a result, the PLOB constraint is lifted, significantly extending the practical implementation of QKD over long distances without sacrificing security-notably, without relying on trusted nodes.Optical amplifiers, unlike trusted nodes, do not convert quantum information into classical form and are directly controlled by users through end-to-end control.
In this study, we analyzed a physical model restricting Eve to the possibility of local leakage exploitation, demonstrating the security of loss control-based QKD under long-distance transmission and high signal intensity conditions.Our forthcoming mathematical research will explore alternative physical models involving more complex actions by Eve and will provide further security proofs, particularly dealing with the finite key length and security parameter [72].
The proposed approach maintains the fundamental advantage of the QKD, everlasting security [72][73][74][75], ensuring that distributed keys will remain secure even against future technologies or attacks that may be developed.In the forthcoming publication, we will address the experimental realization of the QKD based on our approach for the transmission distance over 1000 kilometers.

Combined quantum state evolution under beam splitting attack
Here we provide the description of states' evolution in the case of the beam splitting attack.We will use that (a) an amplifier transforms pure coherent state into a mixture of the coherent states, where P (α, γ, G) is given by Eq. ( 4) and integration is performed over the complex plane with d 2 α ≡ dRe(α) dIm(α); and that (b) formally, a sequence of losses and amplifications can be reduced to a single pair of the loss and amplification quantum channels-see Supplementary Note 3 for details.
The initial density matrix of Alice's random bit (A) and the corresponding signal (S) is given by Just before the signal passes the beam splitter, the state of the AS system is where we use Eq. ( 12) to describe the state of sequentially attenuated and amplified signal, and T 1 and G 1 are, respectively, the transmission probability and amplification factor of the effective loss and amplification channels that are equivalent to the sequence of amplifications and losses prior to the beam splitter, see Supplementary Note 3, particularly Eq. ( 58).Just after the signal passes the beam splitter, the state of the joint system of Alice's random bit, the signal travelling to Bob and the signal component seized by Eve (E) is described by where r E is the fraction of signal stolen by Eve.After the signal passes the second series of losses and amplifiers and right before it is measured by Bob, the state of the joint system is Backscattered power, dB  where we again utilize Eq. ( 12) to describe the evolved signal state, and T 2 and G 2 are the effective transmission probability and amplification factor of the region between the beam splitter and Bob, see Eq. ( 60) in Supplementary Note 3. Bob receives the signal state, measures it and, together with Alice, discards the bits corresponding to the failed measurement results.The probability that Bob's measurement outcome is b = {0, 1} given that Alice's sent bit is a = {0, 1} can be written as where Êb is given by Eq. (2a) or (2b) depending on the encoding scheme, and tr ASE [. . .] is the trace over the ASE system.The probability that Bob performs a successful measurement if Alice sends bit a is Equation ( 3) follows from Eq. ( 16) after applying measurement operators to the signal subsystem, discarding sum components associated with the failed outcomes, and renormalizing.

Privacy amplification
Privacy amplification can be realized through applying the universal hashing method [53], which requires the users to initially agree on the family H of hash functions.At the privacy amplification stage [50,76,77], they randomly select such a function h : {0, 1} p✓L → {0, 1} L f ∈ H that maps the raw key of length p ✓ L to the final key of length L f .If Eve is estimated to know p ✓ L • Ĩ(A, E) bits of the raw key, the letter must be taken in accord with Eq. (7).Family H can, for example, span Toeplitz matrices [78]: a random binary Toeplitz matrix T with p ✓ L rows and L f columns translates the binary vector representation of the raw key v into the vector k representing the final key, k = T • v.

Physical loss control precision
Assume that Bob is equipped with an optical filter with a very narrow wavelength band which blocks noise from the secondary light modes (for details on this additional noise, see Supplementary Note 3).Assume also that all amplifiers are positioned equidistantly, each having amplification factor G = 1/T with T being the transmission probability of the line section between two neighboring amplifiers.
Approaching an amplifier, the test pulse comprising n photons is attenuated down to T n photons.The amplifier restores the number of photons back to n but adds noise.The photons in the pulse follow the Poisson statistics; thus, the photon noise just before the amplifier can be taken as a square root of the number of photons in the input signal √ T n.The noise is amplified by factor G as well, so after a single amplifier the noise is G √ T n.Coming through a sequence of M amplifiers which add fluctuations independently, the total noise raises by the factor √ M .The noise at Bob's end is thus The minimum detectable leakage can be calculated as r min E ∼ δn B /n = M G/n.Our qualitative estimates match with the detailed calcu-lations in Supplementary Note 3.

Experimentally obtained reflectogram
Figure 4 displays an example of an experimentally obtained reflectogram.Every particular type of fiber discontinuity, whether it is physical contact, bending, or splice, can be identified by its own unique reflectographic pattern, as demonstrated in the inset plots.The appearance of peaks signifies the excessive scattering which happens, for instance, at the physical connectors where the signal undergoes the Fresnel reflection.The right noisy tail of the main plot corresponds to the end of the backscattered signal.The measurements are carried out with a 2 µs 1550 nm pulse laser with a power up to 40 mW.The experimental data is averaged over 16, 000 measurements.
In this note, we discuss the unfeasibility of eavesdropping on the natural losses occurring due to the scattering of photons in optical fiber.Here we explore quantum considerations analogous to those that serve to derive the Second Law of Thermodynamics [41][42][43].
In quantum cryptography, the thermodynamic considerations should focus on the collection of optical states traveling through a lossy fiber.In the standard telecommunication scenario, with the signal power of around 10 mW and a pulse duration of 1 ns, each light pulse contains about 10 8 photons, with staggering leaks of about 10 3 photons per meter that can be measured outside of the fiber.This scenario implies that the system is clearly not isolated, and, through the measurement of leaked photons, Eve can decrease the system's entropy-a process which, in accordance with Shannon's definition of entropy, is equivalent to extracting information.
On the other hand, in a relatively weak signal region of our choice with 10 4 to 10 5 photons or less (which is still enough for the optical amplification), the system can be considered quasi-isolated since only a small number of photons are lost from each pulse.Eve's attempt to measure the leaked parts of a signal's wave function and obtain information about the sent bit would decrease the entropy.However, extracting a substantial amount of information from leaked photons requires Eve to operate and observe multitudes of degrees of freedom, which, as we will demonstrate in the next section, is unfeasible.

Required length of the eavesdropping device
In assessing the feasibility of the potential eavesdropping on the natural losses, we consider a scheme in which logical bits are encoded into optical coherent states |γ 0 ⟩ and |γ 1 ⟩ with different photon numbers µ 0 = |γ 0 | 2 and Let the signal pulses have the duration of 1 ns (0.2 m long) and comprise 10 4 photons on average.The optimal values for µ 0 and µ 1 on a 1000 km line, as determined by our simulations (see the main text), are 9000 and 11,000, respectively.To eavesdrop on the homogeneously spread natural losses, an eavesdropper would be forced to undertake measurements along various segments of the fiber, possibly using single-photon detectors.However, as our calculations indicate, such a method would be impractical in terms of the sheer length required to successfully determine the value of any given bit.
The natural losses coefficient of a fiber section of length l can be calculated as where ξ is the decay constant.The number of photons lost from a wave packet containing µ a photons is given by: The lower index E denotes that the photons can be seized by an eavesdropper, the upper index a represents the corresponding random bit value.The observable (positive operator-valued measure, or POVM) describing the single-photon detector includes two projective operators corresponding to two possible outcomes: The probability of the detector's "click" conditional to the bit value a is determined by the Poisson statistics of Eve's coherent state According to the measurement outcomes, Eve makes bit decisions.Probability distribution of measurement results can be considered as Binomial which variance is q a (1 − q a ).Carrying out N independent measurements of sequential parts of the line, the combined variance is a sum of variances of each individual measurement.Thus, the expression for the square root of the variance takes form Bits zero and one produce different distributions, the distance between the maximums of these distributions can be calculated as In order to obtain significant amount of information Eve needs the distance between the maximums of the distributions to exceed the sum of their standard derivations, i.e. the notional critical condition can be written as Then, supposing that each of the detectors covers a piece of fiber of the length equal to the length of the considered pulses, i.e. l = 0.2 m, and taking ξ = 0.02 km −1 , which is a common value for the single-mode optical fiber, the required number of detectors Combining all measured pieces, we obtain the total length of the whole detection device N • l ≃ 10 3 • 0.2 m = 200 m.Moreover, not all the leakages can be measured in reality: some of the scattered photons transform to different modes propagating along the fiber and do not radiate outwards.Along with that, to measure a leaked part of the signal with the single photon detector, it is necessary to isolate the measured part of the line from the external radiation and concentrate the leaked photons to the cryogenic setup.The effects combined reduce the number of photons available to Eve approximately by an order of magnitude.These physically motivated assumptions lead to enormous lengths of detection devices even in the case of higher intensities (for instance, µ 0,1 ∼ 10 5 , which turned out to be optimal for the 40 000 km line -see Numerical Simulations).It is important to acknowledge that while the aforementioned attacks utilizing scattering losses are hardly realistic, one can employ methods of protection that can counteract them as well.These include utilizing specialized cable design enabling the controlled dissipation of scattering losses (described in Note 2), utilizing lower numbers of photons in pulses, and implementing advanced encoding schemes that utilize the phase or shape of the pulses.

Precise estimation of Eve's information
To estimate the precise amount of information that Eve can get from the N individual measurements of natural losses with single photon detectors, we calculate the mutual information between Alice's sent bit a ∈ {0, 1} and Eve's measurement results.The conditional probabilities of obtaining n "clicks" can be written as where ! is a binomial coefficient and q a is the click probability in the individual measurement in the case where the sent bit value is a.The expression for the mutual information is determined by the joint probability distribution p(n, a) = p(n|a) • p(a): The dependence of the Eq. ( 28) on the total length of the detection device is depicted in Fig. 5. Was the device's length equal to 200 m, the mutual information would almost reach 0.5, meaning that Eve would know half of the raw shared key-these results are in a good agreement with the preliminary estimations from the previous section.While in the case of more feasible lengths (a couple of meters, for example), the information Eve can obtain is of the order of 10 −2 bit.One can note that the Eq. ( 28) does not depend on whether phase randomization is applied or not, since the probabilities are determined only by photon numbers (for details see Note 4).

Ideal photon number measurement
Next, we consider collective photon number measurement over the whole N pieces of the fiber which can be conducted after gathering all the scattered photons at one ideal detector.The corresponding observable in terms of the POVM effects can be expressed as projectors on the Fock-states The probability of obtaining k photons is determined by the average number of all scattered photons in a signal corresponding to sent bit a Almost analogously to the previous paragraph, one can calculate the mutual information as The only difference from the Eq. ( 28) is that upper limit of the summation is now infinity.As depicted in the Fig. 5, the informational advantage of Eq. ( 31) over single-photon measurements is insignificant.

The Holevo bound
To build an upper-bound on the information that Eve may extract from the scattered photons, we calculate the Holevo quantity, which for an ensemble of quantum states E = 1/2, ρ(0) , 1/2, ρ(1) is defined as  28).The orange line depicts Holevo bound with phase randomization (PR) according to Eq. ( 37).The black line is for the Holevo bound (no PR) in the absence of PR Eq. (34).
where S(ρ) = −Tr (ρ • log 2 ρ) is von Neuman entropy.Without phase randomization, Eve has to distinguish between pure coherent states of the form Since entropy of a pure state is zero, the Holevo quantity is just the entropy of the average ensemble's state where Applying phase randomization transforms the ensemble of pure coherent states into the mixtures of Fock states where p(k|a) is defined in Eq. (30).Now ensemble's states are diagonal, thus, quantum entropy is replaced with classical Shannon entropy Carrying out trivial mathematical transformations, one may conclude that the Holevo quantity for the phase randomization case Eq. ( 37) coincides with the information obtained in ideal photon number measurement Eq. (31). Figure 5 also shows that the Holevo quantity for pure coherent states Eq. (34) appeared to be much higher than considered photon number measurements, meaning that Eve may potentially utilize information about the phase to conduct more effective measurement.It prompts legitimate users to implement phase randomization in their QKD scheme.

NOTE 2. Controlled dissipation of natural losses and advanced line tomography
In this note, we turn our attention to a particular cable design and advanced line tomography that transforms scattered photons into heat in a controlled manner.This method effectively precludes Eve from exploiting the natural losses.
The cable design transforming scattering losses into heat is sketched in Fig. 6.The inner fiber core carrying the information light pulses is surrounded by a cladding with a smaller refractive index and then by the dissipative cladding made out of metal or metal-doped silica.The dissipative cladding screens the scattering losses escaping the fiber core since the scattered wave undergoes the inelastic secondary scattering and transforms into heat.
The resulting dissipative thermal losses cannot be deciphered even in principle.The dissipative cladding is, in turn, coated by the second standard refractive cladding layer, surrounded by an outer hollow fiber core and the outside refractive cladding.The outer core enables legitimate users to perform constant reflectometry and transmittometry, thus exercising control over the dissipation of the scattering losses.To remove the dissipative cladding for collecting the scattering losses or to create an artificial leakage from the inner core, Eve first needs to get through the outer core.The action, however, will not go unnoticed because of the permanent Alice and Bob's updating of the outer core's loss profile.Finally, the structure is surrounded by an outer jacket which may include a strengthening layer.To mitigate local losses on fiber connections, they should be made spliced.
Physical loss control allows for a quantitative estimate and localization of any damage inflicted upon the outer or inner cores, see an experimentally obtained example of a reflectogram in Fig. 4 of the main text, presenting the dependence of the backscattered power upon the distance to the scattering point: the linear regions represent homogeneous scattering along the line, while the sharp peaks or drops correspond to the local losses at fiber contacts and bends.As opposed to the regular optical fiber, this specific line design eliminates the possibility of an undetected collection of scattering losses.Any local intrusion brings Eve a negligible number of scattered photons; then, to collect a sufficient amount of the scattering losses, she needs to breach a large section of the controlled outer core, and before it is done, the legitimate users terminate the protocol.Yet, our approachparticularly, the protocol outlined in the main textresists a significant signal leakage fraction without the necessity of terminating transmission at first sight of the channel breach.Instead, the legitimate users adapt the encoding and post-processing parameters based on the evaluation of the fraction of the signal possibly leaked to Eve, the outer and inner cores being monitored separately.Importantly, although the inner core of the line is controlled only at step 1 of the protocol, legitimate users must control the outer core at all steps of the protocol.The users can count scattering losses that leaked from the breached outer core region as stolen by Eve and then act accordingly, i.e., adapt or terminate the protocol.In other words, the scattering losses escaping the breached outer core region can be equated to the artificial leakages directly from the inner core.If the outer core is breached at the same spot where the inner core has an irredeemable local leakage, such as a bend, the users must take that this leakage is seized by Eve.

NOTE 3. Signal amplification
In this note, we address optical amplification using the formalism of quantum channels.We develop a mathematical representation of a sequence of optical amplifiers, which we later use for modeling a general beam splitter attack on the transmission.Using this representation, we calculate the amplification-induced noise.

Amplification in doped fibers and losses
In Er/Yt doped fiber, the photonic mode propagates through the inverted atomic medium.To keep the medium inverted, a seed laser of a different frequency copropagates with the signal photonic mode in the fiber and is then filtered out at the output by means of wavelengthdivision multiplexing (WDM).The interaction between the inverted atoms and propagating light field mode â is given by the Hamiltonian in the rotating wave approximation where we enumerate the atoms by index n, with N being the overall number of atoms in the medium (N ≫ 1), κ is the interaction constant.Here, each medium's atom is assumed to be a two-level system with its basis states |0⟩ and |1⟩ denoting the ground and excited states, respectively; σ(n) ± is the n-th atom raising/lowering operator, while Ŝ± is the collective raising/lowering operator, that shifts the number of excited atoms in the medium by one.To simplify further calculations, we utilize the Holstein-Primakoff [79] transformation which provides mapping between the collective ( Ŝ+ , Ŝ− ) and boson ( b, b † ) operators where b, b † = 1.In the regime, where average number of excitations is much smaller than the number of atoms ⟨ b †b ⟩ ≪ N , one may use the approximation The initial state of fully inverted atomic medium is With that we have The evolution operator of a propagating photon is given by where g = κ √ N t/ℏ and t is effective time of interaction between the photonic mode and atomic medium.Besides considering the channel acting on the propagating state, we also have to consider a conjugate channel acting on the creation operator â (it will be needed in the following cryptanalysis) In practice, the performance of erbium-doped fiber amplifiers (EDFAs) suffers from technical limitations, which arise in addition to the amplification limits on added quantum noise.These limitations are mainly caused by two factors: (i) the atomic population may be not completely inverted throughout the media, (ii) there may be coupling imperfection between the optical mode and the doped fiber section or main part of the fiber.We will imply that these factors are accounted for in the loss channel prior to the amplification channel, as shown in Ref. [80].
The canonical transformation of the loss channel is where λ is the interaction parameter, T is the proportion of the transmitted signal, the annihilation operator ĉ corresponds to the initially empty mode which the lost photons go to, and Ûλ = e λâ † ĉ−λâ ĉ † .

P -function and its evolution under amplification
Consider a single photonic mode with bosonic operators â and â † acting in the Fock space.To understand the effect of the amplification on the bosonic mode state, we will use the P -function formalism allowing to express any density operator as a quasi-mixture of coherent states: where d 2 α ≡ dRe(α) dIm(α) and the quasi-probability distribution P(α) is not necessarily positive.For a given state with the density matrix ρ the P -function can be written as where see Ref. [81] for details.Amplification is described by a quantum channel given by where Ûg is defined by Eq. ( 44), g is the interaction parameter characterizing the amplifier, G = cosh 2 (g) is the factor by which the intensity of the input signal is amplified, and annihilation operator b corresponds to the auxiliary mode starting in the vacuum states.see e.g.[82].
To see how the P -function of a state transforms under the optical amplification, consider a simple situation where the input signal is in the pure coherent state |γ⟩ ⟨γ| with the corresponding initial P -function P i (α) = δ(α − γ) (delta-function acting on the complex plane).After the amplification the P -function becomes Bearing in mind the canonical transformation of the amplifier channel from Eq. ( 45), we get Eq.( 3) from the main text: given a pure coherent input state (with complex amplitude γ), the output state is a mixture of normally distributed coherent states; the mean complex amplitude is √ Gγ and the standard deviation is (G − 1)/ √ 2:

Composition of amplifiers and losses
In our quantum key distribution (QKD) protocol, the amplification is used to compensate the fiber losses.Long-distance transmission requires a cascade of amplifiers, in which case the signal's evolution is determined by a sequence of multiple loss and amplification channels.In this section we prove that any such sequence can be mathematically reduced to a composition of one loss and one amplification channels.
Statement 1. Two loss or amplification channels can be effectively reduced to one.First, we show that a pair of loss or amplification channels can be effectively reduced to the one channel (Fig. 7a).To that end, let us consider two consequent loss channels: where we defined operator ĉ acting on the vacuum state and satisfying the canonical commutation relation [ĉ, ĉ † ] = 1.The last expression of Eq. ( 53) represents the action of one loss channel with the effective parameter The same reasoning applies to amplifiers Statement 2. Loss and amplification can always be represented as a composition where loss is followed by amplification.
Let us show that the composition of an amplification channel followed by a loss channel can be mathematically replaced with the pair of certain loss and amplification channels acting in the opposite order (Fig. 7b).Firstly, let us consider the transformation corresponding to the amplification followed by the loss In the case of the opposite order we obtain Considered transformations become identical when the parameters are related as In other words, the two types of channels "commute" provided that the parameters are modified in accord with these relations.In particular, the parameters in the equation above are always physically meaningful G ≥ 1, 0 ≤ T ≤ 1, meaning that we can always represent loss and amplification in form of a composition where loss is followed by amplification (the converse is not true).

Statement 3.
A series of losses and amplifiers can be effectively reduced to one pair of loss and amplification.
Let us finally show that the sequence of loss and amplification channels can be mathematically represented as one pair of loss and amplification (Fig. 7c).Consider the transformation corresponding to the series of M identical loss and amplification channels, for which we want to find a simple representation.According to Statement 2, we can effectively move all losses to the right end of the composition, i.e., permute the channels in such a way that all the losses act before amplification.Every time the loss channel with the transmission probability T (i) is moved before an amplifier with the amplification factor G (i) , the parameters are transformed in accord with Eq. ( 59): In our sequence we can pairwise transpose all neighboring losses with amplifier (starting with the first amplifier and the second loss).After repeating this operation M − 1 times, bearing in mind the Statement 1, we find that where i.e., the series of losses and amplifiers is equivalent to the loss channel of transmission T • followed by the amplifier with amplification factor G • .Note now that the value η ≡ G (i) T (i) = GT cannot be changed by permutations.Let us define and bear in mind that We can write and Let us find the explicit form of G • and T • by solving the recurrence relation.Define A n and B n through the relation Then It follows from Eqs. ( 68) and ( 69) that B n+1 = A n and We see that the solution of this equation has a form where c 1 and c 2 are the constants, which are determined by F 0 = (G − 1)T + 1: we take A 1 = (G − 1)T + 1 and A 0 = 1, and obtain Notably, the product Π M −2 n=0 F (n) appearing in the final expression becomes relatively simple and we have The case of T G = 1 is particularly interesting as the average photon number of the transmitted signal remains preserved (which is different from the total output photon number as it has the noise contribution).In the limit G → 1/T we have Eve conducts a beam splitter attack seizing a part of the signal somewhere along the optical line.Thus, she divides the line into two parts.b An equivalent scheme: the losses and amplifiers before and after the point of Eve's intervention are represented by two pairs of loss and amplification channels defined by the parameters {T1, G1} and {T2, G2} respectively.

Effective model of the line
We consider how Eve performs the beam splitter attack seizing the part of the signal somewhere along the optical line as shown in Fig. 8a.If the signal intensity incident to the beam splitter is 1, then intensity r E goes to Eve, and 1 − r E goes to Bob's direction.The proportion of the transmitted signal on the distance d between two neighbouring amplifiers is determined by where ξ = 0.02 km −1 is the parameter of losses typical for the optical fibers and G is amplification factor of each amplifier.Let D AB(AE) be the distance between Alice and Bob (Alice and Eve), then the numbers of amplifiers before and after the beam splitter M 1 and M 2 are given by According to Statement 3, the scheme can be simplified by reducing the losses and amplifications before and after the beam splitter to two loss and amplification pairs with the parameters respectively (Fig. 8b)

Fluctuations
Let us calculate the fluctuation of the number of photons in a pulse after it passes through a sequence of M loss regions and amplifiers.Let |γ| 2 be the input average photon number; as follows from Eqs. ( 47) and ( 52), the average number of photons n in the output signal is where G • is given by Eq. ( 75).The variance of the output photon number is Note that even if |γ| 2 = 0, n and δn are still non-zero.This particularly means that on top of the mode of interest, amplification also generates noise in other modes.
Assume that Bob has an optical filter with bandwidth ∆ν on which the amplification factor is constant, and the detection time is τ ≫ 1/∆ν.Then, the average number of photons due to noise from the secondary modes is where factor 2 is due to two possible polarizations.We will thoroughly address the issue of noise at different optical filtration regimes in our forthcoming experimental publication.
In the limit |γ| 2 ≫ GM ≫ 1 for the ideal optical filter transmitting only the signal mode we get δn ≃ √ nGM .
Provided that there are no other sources of noise, this quantity determines the precision of the physical loss control: if the test pulse carries n photons, the minimum detectable leakage is The result coincides with the estimate given in Methods.

NOTE 4. Photon number encoding
This note is devoted to the detailed description of the photon number encoding scheme in the context of the beam splitter attack.We derive the respective amounts of information that the users and Eve know about the transmitted signal.We also address correlations due to the optical amplification between Eve's and Bob's quantum states.

Phase randomization
In the photon number encoding, we assume the phase of each signal pulse being completely random [83], and unknown both to the eavesdropper and the users.The phase alteration between consecutive signal pulses may be achieved through rebooting the light source after each pulse, or with an additional randomly acting phase modulator.We take that Bob's performs solely the energy measurement of the incoming states without measuring the phases, so Alice does not send the phase reference.In this case, Eve cannot measure the phases either, and the combined system of Alice's random bit (A), the signal incident to Bob (S) and Eve's seized state (E) can be expressed as a mixture of states averaged over all possible phases, ρ→Bob It follows from Eq. ( 52) that for any φ ∈ R we have P x, ye iφ , z = P xe −iφ , y, z .We thus can write ρ→Bob

Bob's information
We first estimate the mutual information between Alice and Bob, which is S(A)−S(A|B) in Eq. ( 6) of the main text.For that purpose, we trace out Eve's subsystem and consider a bipartite quantum state shared between legitimate users right before Bob's measurement is conducted ρ→Bob Given that Alice sent bit a ∈ {0, 1}, the probability that Bob's measurement outcome is b ∈ {0, 1, fail} can be written as The probability of finding k photons in the coherent state |βe iφ ⟩ is defined by the Poisson distribution and depends only on |β| which particularly means that for any b ⟨βe iφ | Êb |βe iφ ⟩ = ⟨β| Êb |β⟩.Thus, the probability of results "0" and "1" can be expressed analytically where Γ(z) is the Euler gamma function and Γ(z 1 , z 2 ) is the incomplete gamma function.Turning again to Eq. ( 88), we can change the integration order using Fubini's theorem.The analytical integration over d 2 α gives us where φ β = arg(β).The rightmost integral can be reduced to the modified Bessel function of the first kind: .
Thus, we have .
The mutual information between Alice and Bob after the post-selection can be calculated as where is the binary entropy and the probability of the successful measurement outcome is

Eve's information
To estimate Eve's information (I(A:E) in the Eq. ( 6) of the main text), we find the explicit form of the quantum state owned by Eve after the users perform post-selection.The density matrix of the joint ABE system is For the further calculations it is useful to introduce "conditional" Eve's density matrix, i.e., Eve's density matrix in the case that Alice sent bit a and Bob got a successful measurement outcome: The explicit form of this matrix is where Ê✓ ≡ Ê0 + Ê1 .To simplify the expression, one can convert integration into Polar coordinates (α = |α|e iφα , d 2 α = |α| d|α| dφ α ), apply Fubini's theorem, and carry out integration over φ α analytically 2π 0 where I 0 (z) is the modified Bessel function of the first kind.The same procedure can be carried out for integration over β: bearing in mind that ⟨β| Ê✓ |β⟩ = ⟨β| Ê1 |β⟩ + ⟨β| Ê0 |β⟩ ≡ f (|β|) does not depend on φ β , we have 2π 0 The rightmost integral in Eq. (99) also can be calculated in the analytical way and expressed in terms of the Fock states {|n⟩} Note that the resulting density matrix is diagonal in the Fock basis-which is natural given the phase randomization.The diagonal elements of the matrix can be expressed as In order to take integral over |α| analytically, we utilize the fact that the main contribution to the integral comes from |α| ≫ 1 which enables us to use the asymptotic expansion [84]: , z ∈ R. (105) Thus, we have where we introduced two subsidiary functions κ n (|β|) and κn (|β|), n ∈ N: we define where 1 F 1 (x, y, z) is the Kummer confluent hypergeometric function (for large values of the third argument we utilize the approximation from Ref. [84]), and Function κn (|β|) is defined similarly: For n = 0 the integral from Eq. ( 111) does not convergelet us address this case individually.Instead considering two terms of the series in Eq. (105), we take into account only the first one, which makes the primary contribution to the sum for large |α|; thus, we get κ 0 (|β|) = With the beam splitter attack, Eve gets one of two non-equiprobable quantum states: ρ(0) E with probability q 0 = p(✓|0) 2p✓ and ρ(1) E with q 1 = p(✓|1) 2p✓ .The explicit forms of diagonal ρ(0) E and ρ(1) E can be obtained by substituting the results from Eqs. (108-112) into Eq.(107).Eve's ensemble E can be shortly defined as E . (113) The maximum information that Eve can obtain about Alice's bit on average is bounded by the Holevo quantity χ (E): E − q 0 S ρ(0) Since ρ(0) E and ρ(1) E are diagonal, Eq. ( 114) can be simplified by replacing von Neuman entropy S with the classical Shannon entropy H S q 0 ρ(0) E + q 1 ρ(1) where the Shannon entropy of a probability distribution {w j } j is defined as H ({w j } j ) = − j w j log 2 (w j ).

Correlations
Stealing a proportion r E of a coherent signal pulse |γ⟩ provides Eve with a state | √ r E γ⟩ uncorrelated with |γ⟩, as the state of the joint system is described by product | √ 1 − r E γ⟩ ⊗ | √ r E γ⟩.This is, however, not the case when the signal pulse is subject to optical amplification, turning a pure coherent state into a mixture of coherent states: now, by splitting off same r E -fraction of this mixture, Eve gets a correlated state containing more information about the sent bit.Therefore, contrary to one's executions, for Eve standing right next to Alice may be less effective than somewhere further along the lineprovided that the noise from the optical amplifiers does not overweight the benefits of correlations.Assuming that Eve performs the beam splitter attack, we quantify the correlation between Eve's and Bob's measurement results by calculating the Averaging over a density matrix ρ is denoted here as ⟨. . .⟩ ρ.As follows from Eq. ( 86), the Bob-Eve density matrix can be written as ρBE = d 2 α P α, T 1 γ, G 1 where the effective amplification coefficients G 1 , G 2 and transmission probabilities T 1 , T 2 are defined by Eqs.(78) and (79).The average photon numbers of Bob's and Eve's subsystems are The average product value is Hence, the expression for the irreducible correlator depends only on |γ| 2 , r E and G 1 : Here, we utilized the fact that ⟨n⟩ |α⟩⟨α| = |α| 2 .In turn, the variances are obtained using the fact that ⟨n 2 ⟩ |α⟩⟨α| = |α| 4 + |α| 2 : 126) In this note, we study the phase encoding scheme.We perform our analysis along the same lines as in the case of the photon number encoding.

Bob's information
For self-evident reasons, phase randomization approach is inapplicable in case of phase encoding-based protocol.The density matrix describing the tripartite system right before Bob's measurement is Given that Alice sent bit a ∈ {0, 1}, the probability that Bob's measurement outcome is b ∈ {0, 1} can be written as The overlap between coherent state |β⟩ and the state with a particular value of the q−quadrature is (130)

3 .
The signals are amplified by the cascade of optical amplifiers installed along the optical line, possibly equidistantly.Bob receives the signals and measures them.Classical post-procession 4. Alice and Bob perform the postselection, i.e., they discard the positions corresponding to corrupted measurement outcomes.The postselection criteria are defined by the set of parameters, which are optimally calculated by the users.

Figure 1
Figure 1 displays the results of our numerical simulations.We plot the optimal normalized key rate L f /L as a function of the proportion r E for two different transmission distances: a, b, c D AB = 1000 km, d, e, f D AB = 40, 000 km.The distance between the neighboring amplifiers d = 50 km.Plots a, d relate to the photon number encoding with different curves corresponding to different values of D AE .We observe that the worst normalized key rate L f /L occurs when Eve is close to the middle of the transmission line.This is explained by the side effects of signal amplification: the closer Eve is to Bob, the more Eve's

9 EFIG. 2 :
FIG.2: Exemplary reflectogram and loss profile.The loss profile, which displays the magnitude r (i) E of the i-th local leakage and its position, is derived from the reflectogram using ℓ1-filtering.

FIG. 3 :
FIG.3: Optical amplification.a Energy diagram of the light amplification in the erbium-doped fiber section.Pumping radiation excites erbium ions from the ground state 0 into the 2nd energy level.Shortly after, ions drop to the metastable level 1.The incident photons stimulate the transition 1 → 0 which results in the coherently synchronized radiation of additional photons at the same wavelength.b Schematics of the proposed bidirectional optical amplifier.The doped fiber section is embedded into the main fiber line and linked to the pumping diode through the WDM.

FIG. 4 :
FIG.4:An exemplary plot obtained with the optical time-domain reflectometer.The device sends the high-intensity test pulses into the fiber and registers its reflections providing the dependence of the backscattered power on the distance to the scattering point defined by the time of the signal's return.

FIG. 5 :
FIG.5:The information Eve can obtain from natural losses as a function of the overall length of the detection device.The cyan line corresponds to individual measurements (by single-photon detectors) as determined by Eq. (28).The orange line depicts Holevo bound with phase randomization (PR) according to Eq. (37).The black line is for the Holevo bound (no PR) in the absence of PR Eq. (34).

FIG. 6 :
FIG.6: Cable design.The cable namely includes (i) the inner core for information transmission and physical loss control, (ii) dissipative cladding converting scattering losses from the inner core into heat and completely destructing their information contents, and (iii) outer core for monitoring line integrity.
all N atoms are in the excited state).The Holstein-Primakoff transformation maps it to the vacuum |0⟩ b (i.e.no excitations in the boson mode b).The amplifier's medium with m atoms in the ground state is now described by the state with m excitations |m⟩ b that obeys the standard annihilation and creation operations b |m⟩ b

FIG. 7 :
FIG.7: Compositions of loss and amplification channels and their equivalent representations.a Two loss or amplification channels can be reduced to one.b Loss and amplification channels can be effectively rearranged.c A series of losses and amplifiers can be reduced to one pair of loss and amplification.

FIG. 8 :
FIG.8: Schematic representation of a beam splitter attack.a Alice and Bob are connected by a quantum channel comprised of the composition of amplifiers and losses.Eve conducts a beam splitter attack seizing a part of the signal somewhere along the optical line.Thus, she divides the line into two parts.b An equivalent scheme: the losses and amplifiers before and after the point of Eve's intervention are represented by two pairs of loss and amplification channels defined by the parameters {T1, G1} and {T2, G2} respectively.