<s>
In	O
cryptography	O
,	O
an	O
initialization	B-Algorithm
vector	I-Algorithm
(	O
IV	O
)	O
or	O
starting	B-Algorithm
variable	I-Algorithm
(	O
SV	O
)	O
is	O
an	O
input	O
to	O
a	O
cryptographic	O
primitive	O
being	O
used	O
to	O
provide	O
the	O
initial	O
state	O
.	O
</s>
<s>
The	O
IV	O
is	O
typically	O
required	O
to	O
be	O
random	O
or	O
pseudorandom	B-Error_Name
,	O
but	O
sometimes	O
an	O
IV	O
only	O
needs	O
to	O
be	O
unpredictable	O
or	O
unique	O
.	O
</s>
<s>
For	O
block	O
ciphers	O
,	O
the	O
use	O
of	O
an	O
IV	O
is	O
described	O
by	O
the	O
modes	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
.	O
</s>
<s>
An	O
example	O
of	O
stateful	O
encryption	O
schemes	O
is	O
the	O
counter	O
mode	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
,	O
which	O
has	O
a	O
sequence	B-Protocol
number	I-Protocol
for	O
a	O
nonce	O
.	O
</s>
<s>
Traditional	O
stream	B-Algorithm
ciphers	I-Algorithm
such	O
as	O
RC4	B-Algorithm
do	O
not	O
support	O
an	O
explicit	O
IV	O
as	O
input	O
,	O
and	O
a	O
custom	O
solution	O
for	O
incorporating	O
an	O
IV	O
into	O
the	O
cipher	O
's	O
key	O
or	O
internal	O
state	O
is	O
needed	O
.	O
</s>
<s>
Some	O
designs	O
realized	O
in	O
practice	O
are	O
known	O
to	O
be	O
insecure	O
;	O
the	O
WEP	B-Protocol
protocol	O
is	O
a	O
notable	O
example	O
,	O
and	O
is	O
prone	O
to	O
related-IV	O
attacks	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
single	O
invocation	O
of	O
the	O
AES	B-Algorithm
algorithm	O
transforms	O
a	O
128-bit	O
plaintext	O
block	O
into	O
a	O
ciphertext	O
block	O
of	O
128	O
bits	O
in	O
size	O
.	O
</s>
<s>
In	O
1980	O
,	O
the	O
NIST	O
published	O
a	O
national	O
standard	O
document	O
designated	O
Federal	O
Information	O
Processing	O
Standard	O
(	O
FIPS	O
)	O
PUB	O
81	O
,	O
which	O
specified	O
four	O
so-called	O
block	B-Algorithm
cipher	I-Algorithm
modes	I-Algorithm
of	I-Algorithm
operation	I-Algorithm
,	O
each	O
describing	O
a	O
different	O
solution	O
for	O
encrypting	O
a	O
set	O
of	O
input	O
blocks	O
.	O
</s>
<s>
To	O
initiate	O
this	O
process	O
,	O
an	O
additional	O
input	O
value	O
is	O
required	O
to	O
be	O
mixed	O
with	O
the	O
first	O
block	O
,	O
and	O
which	O
is	O
referred	O
to	O
as	O
an	O
initialization	B-Algorithm
vector	I-Algorithm
.	O
</s>
<s>
In	O
stream	B-Algorithm
cipher	I-Algorithm
encryption	O
uniqueness	O
is	O
crucially	O
important	O
as	O
plaintext	O
may	O
be	O
trivially	O
recovered	O
otherwise	O
.	O
</s>
<s>
Example	O
:	O
Stream	B-Algorithm
ciphers	I-Algorithm
encrypt	O
plaintext	O
P	O
to	O
ciphertext	O
C	O
by	O
deriving	O
a	O
key	O
stream	O
K	O
from	O
a	O
given	O
key	O
and	O
IV	O
and	O
computing	O
C	O
as	O
C	O
=	O
P	O
xor	O
K	O
.	O
Assume	O
that	O
an	O
attacker	O
has	O
observed	O
two	O
messages	O
C1	O
and	O
C2	O
both	O
encrypted	O
with	O
the	O
same	O
key	O
and	O
IV	O
.	O
</s>
<s>
Many	O
schemes	O
require	O
the	O
IV	O
to	O
be	O
unpredictable	O
by	O
an	O
adversary	B-General_Concept
.	O
</s>
<s>
Consider	O
further	O
that	O
there	O
is	O
an	O
adversary	B-General_Concept
called	O
Eve	O
that	O
can	O
observe	O
these	O
encryptions	O
and	O
is	O
able	O
to	O
forward	O
plaintext	O
messages	O
to	O
Alice	O
for	O
encryption	O
(	O
in	O
other	O
words	O
,	O
Eve	O
is	O
capable	O
of	O
a	O
chosen-plaintext	O
attack	O
)	O
.	O
</s>
<s>
Now	O
assume	O
that	O
Alice	O
has	O
sent	O
a	O
message	O
consisting	O
of	O
an	O
initialization	B-Algorithm
vector	I-Algorithm
IV1	O
and	O
starting	O
with	O
a	O
ciphertext	O
block	O
CAlice	O
.	O
</s>
<s>
Now	O
,	O
if	O
Eve	O
can	O
determine	O
the	O
initialization	B-Algorithm
vector	I-Algorithm
IV2	O
of	O
the	O
next	O
message	O
she	O
will	O
be	O
able	O
to	O
test	O
her	O
guess	O
by	O
forwarding	O
a	O
plaintext	O
message	O
to	O
Alice	O
starting	O
with	O
(	O
IV2	O
xor	O
IV1	O
xor	O
PEve	O
)	O
;	O
if	O
her	O
guess	O
was	O
correct	O
this	O
plaintext	O
block	O
will	O
get	O
encrypted	O
to	O
CAlice	O
by	O
Alice	O
.	O
</s>
<s>
Block	O
cipher	O
processing	O
of	O
data	O
is	O
usually	O
described	O
as	O
a	O
mode	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
.	O
</s>
<s>
Modes	O
are	O
primarily	O
defined	O
for	O
encryption	O
as	O
well	O
as	O
authentication	O
,	O
though	O
newer	O
designs	O
exist	O
that	O
combine	O
both	O
security	O
solutions	O
in	O
so-called	O
authenticated	B-Algorithm
encryption	I-Algorithm
modes	O
.	O
</s>
<s>
While	O
encryption	O
and	O
authenticated	B-Algorithm
encryption	I-Algorithm
modes	O
usually	O
take	O
an	O
IV	O
matching	O
the	O
cipher	O
's	O
block	O
size	O
,	O
authentication	O
modes	O
are	O
commonly	O
realized	O
as	O
deterministic	B-General_Concept
algorithms	I-General_Concept
,	O
and	O
the	O
IV	O
is	O
set	O
to	O
zero	O
or	O
some	O
other	O
fixed	O
value	O
.	O
</s>
<s>
In	O
stream	B-Algorithm
ciphers	I-Algorithm
,	O
IVs	O
are	O
loaded	O
into	O
the	O
keyed	O
internal	O
secret	O
state	O
of	O
the	O
cipher	O
,	O
after	O
which	O
a	O
number	O
of	O
cipher	O
rounds	O
are	O
executed	O
prior	O
to	O
releasing	O
the	O
first	O
bit	O
of	O
output	O
.	O
</s>
<s>
For	O
performance	O
reasons	O
,	O
designers	O
of	O
stream	B-Algorithm
ciphers	I-Algorithm
try	O
to	O
keep	O
that	O
number	O
of	O
rounds	O
as	O
small	O
as	O
possible	O
,	O
but	O
because	O
determining	O
the	O
minimal	O
secure	O
number	O
of	O
rounds	O
for	O
stream	B-Algorithm
ciphers	I-Algorithm
is	O
not	O
a	O
trivial	O
task	O
,	O
and	O
considering	O
other	O
issues	O
such	O
as	O
entropy	O
loss	O
,	O
unique	O
to	O
each	O
cipher	O
construction	O
,	O
related-IVs	O
and	O
other	O
IV-related	O
attacks	O
are	O
a	O
known	O
security	O
issue	O
for	O
stream	B-Algorithm
ciphers	I-Algorithm
,	O
which	O
makes	O
IV	O
loading	O
in	O
stream	B-Algorithm
ciphers	I-Algorithm
a	O
serious	O
concern	O
and	O
a	O
subject	O
of	O
ongoing	O
research	O
.	O
</s>
<s>
The	O
802.11	O
encryption	O
algorithm	O
called	O
WEP	B-Protocol
(	O
short	O
for	O
Wired	B-Protocol
Equivalent	I-Protocol
Privacy	I-Protocol
)	O
used	O
a	O
short	O
,	O
24-bit	O
IV	O
,	O
leading	O
to	O
reused	O
IVs	O
with	O
the	O
same	O
key	O
,	O
which	O
led	O
to	O
it	O
being	O
easily	O
cracked	O
.	O
</s>
<s>
Packet	B-Protocol
injection	I-Protocol
allowed	O
for	O
WEP	B-Protocol
to	O
be	O
cracked	O
in	O
times	O
as	O
short	O
as	O
several	O
seconds	O
.	O
</s>
<s>
This	O
ultimately	O
led	O
to	O
the	O
deprecation	O
of	O
WEP	B-Protocol
.	O
</s>
