  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.
