<s>
In	O
cryptography	O
,	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
(	O
OTP	O
)	O
is	O
an	O
encryption	O
technique	O
that	O
cannot	O
be	O
cracked	O
,	O
but	O
requires	O
the	O
use	O
of	O
a	O
single-use	O
pre-shared	O
key	O
that	O
is	O
not	O
smaller	O
than	O
the	O
message	O
being	O
sent	O
.	O
</s>
<s>
In	O
this	O
technique	O
,	O
a	O
plaintext	O
is	O
paired	O
with	O
a	O
random	O
secret	O
key	O
(	O
also	O
referred	O
to	O
as	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
)	O
.	O
</s>
<s>
For	O
example	O
,	O
using	O
cryptographic	O
hashes	O
or	O
mathematical	O
functions	O
(	O
such	O
as	O
logarithm	O
or	O
square	O
root	O
)	O
to	O
generate	O
keys	O
from	O
fewer	O
bits	O
of	O
entropy	O
would	O
break	O
the	O
uniform	O
distribution	O
requirement	O
,	O
and	O
therefore	O
would	O
not	O
provide	O
perfect	B-Algorithm
secrecy	I-Algorithm
.	O
</s>
<s>
It	O
has	O
also	O
been	O
mathematically	O
proven	O
that	O
any	O
cipher	B-Application
with	O
the	O
property	O
of	O
perfect	B-Algorithm
secrecy	I-Algorithm
must	O
use	O
keys	O
with	O
effectively	O
the	O
same	O
requirements	O
as	O
OTP	O
keys	O
.	O
</s>
<s>
Digital	O
versions	O
of	O
one-time	B-Algorithm
pad	I-Algorithm
ciphers	B-Application
have	O
been	O
used	O
by	O
nations	O
for	O
critical	O
diplomatic	O
and	O
military	O
communication	O
,	O
but	O
the	O
problems	O
of	O
secure	O
key	B-General_Concept
distribution	I-General_Concept
make	O
them	O
impractical	O
for	O
most	O
applications	O
.	O
</s>
<s>
First	O
described	O
by	O
Frank	O
Miller	O
in	O
1882	O
,	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
was	O
re-invented	O
in	O
1917	O
.	O
</s>
<s>
On	O
July	O
22	O
,	O
1919	O
,	O
U.S.	O
Patent	O
1,310,719	O
was	O
issued	O
to	O
Gilbert	O
Vernam	O
for	O
the	O
XOR	B-Application
operation	O
used	O
for	O
the	O
encryption	O
of	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
.	O
</s>
<s>
Derived	O
from	O
his	O
Vernam	B-Algorithm
cipher	I-Algorithm
,	O
the	O
system	O
was	O
a	O
cipher	B-Application
that	O
combined	O
a	O
message	O
with	O
a	O
key	O
read	O
from	O
a	O
punched	O
tape	O
.	O
</s>
<s>
The	O
KGB	B-Application
used	O
pads	O
of	O
such	O
size	O
that	O
they	O
could	O
fit	O
in	O
the	O
palm	O
of	O
a	O
hand	O
,	O
or	O
in	O
a	O
walnut	O
shell	O
.	O
</s>
<s>
To	O
increase	O
security	O
,	O
one-time	B-Algorithm
pads	I-Algorithm
were	O
sometimes	O
printed	O
onto	O
sheets	O
of	O
highly	O
flammable	O
nitrocellulose	O
,	O
so	O
that	O
they	O
could	O
easily	O
be	O
burned	O
after	O
use	O
.	O
</s>
<s>
There	O
is	O
some	O
ambiguity	O
to	O
the	O
term	O
"	O
Vernam	B-Algorithm
cipher	I-Algorithm
"	O
because	O
some	O
sources	O
use	O
"	O
Vernam	B-Algorithm
cipher	I-Algorithm
"	O
and	O
"	O
one-time	B-Algorithm
pad	I-Algorithm
"	O
synonymously	O
,	O
while	O
others	O
refer	O
to	O
any	O
additive	O
stream	B-Algorithm
cipher	I-Algorithm
as	O
a	O
"	O
Vernam	B-Algorithm
cipher	I-Algorithm
"	O
,	O
including	O
those	O
based	O
on	O
a	O
cryptographically	B-Algorithm
secure	I-Algorithm
pseudorandom	I-Algorithm
number	I-Algorithm
generator	I-Algorithm
(	O
CSPRNG	B-Algorithm
)	O
.	O
</s>
<s>
Frank	O
Miller	O
in	O
1882	O
was	O
the	O
first	O
to	O
describe	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
system	O
for	O
securing	O
telegraphy	O
.	O
</s>
<s>
The	O
next	O
one-time	B-Algorithm
pad	I-Algorithm
system	O
was	O
electrical	O
.	O
</s>
<s>
In	O
1917	O
,	O
Gilbert	O
Vernam	O
(	O
of	O
AT&T	O
Corporation	O
)	O
invented	O
and	O
later	O
patented	O
in	O
1919	O
(	O
)	O
a	O
cipher	B-Application
based	O
on	O
teleprinter	O
technology	O
.	O
</s>
<s>
Together	O
they	O
invented	O
the	O
first	O
one-time	B-Algorithm
tape	I-Algorithm
system	O
.	O
</s>
<s>
Diplomats	O
had	O
long	O
used	O
codes	O
and	O
ciphers	B-Application
for	O
confidentiality	O
and	O
to	O
minimize	O
telegraph	O
costs	O
.	O
</s>
<s>
For	O
the	O
codes	O
,	O
words	O
and	O
phrases	O
were	O
converted	O
to	O
groups	O
of	O
numbers	O
(	O
typically	O
4	O
or	O
5	O
digits	O
)	O
using	O
a	O
dictionary-like	O
codebook	B-Algorithm
.	O
</s>
<s>
A	O
separate	O
notion	O
was	O
the	O
use	O
of	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
of	O
letters	O
to	O
encode	O
plaintext	O
directly	O
as	O
in	O
the	O
example	O
below	O
.	O
</s>
<s>
The	O
final	O
discovery	O
was	O
made	O
by	O
information	O
theorist	O
Claude	O
Shannon	O
in	O
the	O
1940s	O
who	O
recognized	O
and	O
proved	O
the	O
theoretical	O
significance	O
of	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
system	O
.	O
</s>
<s>
At	O
the	O
same	O
time	O
,	O
Soviet	O
information	O
theorist	O
Vladimir	O
Kotelnikov	O
had	O
independently	O
proved	O
the	O
absolute	O
security	O
of	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
;	O
his	O
results	O
were	O
delivered	O
in	O
1941	O
in	O
a	O
report	O
that	O
apparently	O
remains	O
classified	O
.	O
</s>
<s>
(	O
It	O
is	O
common	O
,	O
but	O
not	O
required	O
,	O
to	O
assign	B-General_Concept
each	I-General_Concept
letter	I-General_Concept
a	I-General_Concept
numerical	I-General_Concept
value	I-General_Concept
,	O
e.g.	O
,	O
a	O
is	O
0	O
,	O
b	O
is	O
1	O
,	O
and	O
so	O
on	O
.	O
)	O
</s>
<s>
In	O
this	O
example	O
,	O
the	O
technique	O
is	O
to	O
combine	O
the	O
key	O
and	O
the	O
message	O
using	O
modular	O
addition	O
,	O
not	O
unlike	O
the	O
Vigenère	B-Algorithm
cipher	I-Algorithm
.	O
</s>
<s>
Both	O
Alice	O
and	O
Bob	O
destroy	O
the	O
key	O
sheet	O
immediately	O
after	O
use	O
,	O
thus	O
preventing	O
reuse	O
and	O
an	O
attack	O
against	O
the	O
cipher	B-Application
.	O
</s>
<s>
The	O
KGB	B-Application
often	O
issued	O
its	O
agents	O
one-time	B-Algorithm
pads	I-Algorithm
printed	O
on	O
tiny	O
sheets	O
of	O
flash	O
paper	O
,	O
paper	O
chemically	O
converted	O
to	O
nitrocellulose	O
,	O
which	O
burns	O
almost	O
instantly	O
and	O
leaves	O
no	O
ash	O
.	O
</s>
<s>
The	O
classical	O
one-time	B-Algorithm
pad	I-Algorithm
of	O
espionage	O
used	O
actual	O
pads	O
of	O
minuscule	O
,	O
easily	O
concealed	O
paper	O
,	O
a	O
sharp	O
pencil	O
,	O
and	O
some	O
mental	O
arithmetic	O
.	O
</s>
<s>
The	O
exclusive	O
or	O
(	O
XOR	B-Application
)	O
operation	O
is	O
often	O
used	O
to	O
combine	O
the	O
plaintext	O
and	O
the	O
key	O
elements	O
,	O
and	O
is	O
especially	O
attractive	O
on	O
computers	O
since	O
it	O
is	O
usually	O
a	O
native	O
machine	O
instruction	O
and	O
is	O
therefore	O
very	O
fast	O
.	O
</s>
<s>
The	O
auxiliary	O
parts	O
of	O
a	O
software	O
one-time	B-Algorithm
pad	I-Algorithm
implementation	O
present	O
real	O
challenges	O
:	O
secure	O
handling/transmission	O
of	O
plaintext	O
,	O
truly	O
random	O
keys	O
,	O
and	O
one-time-only	O
use	O
of	O
the	O
key	O
.	O
</s>
<s>
One-time	B-Algorithm
pads	I-Algorithm
are	O
"	O
information-theoretically	B-Algorithm
secure	I-Algorithm
"	O
in	O
that	O
the	O
encrypted	O
message	O
(	O
i.e.	O
,	O
the	O
ciphertext	O
)	O
provides	O
no	O
information	O
about	O
the	O
original	O
message	O
to	O
a	O
cryptanalyst	O
(	O
except	O
the	O
maximum	O
possible	O
length	O
of	O
the	O
message	O
)	O
.	O
</s>
<s>
This	O
is	O
a	O
very	O
strong	O
notion	O
of	O
security	O
first	O
developed	O
during	O
WWII	O
by	O
Claude	O
Shannon	O
and	O
proved	O
,	O
mathematically	O
,	O
to	O
be	O
true	O
for	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
by	O
Shannon	O
at	O
about	O
the	O
same	O
time	O
.	O
</s>
<s>
Properly	O
used	O
,	O
one-time	B-Algorithm
pads	I-Algorithm
are	O
secure	O
in	O
this	O
sense	O
even	O
against	O
adversaries	O
with	O
infinite	O
computational	O
power	O
.	O
</s>
<s>
Shannon	O
proved	O
,	O
using	O
information	O
theoretic	O
considerations	O
,	O
that	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
has	O
a	O
property	O
he	O
termed	O
perfect	B-Algorithm
secrecy	I-Algorithm
;	O
that	O
is	O
,	O
the	O
ciphertext	O
C	O
gives	O
absolutely	O
no	O
additional	O
information	O
about	O
the	O
plaintext	O
.	O
</s>
<s>
This	O
implies	O
that	O
for	O
every	O
message	O
M	O
and	O
corresponding	O
ciphertext	O
C	O
,	O
there	O
must	O
be	O
at	O
least	O
one	O
key	O
K	O
that	O
binds	O
them	O
as	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
.	O
</s>
<s>
Mathematically	O
speaking	O
,	O
this	O
means	O
must	O
hold	O
,	O
where	O
denote	O
the	O
quantities	O
of	O
possible	O
keys	O
,	O
ciphers	B-Application
and	O
messages	O
,	O
respectively	O
.	O
</s>
<s>
In	O
other	O
words	O
,	O
to	O
be	O
able	O
to	O
go	O
from	O
any	O
plaintext	O
in	O
the	O
message	O
space	O
M	O
to	O
any	O
cipher	B-Application
in	O
the	O
cipher	B-Application
space	O
C	O
(	O
via	O
encryption	O
)	O
and	O
from	O
any	O
cipher	B-Application
in	O
cipher-space	O
C	O
to	O
a	O
plain	O
text	O
in	O
message	O
space	O
M	O
(	O
decryption	O
)	O
,	O
it	O
would	O
require	O
at	O
least	O
keys	O
(	O
with	O
all	O
keys	O
used	O
with	O
equal	O
probability	O
of	O
to	O
ensure	O
perfect	B-Algorithm
secrecy	I-Algorithm
)	O
.	O
</s>
<s>
Another	O
way	O
of	O
stating	O
perfect	B-Algorithm
secrecy	I-Algorithm
is	O
that	O
for	O
all	O
messages	O
in	O
message	O
space	O
M	O
,	O
and	O
for	O
all	O
ciphers	B-Application
c	O
in	O
cipher	B-Application
space	O
C	O
,	O
we	O
have	O
,	O
where	O
represents	O
the	O
probabilities	O
,	O
taken	O
over	O
a	O
choice	O
of	O
in	O
key	O
space	O
over	O
the	O
coin	O
tosses	O
of	O
a	O
probabilistic	B-General_Concept
algorithm	I-General_Concept
,	O
.	O
</s>
<s>
Perfect	B-Algorithm
secrecy	I-Algorithm
is	O
a	O
strong	O
notion	O
of	O
cryptanalytic	O
difficulty	O
.	O
</s>
<s>
Conventional	O
symmetric	B-Algorithm
encryption	I-Algorithm
algorithms	I-Algorithm
use	O
complex	O
patterns	O
of	O
substitution	O
and	O
transpositions	B-Algorithm
.	O
</s>
<s>
Asymmetric	B-Application
encryption	I-Application
algorithms	O
depend	O
on	O
mathematical	O
problems	O
that	O
are	O
thought	O
to	O
be	O
difficult	O
to	O
solve	O
,	O
such	O
as	O
integer	O
factorization	O
or	O
the	O
discrete	O
logarithm	O
.	O
</s>
<s>
Given	O
perfect	B-Algorithm
secrecy	I-Algorithm
,	O
in	O
contrast	O
to	O
conventional	O
symmetric	B-Algorithm
encryption	I-Algorithm
,	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
is	O
immune	O
even	O
to	O
brute-force	O
attacks	O
.	O
</s>
<s>
The	O
parts	O
of	O
the	O
plaintext	O
that	O
are	O
known	O
will	O
reveal	O
only	O
the	O
parts	O
of	O
the	O
key	O
corresponding	O
to	O
them	O
,	O
and	O
they	O
correspond	O
on	O
a	O
strictly	B-Algorithm
one-to-one	I-Algorithm
basis	I-Algorithm
;	O
a	O
uniformly	O
random	O
key	O
's	O
bits	O
will	O
be	O
independent	O
.	O
</s>
<s>
Quantum	B-Architecture
computers	I-Architecture
have	O
been	O
shown	O
by	O
Peter	B-Algorithm
Shor	I-Algorithm
and	O
others	O
to	O
be	O
much	O
faster	O
at	O
solving	O
some	O
problems	O
that	O
the	O
security	O
of	O
traditional	O
asymmetric	B-Application
encryption	I-Application
algorithms	O
depends	O
on	O
.	O
</s>
<s>
The	O
cryptographic	O
algorithms	O
that	O
depend	O
on	O
these	O
problems	O
 '	O
