Ultrafast cryptography with indefinitely switchable optical nanoantennas

Bistability is widely exploited to demonstrate all-optical signal processing and light-based computing. The standard paradigm of switching between two steady states corresponding to “0” and “1” bits is based on the rule that a transition occurs when the signal pulse intensity overcomes the bistability threshold, and otherwise, the system remains in the initial state. Here, we break with this concept by revealing the phenomenon of indefinite switching in which the eventual steady state of a resonant bistable system is transformed into a nontrivial function of signal pulse parameters for moderately intense signal pulses. The essential nonlinearity of the indefinite switching allows realization of well-protected cryptographic algorithms with a single bistable element in contrast to software-assisted cryptographic protocols that require thousands of logic gates. As a proof of concept, we demonstrate stream deciphering of the word “enigma” by means of an indefinitely switchable optical nanoantenna. An extremely high bitrate ranging from ~0.1 to 1 terabits per second and a small size make such systems promising as basic elements for all-optical cryptographic architectures.


Introduction
Continuous growth in communication traffic drives new demands in novel cryptographic techniques that can supply reliable security of information exchange at a high rate.Many approaches have been actively proposed and explored.Although the majority of modern solutions focus on development of software algorithms 1,2 , hardware realizations offer an additional and valuable degree of security.Recent examples of such approaches include digital metamaterials 3 and metasurfaces [4][5][6] , which consider two elemental media with a strong contrast in the electromagnetic response as building blocks (treated as 'metamaterial bits').The direct correspondence between the spatial structuring of such information bits and the electromagnetic properties of the entire system leads to a number of promising functionalities, such as information encoding in the radiation field patterns 5 as well as analogous 7 and digital 4 computations.Another actively developed realm involves securing optical information in images via linear and nonlinear holography 8,9 .However, all of these techniques typically require bulky structures and complicated programming algorithms 8,10,11 , which restrict their performance.
Alternative strategies for all-optical information processing apply bistability.From a physical viewpoint, bistability occurs when a free-energy landscape of the system contains two minima separated by one maximum 12 .To switch between the minima, the system is disturbed with a form of activation energy, which is typically supplied by a large-amplitude input signal.For the all-optical bistable switchers reported thus far, this type of transition appears when the signal pulse intensity slightly overcomes the bistability threshold and the system returns to the initial state for weaker pulses [12][13][14][15] .Here, we show that this paradigm can be changed for sufficiently strong signal pulses that induce the activation energy to a much larger extent than the local maxima of the free energy.As a result, the eventual steady state is transformed to a nontrivial function of the pulse intensity, phase, and duration, as shown in Fig. 1(a).This phenomenon of indefinite switching is used to demonstrate cryptographically secure stream encryption.
Stream ciphers encrypt and decrypt bits individually using a secret key (a string of bits).To make ciphering sufficiently reliable, cryptographic devices must combine the randomness of a securing key and nonlinearity in the relationship between plaintext and ciphertext 1 .Importantly, vanishing nonlinearity results in a weak cryptographical security even when one has a random key with appropriate statistical properties because it is sufficient to know only a small portion of a message to fully unwrap the secret key by solving the linear system of equations (algebraic attack).Software-assisted cryptographic algorithms exploit combinations of many Boolean operations and shift registers to achieve nonlinearity.This approach calls for cascading of thousands of logic gates, which limits compactness and performance for such cryptographic architectures.For example, one of the fastest and most efficient modern stream ciphers, trivium, occupies approximately 4000 logic gates and encrypts at a maximal bitrate of 2 Gb s -1 1 .In contrast, indefinite switching naturally brings nonlinearity into the relationship between plaintext and ciphertext at the level of a single optical bistable nanoantenna.The ultrafast switching time and small size render such systems promising basic elements for novel lightweight cryptographic protocols operating at a Tb s -1 bitrate.
In general, any side in a cryptographically secured data exchange process performs ciphering and deciphering procedures.Although these operations are the mathematical inverse of each other, they can be physically implemented by different devices.Here, we focus on deciphering by indefinite switching in an optical bistable nanoantenna (receiver), assuming data encoding in the intensities and phases of coherent signal pulses generated by an external laser system (sender).
As proof of concept, we consider scattering of a laser beam by a pair of nanoparticles (Fig. 1(b)).We assume that one nanoparticle in the dimer possesses a Kerr-type nonlinearity combined with a resonant response.In practice, such a nanoparticle can be constructed, for example, using any plasmonic material 16,17,18 .A surface plasmon resonance appears together with a strong cubic susceptibility for such materials as silver, gold and graphene [19][20][21] .This configuration allows driving of bistability at a moderate light power due to the strength of the nonlinear response reached via the resonance.The second nanoparticle is assumed to be linear and nonresonant and plays a role of a director to shape the directivity of the dimer scattering pattern.
Continuous-wave background radiation creates the desired nanoantenna energy landscape, giving rise to bistability, which together with the asymmetric dimer structure allows switching of the scattering pattern from an omnidirectional to a backward-scattered regime and back by illuminating the system with high-power signal pulses.Being easily distinguished in an experiment, such scattering states are associated with "0" and "1".With the aid of the general theoretical model, which describes the temporal transitions between these states, we show how to reach the regime of indefinite switching and elucidate its applications for ultrafast and efficient stream ciphering.Polar angle and radii correspond to the signal pulse phase and intensity.Yellow and pink areas associated with "0" and "1" bits denote the eventual system state after disturbance by a signal pulse.The initial state is set to "1".The grey shadow area marks the regime of operation for conventional bistable switchers.A transition appears when the intensity of a signal pulse with an appropriate phase slightly overcomes the bistability threshold and the system remains in the initial position for weaker pulses, regardless of the pulse phase.The indefinite switching regime arises for stronger signal pulse intensities, transforming the eventual steady state into a nonlinear function of the pulse parameters.(b) Schematic demonstration of stream deciphering by indefinite switching implemented with a bistable heterodimer.Formed by continuous-wave background radiation, the heterodimer scattering pattern can take on omnidirectional or backward scattering states corresponding to "1" and "0" bits.Ciphertext, a sequence of signal pulses with distinct phases and intensities, is decoded into dual-bit plaintext by switching the nanoantenna scattering pattern, which is measured with aid of two synchronized photodiodes.The nonlinearity in the relationship between ciphertext and plaintext is supplied by indefinite switching, which warrants strong cryptographic security.

