<s>
In	O
cryptography	O
,	O
the	O
simple	B-Algorithm
XOR	I-Algorithm
cipher	I-Algorithm
is	O
a	O
type	O
of	O
additive	B-Algorithm
cipher	I-Algorithm
,	O
an	O
encryption	O
algorithm	O
that	O
operates	O
according	O
to	O
the	O
principles	O
:	O
</s>
<s>
To	O
decrypt	O
the	O
output	O
,	O
merely	O
reapplying	O
the	O
XOR	O
function	O
with	O
the	O
key	O
will	O
remove	O
the	O
cipher	B-Application
.	O
</s>
<s>
The	O
string	O
"	O
Wiki	O
"	O
(	O
in	O
8-bit	O
ASCII	B-Protocol
)	O
can	O
be	O
encrypted	O
with	O
the	O
repeating	O
key	O
as	O
follows	O
:	O
</s>
<s>
The	O
XOR	O
operator	O
is	O
extremely	O
common	O
as	O
a	O
component	O
in	O
more	O
complex	O
ciphers	B-Application
.	O
</s>
<s>
By	O
itself	O
,	O
using	O
a	O
constant	O
repeating	O
key	O
,	O
a	O
simple	B-Algorithm
XOR	I-Algorithm
cipher	I-Algorithm
can	O
trivially	O
be	O
broken	O
using	O
frequency	O
analysis	O
.	O
</s>
<s>
using	O
the	O
same	O
key	O
for	O
xor	O
operation	O
on	O
the	O
whole	O
data	O
)	O
cipher	B-Application
is	O
therefore	O
sometimes	O
used	O
for	O
hiding	O
information	O
in	O
cases	O
where	O
no	O
particular	O
security	O
is	O
required	O
.	O
</s>
<s>
The	O
XOR	B-Algorithm
cipher	I-Algorithm
is	O
often	O
used	O
in	O
computer	O
malware	O
to	O
make	O
reverse	O
engineering	O
more	O
difficult	O
.	O
</s>
<s>
If	O
the	O
key	O
is	O
random	O
and	O
is	O
at	O
least	O
as	O
long	O
as	O
the	O
message	O
,	O
the	O
XOR	B-Algorithm
cipher	I-Algorithm
is	O
much	O
more	O
secure	O
than	O
when	O
there	O
is	O
key	O
repetition	O
within	O
a	O
message	O
.	O
</s>
<s>
When	O
the	O
keystream	O
is	O
generated	O
by	O
a	O
pseudo-random	B-Algorithm
number	I-Algorithm
generator	I-Algorithm
,	O
the	O
result	O
is	O
a	O
stream	B-Algorithm
cipher	I-Algorithm
.	O
</s>
<s>
With	O
a	O
key	O
that	O
is	O
truly	O
random	O
,	O
the	O
result	O
is	O
a	O
one-time	B-Algorithm
pad	I-Algorithm
,	O
which	O
is	O
unbreakable	B-Algorithm
in	I-Algorithm
theory	I-Algorithm
.	O
</s>
<s>
The	O
XOR	O
operator	O
in	O
any	O
of	O
these	O
ciphers	B-Application
is	O
vulnerable	O
to	O
a	O
known-plaintext	O
attack	O
,	O
since	O
plaintext	O
ciphertext	O
=	O
key	O
.	O
</s>
<s>
Example	O
using	O
the	O
Python	B-Language
programming	I-Language
language	I-Language
.	O
</s>