difficulty	O
would	O
be	O
rendered	O
obsolete	O
with	O
a	O
powerful	O
enough	O
quantum	B-Architecture
computer	I-Architecture
.	O
</s>
<s>
One-time	B-Algorithm
pads	I-Algorithm
,	O
however	O
,	O
would	O
remain	O
secure	O
,	O
as	O
perfect	B-Algorithm
secrecy	I-Algorithm
does	O
not	O
depend	O
on	O
assumptions	O
about	O
the	O
computational	O
resources	O
of	O
an	O
attacker	O
.	O
</s>
<s>
Quantum	O
cryptography	O
and	O
post-quantum	O
cryptography	O
involve	O
studying	O
the	O
impact	O
of	O
quantum	B-Architecture
computers	I-Architecture
on	O
information	O
security	O
.	O
</s>
<s>
Despite	O
Shannon	O
's	O
proof	O
of	O
its	O
security	O
,	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
has	O
serious	O
drawbacks	O
in	O
practice	O
because	O
it	O
requires	O
:	O
</s>
<s>
Truly	O
random	O
,	O
as	O
opposed	O
to	O
pseudorandom	B-Error_Name
,	O
one-time	B-Algorithm
pad	I-Algorithm
values	O
,	O
which	O
is	O
a	O
non-trivial	O
requirement	O
.	O
</s>
<s>
Random	O
number	O
generation	O
in	O
computers	O
is	O
often	O
difficult	O
,	O
and	O
pseudorandom	B-Algorithm
number	I-Algorithm
generators	I-Algorithm
are	O
often	O
used	O
for	O
their	O
speed	O
and	O
usefulness	O
for	O
most	O
applications	O
.	O
</s>
<s>
Secure	O
generation	O
and	O
exchange	O
of	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
values	O
,	O
which	O
must	O
be	O
at	O
least	O
as	O
long	O
as	O
the	O
message	O
.	O
</s>
<s>
This	O
is	O
important	O
because	O
the	O
security	O
of	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
depends	O
on	O
the	O
security	O
of	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
exchange	O
.	O
</s>
<s>
If	O
an	O
attacker	O
is	O
able	O
to	O
intercept	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
value	O
,	O
they	O
can	O
decrypt	O
messages	O
sent	O
using	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
.	O
</s>
<s>
Careful	O
treatment	O
to	O
make	O
sure	O
that	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
values	O
continue	O
to	O
remain	O
secret	O
and	O
are	O
disposed	O
of	O
correctly	O
,	O
preventing	O
any	O
reuse	O
(	O
partially	O
or	O
entirely	O
)	O
—	O
hence	O
"	O
one-time	O
"	O
.	O
</s>
<s>
One-time	B-Algorithm
pads	I-Algorithm
solve	O
few	O
current	O
practical	O
problems	O
in	O
cryptography	O
.	O
</s>
<s>
High-quality	O
ciphers	B-Application
are	O
widely	O
available	O
and	O
their	O
security	O
is	O
not	O
currently	O
considered	O
a	O
major	O
worry	O
.	O
</s>
<s>
Such	O
ciphers	B-Application
are	O
almost	O
always	O
easier	O
to	O
employ	O
than	O
one-time	B-Algorithm
pads	I-Algorithm
because	O
the	O
amount	O
of	O
key	O
material	O
that	O
must	O
be	O
properly	O
and	O
securely	O
generated	O
,	O
distributed	O
and	O
stored	O
is	O
far	O
smaller	O
.	O
</s>
<s>
Additionally	O
,	O
public	B-Application
key	I-Application
cryptography	I-Application
overcomes	O
the	O
problem	O
of	O
key	B-General_Concept
distribution	I-General_Concept
.	O
</s>
<s>
Even	O
those	O
generators	O
that	O
are	O
suitable	O
for	O
normal	O
cryptographic	O
use	O
,	O
including	O
/dev/random	B-Application
and	O
many	O
hardware	O
random	O
number	O
generators	O
,	O
may	O
make	O
some	O
use	O
of	O
cryptographic	O
functions	O
whose	O
security	O
has	O
not	O
been	O
proven	O
.	O
</s>
<s>
If	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
is	O
used	O
just	O
twice	O
,	O
simple	O
mathematical	O
operations	O
can	O
reduce	O
it	O
to	O
a	O
running	B-Algorithm
key	I-Algorithm
cipher	I-Algorithm
.	O
</s>
<s>
where	O
means	O
XOR	B-Application
.	O
</s>
<s>
If	O
an	O
attacker	O
were	O
to	O
have	O
both	O
ciphertexts	O
and	O
,	O
then	O
simply	O
taking	O
the	O
XOR	B-Application
of	O
and	O
yields	O
the	O
XOR	B-Application
of	O
the	O
two	O
plaintexts	O
.	O
</s>
<s>
(	O
This	O
is	O
because	O
taking	O
the	O
XOR	B-Application
of	O
the	O
common	O
key	O
with	O
itself	O
yields	O
a	O
constant	O
bitstream	O
of	O
zeros	O
.	O
)	O
</s>
<s>
is	O
then	O
the	O
equivalent	O
of	O
a	O
running	B-Algorithm
key	I-Algorithm
cipher	I-Algorithm
.	O
</s>
<s>
If	O
both	O
plaintexts	O
are	O
in	O
a	O
natural	O
language	O
(	O
e.g.	O
,	O
English	O
or	O
Russian	O
)	O
,	O
each	O
stands	O
a	O
very	O
high	O
chance	O
of	O
being	O
recovered	O
by	O
heuristic	B-Algorithm
cryptanalysis	O
,	O
with	O
possibly	O
a	O
few	O
ambiguities	O
.	O
</s>
<s>
Because	O
the	O
pad	O
,	O
like	O
all	O
shared	O
secrets	O
,	O
must	O
be	O
passed	O
and	O
kept	O
secure	O
,	O
and	O
the	O
pad	O
has	O
to	O
be	O
at	O
least	O
as	O
long	O
as	O
the	O
message	O
,	O
there	O
is	O
often	O
no	O
point	O
in	O
using	O
one-time	O
padding	B-Algorithm
,	O
as	O
one	O
can	O
simply	O
send	O
the	O
plain	O
text	O
instead	O
of	O
the	O
pad	O
(	O
as	O
both	O
can	O
be	O
the	O
same	O
size	O
and	O
have	O
to	O
be	O
sent	O
securely	O
)	O
.	O
</s>
<s>
Quantum	O
key	B-General_Concept
distribution	I-General_Concept
also	O
proposes	O
a	O
solution	O
to	O
this	O
problem	O
,	O
assuming	O
fault-tolerant	B-General_Concept
quantum	B-Architecture
computers	I-Architecture
.	O
</s>
<s>
Distributing	O
very	O
long	O
one-time	B-Algorithm
pad	I-Algorithm
keys	O
is	O
inconvenient	O
and	O
usually	O
poses	O
a	O
significant	O
security	O
risk	O
.	O
</s>
<s>
The	O
pad	O
is	O
essentially	O
the	O
encryption	O
key	O
,	O
but	O
unlike	O
keys	O
for	O
modern	O
ciphers	B-Application
,	O
it	O
must	O
be	O
extremely	O
long	O
and	O
is	O
far	O
too	O
difficult	O
for	O
humans	O
to	O
remember	O
.	O
</s>
<s>
Storage	O
media	O
such	O
as	O
thumb	O
drives	O
,	O
DVD-Rs	O
or	O
personal	O
digital	O
audio	O
players	O
can	O
be	O
used	O
to	O
carry	O
a	O
very	O
large	O
one-time-pad	O
from	O
place	O
to	O
place	O
in	O
a	O
non-suspicious	O
way	O
,	O
but	O
the	O
need	O
to	O
transport	O
the	O
pad	O
physically	O
is	O
a	O
burden	O
compared	O
to	O
the	O
key	O
negotiation	O
protocols	O
of	O
a	O
modern	O
public-key	B-Application
cryptosystem	I-Application
.	O
</s>
<s>
In	O
addition	O
,	O
the	O
risk	O
of	O
compromise	O
during	O
transit	O
(	O
for	O
example	O
,	O
a	O
pickpocket	O
swiping	O
,	O
copying	O
and	O
replacing	O
the	O
pad	O
)	O
is	O
likely	O
to	O
be	O
much	O
greater	O
in	O
practice	O
than	O
the	O
likelihood	O
of	O
compromise	O
for	O
a	O
cipher	B-Application
such	O
as	O
AES	B-Algorithm
.	O
</s>
<s>
Finally	O
,	O
the	O
effort	O
needed	O
to	O
manage	O
one-time	B-Algorithm
pad	I-Algorithm
key	O
material	O
scales	B-Architecture
very	O
badly	O
for	O
large	O
networks	O
of	O
communicants	O
—	O
the	O
number	O
of	O
pads	O
required	O
goes	O
up	O
as	O
the	O
square	O
of	O
the	O
number	O
of	O
users	O
freely	O
exchanging	O
messages	O
.	O
</s>
<s>
For	O
communication	O
between	O
only	O
two	O
persons	O
,	O
or	O
a	O
star	B-Architecture
network	I-Architecture
topology	I-Architecture
,	O
this	O
is	O
less	O
of	O
a	O
problem	O
.	O
</s>
<s>
As	O
traditionally	O
used	O
,	O
one-time	B-Algorithm
pads	I-Algorithm
provide	O
no	O
message	O
authentication	O
,	O
the	O
lack	O
of	O
which	O
can	O
pose	O
a	O
security	O
threat	O
in	O
real-world	O
systems	O
.	O
</s>
<s>
The	O
attacker	O
's	O
knowledge	O
of	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
is	O
limited	O
to	O
this	O
byte	O
length	O
,	O
which	O
must	O
be	O
maintained	O
for	O
any	O
other	O
content	O
of	O
the	O
message	O
to	O
remain	O
valid	O
.	O
</s>
<s>
Without	O
knowing	O
the	O
message	O
,	O
the	O
attacker	O
can	O
also	O
flip	O
bits	O
in	O
a	O
message	O
sent	O
with	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
,	O
without	O
the	O
recipient	O
being	O
able	O
to	O
detect	O
it	O
.	O
</s>
<s>
Because	O
of	O
their	O
similarities	O
,	O
attacks	O
on	O
one-time	B-Algorithm
pads	I-Algorithm
are	O
similar	O
to	O
attacks	O
on	O
stream	B-Algorithm
ciphers	I-Algorithm
.	O
</s>
<s>
Standard	O
techniques	O
to	O
prevent	O
this	O
,	O
such	O
as	O
the	O
use	O
of	O
a	O
message	B-Algorithm
authentication	I-Algorithm
code	I-Algorithm
can	O
be	O
used	O
along	O
with	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
system	O
to	O
prevent	O
such	O
attacks	O
,	O
as	O
can	O
classical	O
methods	O
such	O
as	O
variable	O
length	O
padding	B-Algorithm
and	O
Russian	B-General_Concept
copulation	I-General_Concept
,	O
but	O
they	O
all	O
lack	O
the	O
perfect	B-Algorithm
security	I-Algorithm
the	O
OTP	O
itself	O
has	O
.	O
</s>
<s>
Universal	B-Algorithm
hashing	I-Algorithm
provides	O
a	O
way	O
to	O
authenticate	O
messages	O
up	O
to	O
an	O
arbitrary	O
security	O
bound	O
(	O
i.e.	O
,	O
for	O
any	O
,	O
a	O
large	O
enough	O
hash	O
ensures	O
that	O
even	O
a	O
computationally	O
unbounded	O
attacker	O
's	O
likelihood	O
of	O
successful	O
forgery	O
is	O
less	O
than	O
p	O
)	O
,	O
but	O
this	O
uses	O
additional	O
random	O
data	O
from	O
the	O
pad	O
,	O
and	O
some	O
of	O
these	O
techniques	O
remove	O
the	O
possibility	O
of	O
implementing	O
the	O
system	O
without	O
a	O
computer	O
.	O
</s>
<s>
Due	O
to	O
its	O
relative	O
simplicity	O
of	O
implementation	O
,	O
and	O
due	O
to	O
its	O
promise	O
of	O
perfect	B-Algorithm
secrecy	I-Algorithm
,	O
one-time-pad	O
enjoys	O
high	O
popularity	O
among	O
students	O
learning	O
about	O
cryptography	O
,	O
especially	O
as	O
it	O
is	O
often	O
the	O
first	O
algorithm	O
to	O
be	O
presented	O
and	O
implemented	O
during	O
a	O
course	O
.	O
</s>
<s>
This	O
applies	O
equally	O
to	O
all	O
algorithms	O
,	O
from	O
insecure	O
basic	O
mathematical	O
operations	O
like	O
square	O
root	O
decimal	O
expansions	O
,	O
to	O
complex	O
,	O
cryptographically	O
secure	O
pseudo-random	B-Error_Name
random	O
number	O
generators	O
(	O
CSPRNGs	B-Algorithm
)	O
.	O
</s>
<s>
None	O
of	O
these	O
implementations	O
are	O
one-time-pads	O
,	O
but	O
stream	B-Algorithm
ciphers	I-Algorithm
by	O
definition	O
.	O
</s>
<s>
All	O
one-time	B-Algorithm
pads	I-Algorithm
must	O
be	O
generated	O
by	O
a	O
non-algorithmic	O
process	O
,	O
e.g.	O
</s>
<s>
A	O
common	O
flawed	O
delivery	O
mechanism	O
for	O
one-time-pad	O
is	O
a	O
standard	O
hybrid	O
cryptosystem	O
that	O
relies	O
on	O
symmetric	B-Algorithm
key	I-Algorithm
cryptography	I-Algorithm
for	O
pad	O
encryption	O
,	O
and	O
asymmetric	B-Application
cryptography	I-Application
for	O
symmetric	B-Algorithm
key	I-Algorithm
delivery	O
.	O
</s>
<s>
Common	O
secure	O
methods	O
for	O
one-time	B-Algorithm
pad	I-Algorithm
delivery	O
are	O
quantum	O
key	B-General_Concept
distribution	I-General_Concept
,	O
a	O
sneakernet	O
or	O
courier	B-Protocol
service	O
,	O
or	O
a	O
dead	O
drop	O
.	O
</s>
<s>
In	O
some	O
hypothetical	O
espionage	O
situations	O
,	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
might	O
be	O
useful	O
because	O
encryption	O
and	O
decryption	O
can	O
be	O
computed	O
by	O
hand	O
with	O
only	O
pencil	O
and	O
paper	O
.	O
</s>
<s>
Nearly	O
all	O
other	O
high	O
quality	O
ciphers	B-Application
are	O
entirely	O
impractical	O
without	O
computers	O
.	O
</s>
<s>
The	O
one-time-pad	O
is	O
the	O
optimum	O
cryptosystem	O
with	O
theoretically	O
perfect	B-Algorithm
secrecy	I-Algorithm
.	O
</s>
<s>
One-time	B-Algorithm
pads	I-Algorithm
are	O
practical	O
in	O
situations	O
where	O
two	O
parties	O
in	O
a	O
secure	O
environment	O
must	O
be	O
able	O
to	O
depart	O
from	O
one	O
another	O
and	O
communicate	O
from	O
two	O
separate	O
secure	O
environments	O
with	O
perfect	B-Algorithm
secrecy	I-Algorithm
.	O
</s>
<s>
The	O
algorithm	O
most	O
commonly	O
associated	O
with	O
quantum	O
key	B-General_Concept
distribution	I-General_Concept
is	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
.	O
</s>
<s>
The	O
one-time	B-Algorithm
pad	I-Algorithm
is	O
mimicked	O
by	O
stream	B-Algorithm
ciphers	I-Algorithm
.	O
</s>
<s>
Numbers	O
stations	O
often	O
send	O
messages	O
encrypted	O
with	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
.	O
</s>
<s>
A	O
common	O
use	O
of	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
in	O
quantum	O
cryptography	O
is	O
being	O
used	O
in	O
association	O
with	O
quantum	O
key	B-General_Concept
distribution	I-General_Concept
(	O
QKD	O
)	O
.	O
</s>
<s>
QKD	O
is	O
typically	O
associated	O
with	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
because	O
it	O
provides	O
a	O
way	O
of	O
distributing	O
a	O
long	O
shared	O
secret	O
key	O
securely	O
and	O
efficiently	O
(	O
assuming	O
the	O
existence	O
of	O
practical	O
quantum	O
networking	O
hardware	O
)	O
.	O
</s>
<s>
In	O
the	O
original	O
BB84	O
paper	O
,	O
it	O
was	O
proven	O
that	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
,	O
with	O
keys	O
distributed	O
via	O
QKD	O
,	O
is	O
a	O
perfectly	O
secure	O
encryption	O
scheme	O
.	O
</s>
<s>
Combining	O
QKD	O
with	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
can	O
also	O
loosen	O
the	O
requirements	O
for	O
key	O
reuse	O
.	O
</s>
<s>
In	O
1982	O
,	O
Bennett	O
and	O
Brassard	O
showed	O
that	O
if	O
a	O
QKD	O
protocol	O
does	O
not	O
detect	O
that	O
an	O
adversary	O
was	O
trying	O
to	O
intercept	O
an	O
exchanged	O
key	O
,	O
than	O
the	O
key	O
can	O
safely	O
be	O
reused	O
while	O
preserving	O
perfect	B-Algorithm
secrecy	I-Algorithm
.	O
</s>
<s>
There	O
also	O
exists	O
a	O
quantum	O
analogue	O
of	O
the	O
one	B-Algorithm
time	I-Algorithm
pad	I-Algorithm
,	O
which	O
can	O
be	O
used	O
to	O
exchange	O
quantum	O
states	O
along	O
a	O
one-way	O
quantum	O
channel	O
with	O
perfect	B-Algorithm
secrecy	I-Algorithm
,	O
which	O
is	O
sometimes	O
used	O
in	O
quantum	B-Architecture
computing	I-Architecture
.	O
</s>
<s>
It	O
can	O
be	O
shown	O
that	O
a	O
shared	O
secret	O
of	O
at	O
least	O
2n	O
classical	O
bits	O
is	O
required	O
to	O
exchange	O
an	O
n-qubit	O
quantum	O
state	O
along	O
a	O
one-way	O
quantum	O
channel	O
(	O
by	O
analogue	O
with	O
the	O
result	O
that	O
a	O
key	O
of	O
n	O
bits	O
is	O
required	O
to	O
exchange	O
an	O
n	O
bit	O
message	O
with	O
perfect	B-Algorithm
secrecy	I-Algorithm
)	O
.	O
</s>
<s>
One	O
way	O
to	O
implement	O
this	O
quantum	O
one-time	B-Algorithm
pad	I-Algorithm
is	O
by	O
dividing	O
the	O
2n	O
bit	O
key	O
into	O
n	O
pairs	O
of	O
bits	O
.	O
</s>
<s>
The	O
one-time	B-Algorithm
pad	I-Algorithm
is	O
an	O
example	O
of	O
post-quantum	O
cryptography	O
,	O
because	O
perfect	B-Algorithm
secrecy	I-Algorithm
is	O
a	O
definition	O
of	O
security	O
that	O
does	O
not	O
depend	O
on	O
the	O
computational	O
resources	O
of	O
the	O
adversary	O
.	O
</s>
<s>
Consequently	O
,	O
an	O
adversary	O
with	O
a	O
quantum	B-Architecture
computer	I-Architecture
would	O
still	O
not	O
be	O
able	O
to	O
gain	O
any	O
more	O
information	O
about	O
a	O
message	O
encrypted	O
with	O
a	O
one	B-Algorithm
time	I-Algorithm
pad	I-Algorithm
than	O
an	O
adversary	O
with	O
just	O
a	O
classical	O
computer	O
.	O
</s>
<s>
One-time	B-Algorithm
pads	I-Algorithm
have	O
been	O
used	O
in	O
special	O
circumstances	O
since	O
the	O
early	O
1900s	O
.	O
</s>
<s>
The	O
breaking	O
of	O
poor	O
Soviet	O
cryptography	O
by	O
the	O
British	O
,	O
with	O
messages	O
made	O
public	O
for	O
political	O
reasons	O
in	O
two	O
instances	O
in	O
the	O
1920s	O
(	O
ARCOS	O
case	O
)	O
,	O
appear	O
to	O
have	O
caused	O
the	O
Soviet	O
Union	O
to	O
adopt	O
one-time	B-Algorithm
pads	I-Algorithm
for	O
some	O
purposes	O
by	O
around	O
1930	O
.	O
</s>
<s>
KGB	B-Application
spies	O
are	O
also	O
known	O
to	O
have	O
used	O
pencil	O
and	O
paper	O
one-time	B-Algorithm
pads	I-Algorithm
more	O
recently	O
.	O
</s>
<s>
Both	O
were	O
found	O
with	O
physical	O
one-time	B-Algorithm
pads	I-Algorithm
in	O
their	O
possession	O
.	O
</s>
<s>
A	O
number	O
of	O
nations	O
have	O
used	O
one-time	B-Algorithm
pad	I-Algorithm
systems	O
for	O
their	O
sensitive	O
traffic	O
.	O
</s>
<s>
Leo	O
Marks	O
reports	O
that	O
the	O
British	O
Special	O
Operations	O
Executive	O
used	O
one-time	B-Algorithm
pads	I-Algorithm
in	O
World	O
War	O
II	O
to	O
encode	O
traffic	O
between	O
its	O
offices	O
.	O
</s>
<s>
One-time	B-Algorithm
pads	I-Algorithm
for	O
use	O
with	O
its	O
overseas	O
agents	O
were	O
introduced	O
late	O
in	O
the	O
war	O
.	O
</s>
<s>
A	O
few	O
British	O
one-time	B-Algorithm
tape	I-Algorithm
cipher	B-Application
machines	O
include	O
the	O
Rockex	B-General_Concept
and	O
Noreen	B-General_Concept
.	O
</s>
<s>
The	O
World	O
War	O
II	O
voice	O
scrambler	O
SIGSALY	O
was	O
also	O
a	O
form	O
of	O
one-time	B-Algorithm
system	I-Algorithm
.	O
</s>
<s>
The	O
hotline	O
between	O
Moscow	O
and	O
Washington	O
D.C.	O
,	O
established	O
in	O
1963	O
after	O
the	O
1962	O
Cuban	O
Missile	O
Crisis	O
,	O
used	O
teleprinters	O
protected	O
by	O
a	O
commercial	O
one-time	B-Algorithm
tape	I-Algorithm
system	O
.	O
</s>
<s>
U.S.	O
Army	O
Special	O
Forces	O
used	O
one-time	B-Algorithm
pads	I-Algorithm
in	O
Vietnam	O
.	O
</s>
<s>
By	O
using	O
Morse	O
code	O
with	O
one-time	B-Algorithm
pads	I-Algorithm
and	O
continuous	O
wave	O
radio	O
transmission	O
(	O
the	O
carrier	O
for	O
Morse	O
code	O
)	O
,	O
they	O
achieved	O
both	O
secrecy	O
and	O
reliable	O
communications	O
.	O
</s>
<s>
Starting	O
in	O
1988	O
,	O
the	O
African	O
National	O
Congress	O
(	O
ANC	O
)	O
used	O
disk-based	O
one-time	B-Algorithm
pads	I-Algorithm
as	O
part	O
of	O
a	O
secure	O
communication	O
system	O
between	O
ANC	O
leaders	O
outside	O
South	O
Africa	O
and	O
in-country	O
operatives	O
as	O
part	O
of	O
Operation	O
Vula	O
,	O
a	O
successful	O
effort	O
to	O
build	O
a	O
resistance	O
network	O
inside	O
South	O
Africa	O
.	O
</s>
<s>
A	O
Belgian	O
airline	O
stewardess	O
acted	O
as	O
courier	B-Protocol
to	O
bring	O
in	O
the	O
pad	O
disks	O
.	O
</s>
<s>
Later	O
Vula	O
added	O
a	O
stream	B-Algorithm
cipher	I-Algorithm
keyed	O
by	O
book	O
codes	O
to	O
solve	O
this	O
problem	O
.	O
</s>
<s>
However	O
,	O
such	O
strategies	O
(	O
though	O
often	O
used	O
by	O
real	O
operatives	O
,	O
and	O
baseball	B-Application
coaches	O
)	O
are	O
not	O
a	O
cryptographic	O
one-time	B-Algorithm
pad	I-Algorithm
in	O
any	O
significant	O
sense	O
.	O
</s>
<s>
At	O
least	O
into	O
the	O
1970s	O
,	O
the	O
U.S.	O
National	O
Security	O
Agency	O
(	O
NSA	O
)	O
produced	O
a	O
variety	O
of	O
manual	O
one-time	B-Algorithm
pads	I-Algorithm
,	O
both	O
general	O
purpose	O
and	O
specialized	O
,	O
with	O
86,000	O
one-time	B-Algorithm
pads	I-Algorithm
produced	O
in	O
fiscal	O
year	O
1972	O
.	O
</s>
<s>
General	O
purpose	O
pads	O
were	O
produced	O
in	O
several	O
formats	O
,	O
a	O
simple	O
list	O
of	O
random	O
letters	O
(	O
DIANA	O
)	O
or	O
just	O
numbers	O
(	O
CALYPSO	B-Protocol
)	O
,	O
tiny	O
pads	O
for	O
covert	O
agents	O
(	O
MICKEY	O
MOUSE	O
)	O
,	O
and	O
pads	O
designed	O
for	O
more	O
rapid	O
encoding	O
of	O
short	O
messages	O
,	O
at	O
the	O
cost	O
of	O
lower	O
density	O
.	O
</s>
<s>
One	O
example	O
,	O
ORION	O
,	O
had	O
50	O
rows	O
of	O
plaintext	O
alphabets	O
on	O
one	O
side	O
and	O
the	O
corresponding	O
random	O
cipher	B-Application
text	O
letters	O
on	O
the	O
other	O
side	O
.	O
</s>
<s>
(	O
See	O
Commons:Category:NSA	O
one-time	B-Algorithm
pads	I-Algorithm
for	O
illustrations	O
.	O
)	O
</s>
<s>
The	O
NSA	O
also	O
built	O
automated	O
systems	O
for	O
the	O
"	O
centralized	O
headquarters	O
of	O
CIA	O
and	O
Special	O
Forces	O
units	O
so	O
that	O
they	O
can	O
efficiently	O
process	O
the	O
many	O
separate	O
one-time	B-Algorithm
pad	I-Algorithm
messages	O
to	O
and	O
from	O
individual	O
pad	O
holders	O
in	O
the	O
field	O
"	O
.	O
</s>
<s>
During	O
World	O
War	O
II	O
and	O
into	O
the	O
1950s	O
,	O
the	O
U.S.	O
made	O
extensive	O
use	O
of	O
one-time	B-Algorithm
tape	I-Algorithm
systems	O
.	O
</s>
<s>
In	O
addition	O
to	O
providing	O
confidentiality	O
,	O
circuits	O
secured	O
by	O
one-time	B-Algorithm
tape	I-Algorithm
ran	O
continually	O
,	O
even	O
when	O
there	O
was	O
no	O
traffic	O
,	O
thus	O
protecting	O
against	O
traffic	O
analysis	O
.	O
</s>
<s>
By	O
1972	O
,	O
only	O
55,000	O
rolls	O
were	O
produced	O
,	O
as	O
one-time	B-Algorithm
tapes	I-Algorithm
were	O
replaced	O
by	O
rotor	O
machines	O
such	O
as	O
SIGTOT	O
,	O
and	O
later	O
by	O
electronic	O
devices	O
based	O
on	O
shift	B-General_Concept
registers	I-General_Concept
.	O
</s>
<s>
The	O
NSA	O
describes	O
one-time	B-Algorithm
tape	I-Algorithm
systems	O
like	O
5-UCO	O
and	O
SIGTOT	O
as	O
being	O
used	O
for	O
intelligence	O
traffic	O
until	O
the	O
introduction	O
of	O
the	O
electronic	O
cipher	B-Application
based	O
KW-26	O
in	O
1957	O
.	O
</s>
<s>
While	O
one-time	B-Algorithm
pads	I-Algorithm
provide	O
perfect	B-Algorithm
secrecy	I-Algorithm
if	O
generated	O
and	O
used	O
properly	O
,	O
small	O
mistakes	O
can	O
lead	O
to	O
successful	O
cryptanalysis	O
:	O
</s>
<s>
In	O
1944	O
–	O
1945	O
,	O
the	O
U.S.	O
Army	O
's	O
Signals	O
Intelligence	O
Service	O
was	O
able	O
to	O
solve	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
system	O
used	O
by	O
the	O
German	O
Foreign	O
Office	O
for	O
its	O
high-level	O
traffic	O
,	O
codenamed	O
GEE	O
.	O
</s>
<s>
In	O
1945	O
,	O
the	O
US	O
discovered	O
that	O
Canberra	O
–	O
Moscow	O
messages	O
were	O
being	O
encrypted	O
first	O
using	O
a	O
code-book	O
and	O
then	O
using	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
.	O
</s>
<s>
However	O
,	O
the	O
one-time	B-Algorithm
pad	I-Algorithm
used	O
was	O
the	O
same	O
one	O
used	O
by	O
Moscow	O
for	O
Washington	O
,	O
D.C.	O
–	O
Moscow	O
messages	O
.	O
</s>
<s>
One-time	B-Algorithm
pads	I-Algorithm
were	O
employed	O
by	O
Soviet	O
espionage	O
agencies	O
for	O
covert	O
communications	O
with	O
agents	O
and	O
agent	O
controllers	O
.	O
</s>
<s>
Beginning	O
in	O
the	O
late	O
1940s	O
,	O
US	O
and	O
UK	O
intelligence	O
agencies	O
were	O
able	O
to	O
break	O
some	O
of	O
the	O
Soviet	O
one-time	B-Algorithm
pad	I-Algorithm
traffic	O
to	O
Moscow	O
during	O
WWII	O
as	O
a	O
result	O
of	O
errors	O
made	O
in	O
generating	O
and	O
distributing	O
the	O
key	O
material	O
.	O
</s>
<s>
The	O
one-time	B-Algorithm
tape	I-Algorithm
systems	O
used	O
by	O
the	O
U.S.	O
employed	O
electromechanical	O
mixers	O
to	O
combine	O
bits	O
from	O
the	O
message	O
and	O
the	O
one-time	B-Algorithm
tape	I-Algorithm
.	O
</s>