Indefinite switching: Theoretical framework
To perform a rigorous theoretical analysis of the system, the optical responses of subwavelength nanoparticles are treated within the point-dipole approximation.The dimer consists of a pair of particles in which one is resonant and nonlinear, and the second is nonresonant and linear (for the purpose of the directivity pattern switching).When the dimer is illuminated by a wave with the carrier frequency in the vicinity of the resonance ( 0  ), the first nanoparticle acts as a resonating oscillator with a slow (compared with the carrier) inertial response, whereas the time delay in the response of the second nanoparticle can be neglected because it is assumed to be nonresonant and dispersionless.With these considerations, we apply the dispersion relation method 22 , which formulates the dynamic problem as a set of coupled equations for the slowly varying amplitudes of the nanoparticle dipole moments In this formulation,  is the permittivity of the host media,  is the dipole-dipole coupling between nanoparticles,  is the normalized director particle polarizability, and 0 t

  =
is the dimensionless time.The model derivation and detailed definitions of all these quantities are available in the Methods.
The steady-state solution of Eq. 1 is written as follows .
The nanoparticle polarizations ( ) ( ) where φ and θ are the spherical azimuthal and polar angles, and   denotes the phase shift between the dipoles.Because the director particle is nonresonant, efficient interparticle coupling occurs only when 0 1 k d  .In this case, the shape of the scattering pattern is defined predominantly by   , altering the behavior from dipole-like for 0   to pronounced directional shape for    24 .Considering the negligible dispersion of the second nanoparticle,   is tunable mainly due to the resonance of the first nanoparticle.We also introduce the front-to-back scattering ratio as to supply quantitative information on the dimer scattering properties.

Indefinite switching: Realization
The model represented by Eq. 1 is quite general and can be attributed to many different physical systems and engineering realizations.To make a qualitative estimate, we choose the following scenario: the heterodimer is realized as a pair of spherical nanoparticles made of graphene-wrapped ZnSe and silicon and placed in a free space.Graphene-based bistable switchers currently attract a great amount of attention [25][26][27] .The nanoparticle radii and the center-to-center distance are  The typical bistable response of the heterodimer is shown in Fig. 2(a).Once the light intensity enters the bistability domain, the system demonstrates two stable solutions with omnidirectional dipole-like and pronounced backward scattering patterns, which we associate with information bits "1" and "0", respectively.The sharpest contrast in the front-to-back ratio between these states (~30 dB) appears for the intensity 3.9 MW cm -2 and 0.1    =  and 1.08   for the "1" and "0" bits, in agreement with Eq. 3. We consider switching between these states, which, in practice, can be measured with a couple of synchronized photodiodes (Fig. 1(b)).
To induce transition from "0" to "1", following the common paradigm, one should illuminate the dimer with a signal pulse that is in phase with the background radiation and whose peak intensity together with the background intensity overcomes the high-intensity bistability threshold.An opposite transition from "1" to "0" is stimulated if one drives the system using an out-of-phase signal pulse with peak intensity, which is sufficiently large to decrease the total external field below the low-intensity bistability threshold.Figure 2(b) shows this type of switching, obtained by direct numerical simulation of Eq. 1.We assume that the background field slowly increases to the  is the characteristic time of reaching the saturation), and the phase-locked signal pulse follows the Gaussian shape is the peak amplitude of the pulse, 0  defines the pulse temporal localization,  is the pulse half-width, and  is the phase shift between the pulse and the background radiation.In practice, similar driving is widely used to realize coherent control over excitations in different nanostructures [28][29][30] .Surprisingly, we reveal that the system does not obey this rule because the peak pulse intensity grows considerably higher than the bistability thresholds.Specifically, the nanoantenna can transit to the counterpart state or remain in the initial position, depending on the signal pulse peak intensity, phase and duration.An example of such indefinite switching is shown in Fig. 2(c) when the switching is cancelled even though the signal peak intensities are significantly above the bistability thresholds.
Figure 3 shows the switching diagrams obtained by numerical simulations of Eq. 1. Specifically, we found the eventual heterodimer steady state by variations in the peak intensity, phase and duration of the signal pulse for the two initial states shown schematically in Figs.3(a) and 3(b).When the pulse intensity remains comparatively low, the system obeys the conventional switching regime described above (Fig. 1(a)).However, as the intensity grows, the final state turns into a nontrivial function of the pulse characteristics due to an intricate interplay between the system inertia and nonlinearity and the stimuli, as shown in Figs.3(c)-(j).Once the signal pulse passes, the system might be attracted by either the "0" or "1" state as a result of combined action of all of these factors.Additionally, the inertia yields the considerable increase of the switching thresholds with respect to the steady state prediction when the time of flight of a signal pulse decreases to below the decay time of oscillations, which is estimated as 0.3 ps (see Methods) (Figs. 3(g) and 3(h)).
The important characteristic of indefinite switching is the transitional time required to reach the eventual state, which also appears to be signal-pulse-dependent (Figs.3(e), 3(f), 3(i), and 3(j)).Obviously, this time scale is minimal when the system remains in the initial position and increases once a transition occurs.These dependencies should be considered as the main limitation on the bitrate of information processing with the heterodimer because the temporal separation between the signal pulses must be longer than the system switching time to distinguish distinct bits.Fig. 3. Principle of indefinite switching implemented with a bistable heterodimer.(a), (b) Schematics of the system energy profile.Minima correspond to the stable steady states with omnidirectional and backward scattering patterns.The magenta circle indicates the system initial state.The results shown in the upper ((c), (e), (g), and (i)) and lower ((d), (f), (h), and (j)) rows were obtained for the initial states depicted in (a) and (b), respectively.In (c) and (d), the color denotes the front-to-back scattering ratio in the final state.The azimuthal angle and the polar radius denote the phase (with respect to the background radiation) and intensity (in MW cm -2 ) of the signal pulse.In (e), (f), (i) and (j), the color shows the characteristic time required to reach the eventual steady state.The pulse duration for (c)-(f) is 0.4 ps.Panels (g)-(j) demonstrate the transitional diagrams in terms of signal pulse intensity and duration.For (g) and (i), the signal pulse is in phase with the background radiation, and for (h) and (j), it is out-of-phase.Other parameters are the same as in Fig. 2. The horizontal dashed lines in (g) and (h) mark the upper and lower steady-state bistability thresholds with respect to the background intensity.

Decryption with indefinite switching
An indefinitely switchable nanoantenna serves as a nonlinear function that converts incoming signal pulses with different intensities, phases, and durations into a binary output signal such that by relying on the switching diagrams in Fig. 3, one can build up a cipher, which allows conversion of a message hidden in a sequence of signal pulses (ciphertext) into a dual-bit format (plaintext).To demonstrate information decryption in this manner, we take 9 points belonging to the Archimedean spiral Each of these pulses might drive switching to the counterpart state or may not, depending on the current dimer state.As the message, we choose the word "enigma", which in a dual-bit ASCII (American standard code for information interchange) format is written as "01100101 01101110 01101001 01100111 01101101 01100001".We launch a sequence of chosen signal pulses (Fig. 4(c)) with a fixed interval of 7.4 ps between them, which we adjusted based on Figs.3(e) and 3(f) to avoid bit overlap.We stress that for successful decoding, one must appropriately set the background radiation intensity, the frequency detuning and the initial state.Figure 4(d) shows the resulting temporal response of the nanoantenna, which exactly reproduces the dual-bit code corresponding to the message.It is instructive to note that the bitrate of the demonstrated stream decryption is as fast as 240 light periods per one-bit processing or 0.13 Tb s -1 .quantity is predominantly defined by the resonant frequency and the quality factor, which is ~30 for the considered system.Remarkably, the dipole plasmonic resonance in metallic nanoantennas is characterized by a similar quality factor.However, 0  for such structures lies in the visible domain.Hence, for metallic-based nanoantennas, one can expect a bit rate of approximately several Tb s -1 .

Discussion
The nonlinearity of indefinite-switching-assisted encryption means that a given plaintext bit can be encoded by a variety of ciphertext signal pulses, yielding an infinite number of ways to relate the ciphertext to the plaintext.Additional randomization of coding pulses renders the problem of identifying the correct coding key extremely challenging.It should be noted that this crucial requirement for reliability of cryptographic protocols is reached with only a single indefinitely switchable nanoantenna in contrast to software-assisted solutions, which are based on the use of thousands of logic gates.
The information exchange via indefinite switching relies on the sender's encoding algorithm (encryption key) and the sum of the receiver's system parameters (decryption key), which include the geometrical and material properties of the nanoantenna, the background radiation intensity, the frequency detuning and the initial state, and all of those parameters must be set prior to the deciphering procedure.Independent manipulations over these keys permit integration of indefinite switching and existing cryptographic principles.
In case of symmetric-key cryptography, all parties use the same encryption key and the same decryption key.Hence, the parties should have identical indefinitely switchable nanoantennas, and the keys should be shared in advance (before every encryption session) via a secured channel.Moreover, the background radiation intensity, frequency detuning and initial state play the role of the initialization vector (IV), which should take on a new random value for every encryption session.As the IV and the encryption key must be coherent, this procedure warrants that the encryption key must always be randomly different even if one encrypts the same message several times (semantic security) 1,2 .
In asymmetric-key cryptography, the sides share only a public (encryption) key, which can be widely disseminated, and the private (decryption) key, which is different for every side, is held in secret.The pairing of these keys is based on the formalism of one-way functions, i.e., functions that are easy to compute on every input but computationally difficult to invert given the image of a random input.One-way functions are fundamental tools in personal identification, authentication, digital signatures and many other data security applications 1,2 .Indefinite switching can also operate as a one-way function since a given encoding algorithm can match many different decryption keys.Thus, once the public key is known, each party should use an individual nanoantenna with distinct properties to generate its own private key.
Importantly, the essential requirement for every cryptographic scheme is to maintain the carrier frequencies of the optical signals and the background radiation as equal.Unsynchronized light driving results in beating, which can be described as the following exchange in Eq. 1 exp( ( ) ) , where ()   is the frequency drift between the background radiation and a signal pulse in time.Obviously, this effect can lead to error switching unless the drift is much slower than the time duration of a decryption session T, i.e., () T    .Another potential source of errors is nanoantenna damage owing to overheating, which might change its optical properties.However, a recent study 31 has shown that coating of plasmonic nanoantennas with a protective Al2O3 thin layer gives rise to unchanged both linear and nonlinear responses during 10-min illumination at a pulse repetition rate of 44 MHz and a pulse intensity 0.6 GW cm -2 .This observation allows us to believe that this issue is also avoidable.
To conclude, we have shown that a bistable optical heterodimer features indefinite switching, i.e., in response to a sufficiently strong signal pulse, the system can eventually transit to a counterpart steady state or remain in the initial position, depending on the pulse parameters.The essential nonlinearity of this operation makes indefinite-switching-enabled stream ciphering immune to algebraic attacks.In contrast to commonly used cryptographic algorithms requiring thousands of logic gates, indefinite-switching-assisted cryptographic protocols can be realized with a single bistable element, benefiting from compactness and performance.We demonstrated this principle by decrypting the word "enigma" with the remarkably high bit rate of 240 light periods per one-bit processing (or 0.13 Tb s -1 ).
Our findings can be transferred to a variety of bistable systems, thus supplying great capacity for practical use.In particular, the presented general model is straightforwardly applicable to a broad range of nanoantennas, including plasmonic 32 , core-shell [33][34][35] and high-index nanoparticles 36 as well as graphene flakes 37 .We believe indefinite switching can also be obtained in a wide range of other resonant bistable system, including multilayered structures 38,39 , photonic crystal waveguides 15,40 , and polaritonic cavities 41 .Many of these elements are readily available for integration in existing nanophotonic circuitry 14,42 and optical fibers 25,43 , paving the way towards numerous opportunities for implementation of indefinite-switching-assisted cryptographic protocols on well-developed platforms.Additional highly important cryptographic functionalities, such as secure key generation with appropriate statistical properties and integration of many bistable elements in a single device for parallelization, could enable engineering of all-optical cryptographic architectures operating at ultrafast speeds at the nanoscale.

General model derivation
We assume that the dipole terms dominate in the nanoparticle responses and that quantum finite-size effects are negligible.The Kerr-like nonlinearity can be introduced via either the  and conductivity (3)  .The type of nonlinearity is assumed to be focusing since it was measured for the majority of highly nonlinear materials 19,20 .However, one can easily adjust our derivations for the defocusing nonlinearity as well.
We present the Fourier transforms of the nanoparticle electric-dipole moments as follows ( ) where ( ) ex z E is the driving electric field, and the nanoparticle polarizabilities  By appropriate fitting of the material composition, the nanoparticle shape and the host medium, one can tune this frequency from the visible range to the THz spectral domain.The electromagnetic Green's function, which describes the dipole-dipole interaction between the particles, is written as follows The dispersion relation method is based on the assumption that nonlinearity, losses, frequency detuning from resonance, and broadening of the particle polarization spectrum (due to temporal dynamics) are taken in the first order of perturbation, i.e., With this consideration, we decompose ( ) In this formulation, we used the fact that   Next, we assume that the nonlinear correction   does not change the structure of the particle eigenmode and results in the field-self action effect only 45 such that one can replace the spatially dependent local field in the graphene layer in E with its average value where V is the volume of the nonlinear media.We express the nonlinear correction for the permittivity as follows where is the field enhancement factor at resonance.
Using these considerations, we substitute Eqs. 5 and 6 into Eq. 4 and derive Eq. 1.The normalized quantities are given by the following To obtain the model for a graphene-based nanoantenna, one should make the following exchange:

Specific details of the heterodimer containing silicon and graphene-wrapped ZnSe nanoparticles
We assume that the heterodimer is placed in air with permittivity Because the gap between nanoparticle surfaces exceeds Si ZnSe min{ , }

R R
and the light wavelength is much larger than the nanoparticle sizes, one can neglect boundary, nonlocal, and quantum finite-size effects 46 and apply the point-dipole approximation 47 .In the wavelength domain of 2.5-10 m, dispersion for both and ZnSe is insignificant such that we take their permittivities as The nanoparticle polarizabilities are expressed as The size of the silicon nanoparticle was adjusted to avoid the appearance of Mie resonances in the infrared spectral range.In contrast, the graphene-wrapped ZnSe nanoparticle possesses the pronounced resonance associated with the excitation of the dipole-type plasmon in the graphene shell.The eigenfrequency for this mode can be found from Eq. 7 and written in the linear and lossless case as follows

Fig. 1 .
Fig. 1.General principle of indefinite switching and application for stream deciphering.(a) Switching diagram calculated by Eqs. 1 and 3.Polar angle and radii correspond to the signal pulse phase and intensity.Yellow and pink areas associated with "0" and "1" bits denote the eventual system state after disturbance by a signal pulse.The initial state is set to "1".The grey shadow area marks the regime of operation for conventional bistable switchers.A transition appears when the intensity of a signal pulse with an appropriate phase slightly overcomes the bistability threshold and the system remains in the initial position for weaker pulses, regardless of the pulse phase.The indefinite switching regime arises for stronger signal pulse intensities, transforming the eventual steady state into a nonlinear function of the pulse parameters.(b) Schematic demonstration of stream deciphering by indefinite switching implemented with a bistable heterodimer.Formed by continuous-wave background radiation, the heterodimer scattering pattern can take on omnidirectional or backward scattering states corresponding to "1" and "0" bits.Ciphertext, a sequence of signal pulses with distinct phases and intensities, is decoded into dual-bit plaintext by switching the nanoantenna scattering pattern, which is measured with aid of two synchronized photodiodes.The nonlinearity in the relationship between ciphertext and plaintext is supplied by indefinite switching, which warrants strong cryptographic security.

E
is the slow varying amplitude of the external light field containing pumping continuous-wave background radiation p is the driving frequency detuning from the resonant value,  is the resonance frequency shift due to the dipole-dipole coupling between the nanoparticles,  describes the thermal and radiation losses of the resonant nanoparticle, ( )

1 P and 2 P
turn into three-valued functions of frequency with two stable branches and one unstable branch when 3   − .These branches feature different scattering patterns that can be found by substitution of Eq. 2 into the general expression for the normalized scattering pattern (far-field intensity) of a couple of dipoles23 : d = 400 nm.We adjusted the parameters of the structure to obtain 0 0.133 eV  = , which corresponds to the wavelength of a CO2 laser at 9.32 µm (see further details in Methods).

Fig. 2 .
Fig. 2. Comparison of conventional bistability-induced switching and indefinite switching.(a) Steady-state front-to-back scattering ratio as a function of the background intensity given by Eqs. 2 and 3 with the detuning 0.12  = − .The bistability thresholds correspond to intensities 0.8 and 25 MW cm -2 (indicated by dotted lines in (b) and (c)).The inserts show the scattering patterns at an intensity of 3.9 MWcm -2 for which the steady states are marked by purple circles.Arrows denote the schematic transitions from one branch to another.The unstable branch is marked by the green dashed curve.(b) Demonstration of conventional temporal switching from the upper branch to the lower branch and back when the signal pulses slightly overcome the bistability thresholds.(c) The switching-off regime for signal pulses with peak intensities much stronger bistability thresholds.In panels (b) and (c), the driving light intensity and the resulted front-to-back scattering ratio are shown in the bottom and top rows, respectively.The pulse peak intensities and phases are (31.9MW cm -2 , 0), (0.09 MW cm -2 , ) and (86.6 MW cm -2 , 0), (1.1 MW cm -2 , ) for (b) and (c), respectively.The pulse duration is 0.3 ps.

Fig. 4 .
Fig. 4. Decryption of message encoded in the intensities and phases of signal pulses.(a), (b) Switching diagrams from Figs. 3(c) and 3(d) with the encryption key, i.e., the points belonging to the Archimedean spiral electric field inside the nonlinear media in E , the cubic susceptibility

 and 2 
are given by the geometry of a specific system and analytically or numerically calculated or experimentally measured.The resonance frequency 0  corresponds to the maximal nanoparticle polarizability 1  .
where d is the center-to-center distance between the nanoparticles,

2 
at resonance in a lossless case.We disregard the weak frequency-induced variations in the director polarizability and

1 h
= and contains a couple of spherical nanoparticles made of silicon and graphene-wrapped ZnSe.The nanoparticle radii and the center-to-center distance are

49 .
The linear graphene conductivity can be expressed for photon energies smaller than the Fermi energy in terms of the Drude model as follows20 the electron charge, is the Planck constant,  is the relaxation time for intraband transitions, constant, and T is the absolute temperature) allows us to disregard both interband transitions and temperature effects.The cubic conductivity is written in the local quasiclassical approximation as follows20,