<s>
In	O
cryptography	O
,	O
a	O
block	B-Algorithm
cipher	I-Algorithm
mode	I-Algorithm
of	I-Algorithm
operation	I-Algorithm
is	O
an	O
algorithm	O
that	O
uses	O
a	O
block	B-General_Concept
cipher	O
to	O
provide	O
information	O
security	O
such	O
as	O
confidentiality	O
or	O
authenticity	O
.	O
</s>
<s>
A	O
block	B-General_Concept
cipher	O
by	O
itself	O
is	O
only	O
suitable	O
for	O
the	O
secure	O
cryptographic	O
transformation	O
(	O
encryption	O
or	O
decryption	O
)	O
of	O
one	O
fixed-length	O
group	O
of	O
bits	O
called	O
a	O
block	B-General_Concept
.	O
</s>
<s>
A	O
mode	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
describes	O
how	O
to	O
repeatedly	O
apply	O
a	O
cipher	O
's	O
single-block	O
operation	O
to	O
securely	O
transform	O
amounts	O
of	O
data	O
larger	O
than	O
a	O
block	B-General_Concept
.	O
</s>
<s>
Most	O
modes	O
require	O
a	O
unique	O
binary	O
sequence	O
,	O
often	O
called	O
an	O
initialization	B-Algorithm
vector	I-Algorithm
(	O
IV	O
)	O
,	O
for	O
each	O
encryption	O
operation	O
.	O
</s>
<s>
The	O
initialization	B-Algorithm
vector	I-Algorithm
is	O
used	O
to	O
ensure	O
distinct	O
ciphertexts	O
are	O
produced	O
even	O
when	O
the	O
same	O
plaintext	O
is	O
encrypted	O
multiple	O
times	O
independently	O
with	O
the	O
same	O
key	O
.	O
</s>
<s>
Block	B-General_Concept
ciphers	O
may	O
be	O
capable	O
of	O
operating	O
on	O
more	O
than	O
one	O
block	B-General_Concept
size	I-General_Concept
,	O
but	O
during	O
transformation	O
the	O
block	B-General_Concept
size	I-General_Concept
is	O
always	O
fixed	O
.	O
</s>
<s>
Block	B-Algorithm
cipher	I-Algorithm
modes	I-Algorithm
operate	O
on	O
whole	O
blocks	O
and	O
require	O
that	O
the	O
last	O
part	O
of	O
the	O
data	O
be	O
padded	B-Algorithm
to	O
a	O
full	O
block	B-General_Concept
if	O
it	O
is	O
smaller	O
than	O
the	O
current	O
block	B-General_Concept
size	I-General_Concept
.	O
</s>
<s>
There	O
are	O
,	O
however	O
,	O
modes	O
that	O
do	O
not	O
require	O
padding	B-Algorithm
because	O
they	O
effectively	O
use	O
a	O
block	B-General_Concept
cipher	O
as	O
a	O
stream	B-Algorithm
cipher	I-Algorithm
.	O
</s>
<s>
Historically	O
,	O
encryption	B-Algorithm
modes	I-Algorithm
have	O
been	O
studied	O
extensively	O
in	O
regard	O
to	O
their	O
error	O
propagation	O
properties	O
under	O
various	O
scenarios	O
of	O
data	O
modification	O
.	O
</s>
<s>
Some	O
modern	O
modes	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
combine	O
confidentiality	O
and	O
authenticity	O
in	O
an	O
efficient	O
way	O
,	O
and	O
are	O
known	O
as	O
authenticated	B-Algorithm
encryption	I-Algorithm
modes	O
.	O
</s>
<s>
The	O
earliest	O
modes	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
,	O
ECB	O
,	O
CBC	O
,	O
OFB	O
,	O
and	O
CFB	O
(	O
see	O
below	O
for	O
all	O
)	O
,	O
date	O
back	O
to	O
1981	O
and	O
were	O
specified	O
in	O
,	O
DES	B-Algorithm
Modes	B-Algorithm
of	I-Algorithm
Operation	I-Algorithm
.	O
</s>
<s>
In	O
2001	O
,	O
the	O
US	O
National	O
Institute	O
of	O
Standards	O
and	O
Technology	O
(	O
NIST	O
)	O
revised	O
its	O
list	O
of	O
approved	O
modes	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
by	O
including	O
AES	B-Algorithm
as	O
a	O
block	B-General_Concept
cipher	O
and	O
adding	O
CTR	O
mode	O
in	O
,	O
Recommendation	O
for	O
Block	B-Algorithm
Cipher	I-Algorithm
Modes	I-Algorithm
of	I-Algorithm
Operation	I-Algorithm
.	O
</s>
<s>
Finally	O
,	O
in	O
January	O
,	O
2010	O
,	O
NIST	O
added	O
XTS-AES	O
in	O
,	O
Recommendation	O
for	O
Block	B-Algorithm
Cipher	I-Algorithm
Modes	I-Algorithm
of	I-Algorithm
Operation	I-Algorithm
:	O
The	O
XTS-AES	O
Mode	O
for	O
Confidentiality	O
on	O
Storage	O
Devices	O
.	O
</s>
<s>
For	O
example	O
,	O
CTS	O
is	O
ciphertext	B-Algorithm
stealing	I-Algorithm
mode	O
and	O
available	O
in	O
many	O
popular	O
cryptographic	O
libraries	O
.	O
</s>
<s>
The	O
block	B-Algorithm
cipher	I-Algorithm
modes	I-Algorithm
ECB	O
,	O
CBC	O
,	O
OFB	O
,	O
CFB	O
,	O
CTR	O
,	O
and	O
XTS	O
provide	O
confidentiality	O
,	O
but	O
they	O
do	O
not	O
protect	O
against	O
accidental	O
modification	O
or	O
malicious	O
tampering	O
.	O
</s>
<s>
Modification	O
or	O
tampering	O
can	O
be	O
detected	O
with	O
a	O
separate	O
message	B-Algorithm
authentication	I-Algorithm
code	I-Algorithm
such	O
as	O
CBC-MAC	B-Algorithm
,	O
or	O
a	O
digital	O
signature	O
.	O
</s>
<s>
The	O
cryptographic	O
community	O
recognized	O
the	O
need	O
for	O
dedicated	O
integrity	O
assurances	O
and	O
NIST	O
responded	O
with	O
HMAC	B-Algorithm
,	O
CMAC	B-Algorithm
,	O
and	O
GMAC	B-Algorithm
.	O
</s>
<s>
HMAC	B-Algorithm
was	O
approved	O
in	O
2002	O
as	O
,	O
The	O
Keyed-Hash	B-Algorithm
Message	I-Algorithm
Authentication	I-Algorithm
Code	I-Algorithm
(	O
HMAC	B-Algorithm
)	O
,	O
CMAC	B-Algorithm
was	O
released	O
in	O
2005	O
under	O
,	O
Recommendation	O
for	O
Block	B-Algorithm
Cipher	I-Algorithm
Modes	I-Algorithm
of	I-Algorithm
Operation	I-Algorithm
:	O
The	O
CMAC	B-Algorithm
Mode	O
for	O
Authentication	O
,	O
and	O
GMAC	B-Algorithm
was	O
formalized	O
in	O
2007	O
under	O
,	O
Recommendation	O
for	O
Block	B-Algorithm
Cipher	I-Algorithm
Modes	I-Algorithm
of	I-Algorithm
Operation	I-Algorithm
:	O
Galois/Counter	B-Algorithm
Mode	I-Algorithm
(	O
GCM	B-Algorithm
)	O
and	O
GMAC	B-Algorithm
.	O
</s>
<s>
These	O
combined	O
modes	O
are	O
referred	O
to	O
as	O
authenticated	B-Algorithm
encryption	I-Algorithm
,	O
AE	O
or	O
"	O
authenc	O
"	O
.	O
</s>
<s>
Examples	O
of	O
AE	O
modes	O
are	O
CCM	B-Algorithm
(	O
)	O
,	O
GCM	B-Algorithm
(	O
)	O
,	O
CWC	B-Algorithm
,	O
EAX	B-Algorithm
,	O
IAPM	B-Algorithm
,	O
and	O
OCB	B-Algorithm
.	O
</s>
<s>
Modes	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
are	O
defined	O
by	O
a	O
number	O
of	O
national	O
and	O
internationally	O
recognized	O
standards	O
bodies	O
.	O
</s>
<s>
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
a	O
block	B-General_Concept
of	O
bits	O
that	O
is	O
used	O
by	O
several	O
modes	O
to	O
randomize	O
the	O
encryption	O
and	O
hence	O
to	O
produce	O
distinct	O
ciphertexts	O
even	O
if	O
the	O
same	O
plaintext	O
is	O
encrypted	O
multiple	O
times	O
,	O
without	O
the	O
need	O
for	O
a	O
slower	O
re-keying	O
process	O
.	O
</s>
<s>
An	O
initialization	B-Algorithm
vector	I-Algorithm
has	O
different	O
security	O
requirements	O
than	O
a	O
key	O
,	O
so	O
the	O
IV	O
usually	O
does	O
not	O
need	O
to	O
be	O
secret	O
.	O
</s>
<s>
For	O
most	O
block	B-Algorithm
cipher	I-Algorithm
modes	I-Algorithm
it	O
is	O
important	O
that	O
an	O
initialization	B-Algorithm
vector	I-Algorithm
is	O
never	O
reused	O
under	O
the	O
same	O
key	O
,	O
i.e.	O
</s>
<s>
Many	O
block	B-Algorithm
cipher	I-Algorithm
modes	I-Algorithm
have	O
stronger	O
requirements	O
,	O
such	O
as	O
the	O
IV	O
must	O
be	O
random	O
or	O
pseudorandom	B-Error_Name
.	O
</s>
<s>
Some	O
block	B-General_Concept
ciphers	O
have	O
particular	O
problems	O
with	O
certain	O
initialization	B-Algorithm
vectors	I-Algorithm
,	O
such	O
as	O
all	O
zero	O
IV	O
generating	O
no	O
encryption	O
(	O
for	O
some	O
keys	O
)	O
.	O
</s>
<s>
It	O
is	O
recommended	O
to	O
review	O
relevant	O
IV	O
requirements	O
for	O
the	O
particular	O
block	B-Algorithm
cipher	I-Algorithm
mode	I-Algorithm
in	O
relevant	O
specification	O
,	O
for	O
example	O
.	O
</s>
<s>
For	O
CBC	O
and	O
CFB	O
,	O
reusing	O
an	O
IV	O
leaks	O
some	O
information	O
about	O
the	O
first	O
block	B-General_Concept
of	O
plaintext	O
,	O
and	O
about	O
any	O
common	O
prefix	O
shared	O
by	O
the	O
two	O
messages	O
.	O
</s>
<s>
In	O
CBC	O
mode	O
,	O
the	O
IV	O
must	O
be	O
unpredictable	O
(	O
random	O
or	O
pseudorandom	B-Error_Name
)	O
at	O
encryption	O
time	O
;	O
in	O
particular	O
,	O
the	O
(	O
previously	O
)	O
common	O
practice	O
of	O
re-using	O
the	O
last	O
ciphertext	O
block	B-General_Concept
of	O
a	O
message	O
as	O
the	O
IV	O
for	O
the	O
next	O
message	O
is	O
insecure	O
(	O
for	O
example	O
,	O
this	O
method	O
was	O
used	O
by	O
SSL	O
2.0	O
)	O
.	O
</s>
<s>
If	O
an	O
attacker	O
knows	O
the	O
IV	O
(	O
or	O
the	O
previous	O
block	B-General_Concept
of	O
ciphertext	O
)	O
before	O
the	O
next	O
plaintext	O
is	O
specified	O
,	O
they	O
can	O
check	O
their	O
guess	O
about	O
plaintext	O
of	O
some	O
block	B-General_Concept
that	O
was	O
encrypted	O
with	O
the	O
same	O
key	O
before	O
(	O
this	O
is	O
known	O
as	O
the	O
TLS	O
CBC	O
IV	O
attack	O
)	O
.	O
</s>
<s>
For	O
some	O
keys	O
,	O
an	O
all-zero	O
initialization	B-Algorithm
vector	I-Algorithm
may	O
generate	O
some	O
block	B-Algorithm
cipher	I-Algorithm
modes	I-Algorithm
(	O
CFB-8	O
,	O
OFB-8	O
)	O
to	O
get	O
the	O
internal	O
state	O
stuck	O
at	O
all-zero	O
.	O
</s>
<s>
For	O
OFB-8	O
,	O
using	O
all	O
zero	O
initialization	B-Algorithm
vector	I-Algorithm
will	O
generate	O
no	O
encryption	O
for	O
1/256	O
of	O
keys	O
.	O
</s>
<s>
Some	O
modes	O
(	O
such	O
as	O
AES-SIV	O
and	O
AES-GCM-SIV	B-Algorithm
)	O
are	O
built	O
to	O
be	O
more	O
nonce-misuse	O
resistant	O
,	O
i.e.	O
</s>
<s>
Synthetic	O
initialization	B-Algorithm
vectors	I-Algorithm
(	O
SIV	O
)	O
synthesize	O
an	O
internal	O
IV	O
by	O
running	O
a	O
pseudo-random	B-Error_Name
function	O
(	O
PRF	O
)	O
construction	O
called	O
S2V	O
on	O
the	O
input	O
(	O
additional	O
data	O
and	O
plaintext	O
)	O
,	O
preventing	O
any	O
external	O
data	O
from	O
directly	O
controlling	O
the	O
IV	O
.	O
</s>
<s>
AES-GCM-SIVs	B-Algorithm
synthesize	O
an	O
internal	O
IV	O
by	O
running	O
POLYVAL	O
Galois	O
mode	O
of	O
authentication	O
on	O
input	O
(	O
additional	O
data	O
and	O
plaintext	O
)	O
,	O
followed	O
by	O
an	O
AES	B-Algorithm
operation	O
.	O
</s>
<s>
A	O
block	B-General_Concept
cipher	O
works	O
on	O
units	O
of	O
a	O
fixed	O
size	O
(	O
known	O
as	O
a	O
block	B-General_Concept
size	I-General_Concept
)	O
,	O
but	O
messages	O
come	O
in	O
a	O
variety	O
of	O
lengths	O
.	O
</s>
<s>
So	O
some	O
modes	O
(	O
namely	O
ECB	O
and	O
CBC	O
)	O
require	O
that	O
the	O
final	O
block	B-General_Concept
be	O
padded	B-Algorithm
before	O
encryption	O
.	O
</s>
<s>
Several	O
padding	B-Algorithm
schemes	O
exist	O
.	O
</s>
<s>
The	O
simplest	O
is	O
to	O
add	O
null	O
bytes	O
to	O
the	O
plaintext	O
to	O
bring	O
its	O
length	O
up	O
to	O
a	O
multiple	O
of	O
the	O
block	B-General_Concept
size	I-General_Concept
,	O
but	O
care	O
must	O
be	O
taken	O
that	O
the	O
original	O
length	O
of	O
the	O
plaintext	O
can	O
be	O
recovered	O
;	O
this	O
is	O
trivial	O
,	O
for	O
example	O
,	O
if	O
the	O
plaintext	O
is	O
a	O
C	B-Language
style	O
string	B-Language
which	O
contains	O
no	O
null	O
bytes	O
except	O
at	O
the	O
end	O
.	O
</s>
<s>
Slightly	O
more	O
complex	O
is	O
the	O
original	O
DES	B-Algorithm
method	O
,	O
which	O
is	O
to	O
add	O
a	O
single	O
one	O
bit	O
,	O
followed	O
by	O
enough	O
zero	O
bits	O
to	O
fill	O
out	O
the	O
block	B-General_Concept
;	O
if	O
the	O
message	O
ends	O
on	O
a	O
block	B-General_Concept
boundary	O
,	O
a	O
whole	O
padding	B-Algorithm
block	B-General_Concept
will	O
be	O
added	O
.	O
</s>
<s>
Most	O
sophisticated	O
are	O
CBC-specific	O
schemes	O
such	O
as	O
ciphertext	B-Algorithm
stealing	I-Algorithm
or	O
residual	B-Algorithm
block	I-Algorithm
termination	I-Algorithm
,	O
which	O
do	O
not	O
cause	O
any	O
extra	O
ciphertext	O
,	O
at	O
the	O
expense	O
of	O
some	O
additional	O
complexity	O
.	O
</s>
<s>
Schneier	O
and	O
Ferguson	O
suggest	O
two	O
possibilities	O
,	O
both	O
simple	O
:	O
append	O
a	O
byte	O
with	O
value	O
128	O
(	O
hex	O
80	O
)	O
,	O
followed	O
by	O
as	O
many	O
zero	O
bytes	O
as	O
needed	O
to	O
fill	O
the	O
last	O
block	B-General_Concept
,	O
or	O
pad	O
the	O
last	O
block	B-General_Concept
with	O
n	O
bytes	O
all	O
with	O
value	O
n	O
.	O
</s>
<s>
CFB	O
,	O
OFB	O
and	O
CTR	O
modes	O
do	O
not	O
require	O
any	O
special	O
measures	O
to	O
handle	O
messages	O
whose	O
lengths	O
are	O
not	O
multiples	O
of	O
the	O
block	B-General_Concept
size	I-General_Concept
,	O
since	O
the	O
modes	O
work	O
by	O
XORing	O
the	O
plaintext	O
with	O
the	O
output	O
of	O
the	O
block	B-General_Concept
cipher	O
.	O
</s>
<s>
The	O
last	O
partial	O
block	B-General_Concept
of	O
plaintext	O
is	O
XORed	O
with	O
the	O
first	O
few	O
bytes	O
of	O
the	O
last	O
keystream	B-Algorithm
block	B-General_Concept
,	O
producing	O
a	O
final	O
ciphertext	O
block	B-General_Concept
that	O
is	O
the	O
same	O
size	O
as	O
the	O
final	O
partial	O
plaintext	O
block	B-General_Concept
.	O
</s>
<s>
This	O
characteristic	O
of	O
stream	B-Algorithm
ciphers	I-Algorithm
makes	O
them	O
suitable	O
for	O
applications	O
that	O
require	O
the	O
encrypted	O
ciphertext	O
data	O
to	O
be	O
the	O
same	O
size	O
as	O
the	O
original	O
plaintext	O
data	O
,	O
and	O
for	O
applications	O
that	O
transmit	O
data	O
in	O
streaming	O
form	O
where	O
it	O
is	O
inconvenient	O
to	O
add	O
padding	B-Algorithm
bytes	O
.	O
</s>
<s>
A	O
number	O
of	O
modes	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
have	O
been	O
designed	O
to	O
combine	O
secrecy	O
and	O
authentication	O
in	O
a	O
single	O
cryptographic	O
primitive	O
.	O
</s>
<s>
Examples	O
of	O
such	O
modes	O
are	O
,	O
,	O
integrity-aware	O
parallelizable	O
mode	O
(	O
IAPM	B-Algorithm
)	O
,	O
OCB	B-Algorithm
,	O
EAX	B-Algorithm
,	O
CWC	B-Algorithm
,	O
CCM	B-Algorithm
,	O
and	O
GCM	B-Algorithm
.	O
</s>
<s>
Authenticated	B-Algorithm
encryption	I-Algorithm
modes	O
are	O
classified	O
as	O
single-pass	O
modes	O
or	O
double-pass	O
modes	O
.	O
</s>
<s>
Some	O
single-pass	O
authenticated	B-Algorithm
encryption	I-Algorithm
algorithms	O
,	O
such	O
as	O
OCB	B-Algorithm
mode	I-Algorithm
,	O
are	O
encumbered	O
by	O
patents	O
,	O
while	O
others	O
were	O
specifically	O
designed	O
and	O
released	O
in	O
a	O
way	O
to	O
avoid	O
such	O
encumberment	O
.	O
</s>
<s>
In	O
addition	O
,	O
some	O
modes	O
also	O
allow	O
for	O
the	O
authentication	O
of	O
unencrypted	O
associated	O
data	O
,	O
and	O
these	O
are	O
called	O
AEAD	O
(	O
authenticated	B-Algorithm
encryption	I-Algorithm
with	O
associated	O
data	O
)	O
schemes	O
.	O
</s>
<s>
For	O
example	O
,	O
EAX	B-Algorithm
mode	I-Algorithm
is	O
a	O
double-pass	O
AEAD	O
scheme	O
while	O
OCB	B-Algorithm
mode	I-Algorithm
is	O
single-pass	O
.	O
</s>
<s>
Galois/counter	B-Algorithm
mode	I-Algorithm
(	O
GCM	B-Algorithm
)	O
combines	O
the	O
well-known	O
counter	O
mode	O
of	O
encryption	O
with	O
the	O
new	O
Galois	O
mode	O
of	O
authentication	O
.	O
</s>
<s>
GCM	B-Algorithm
is	O
defined	O
for	O
block	B-General_Concept
ciphers	O
with	O
a	O
block	B-General_Concept
size	I-General_Concept
of	O
128	O
bits	O
.	O
</s>
<s>
Galois	B-Algorithm
message	I-Algorithm
authentication	I-Algorithm
code	I-Algorithm
(	O
GMAC	B-Algorithm
)	O
is	O
an	O
authentication-only	O
variant	O
of	O
the	O
GCM	B-Algorithm
which	O
can	O
form	O
an	O
incremental	O
message	B-Algorithm
authentication	I-Algorithm
code	I-Algorithm
.	O
</s>
<s>
Both	O
GCM	B-Algorithm
and	O
GMAC	B-Algorithm
can	O
accept	O
initialization	B-Algorithm
vectors	I-Algorithm
of	O
arbitrary	O
length	O
.	O
</s>
<s>
GCM	B-Algorithm
can	O
take	O
full	O
advantage	O
of	O
parallel	O
processing	O
and	O
implementing	O
GCM	B-Algorithm
can	O
make	O
efficient	O
use	O
of	O
an	O
instruction	B-General_Concept
pipeline	I-General_Concept
or	O
a	O
hardware	O
pipeline	O
.	O
</s>
<s>
The	O
CBC	O
mode	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
incurs	O
pipeline	B-General_Concept
stalls	I-General_Concept
that	O
hamper	O
its	O
efficiency	O
and	O
performance	O
.	O
</s>
<s>
Like	O
in	O
CTR	O
,	O
blocks	O
are	O
numbered	O
sequentially	O
,	O
and	O
then	O
this	O
block	B-General_Concept
number	O
is	O
combined	O
with	O
an	O
IV	O
and	O
encrypted	O
with	O
a	O
block	B-General_Concept
cipher	O
,	O
usually	O
AES	B-Algorithm
.	O
</s>
<s>
Like	O
all	O
counter	O
modes	O
,	O
this	O
is	O
essentially	O
a	O
stream	B-Algorithm
cipher	I-Algorithm
,	O
and	O
so	O
it	O
is	O
essential	O
that	O
a	O
different	O
IV	O
is	O
used	O
for	O
each	O
stream	O
that	O
is	O
encrypted	O
.	O
</s>
<s>
Counter	O
with	O
cipher	O
block	B-General_Concept
chaining	O
message	B-Algorithm
authentication	I-Algorithm
code	I-Algorithm
(	O
counter	O
with	O
CBC-MAC	B-Algorithm
;	O
CCM	B-Algorithm
)	O
is	O
an	O
authenticated	B-Algorithm
encryption	I-Algorithm
algorithm	O
designed	O
to	O
provide	O
both	O
authentication	O
and	O
confidentiality	O
.	O
</s>
<s>
CCM	B-Algorithm
mode	I-Algorithm
is	O
only	O
defined	O
for	O
block	B-General_Concept
ciphers	O
with	O
a	O
block	B-General_Concept
length	O
of	O
128	O
bits	O
.	O
</s>
<s>
Synthetic	O
initialization	B-Algorithm
vector	I-Algorithm
(	O
SIV	O
)	O
is	O
a	O
nonce-misuse	O
resistant	O
block	B-Algorithm
cipher	I-Algorithm
mode	I-Algorithm
.	O
</s>
<s>
SIV	O
synthesizes	O
an	O
internal	O
IV	O
using	O
the	O
pseudorandom	B-Error_Name
function	O
S2V	O
.	O
</s>
<s>
S2V	O
is	O
a	O
keyed	O
hash	B-Algorithm
is	O
based	O
on	O
CMAC	B-Algorithm
,	O
and	O
the	O
input	O
to	O
the	O
function	O
is	O
:	O
</s>
<s>
SIV	O
encrypts	O
the	O
S2V	O
output	O
and	O
the	O
plaintext	O
using	O
AES-CTR	O
,	O
keyed	O
with	O
the	O
encryption	O
key	O
(	O
K	O
)	O
.	O
</s>
<s>
SIV	O
can	O
support	O
external	O
nonce-based	O
authenticated	B-Algorithm
encryption	I-Algorithm
,	O
in	O
which	O
case	O
one	O
of	O
the	O
authenticated	O
data	O
fields	O
is	O
utilized	O
for	O
this	O
purpose	O
.	O
</s>
<s>
Owing	O
to	O
the	O
use	O
of	O
two	O
keys	O
,	O
the	O
authentication	O
key	O
K	O
and	O
encryption	O
key	O
K	O
,	O
naming	O
schemes	O
for	O
SIV	O
AEAD-variants	O
may	O
lead	O
to	O
some	O
confusion	O
;	O
for	O
example	O
AEAD_AES_SIV_CMAC_256	O
refers	O
to	O
AES-SIV	O
with	O
two	O
AES-128	B-Algorithm
keys	O
and	O
not	O
AES-256	B-Algorithm
.	O
</s>
<s>
AES-GCM-SIV	B-Algorithm
is	O
a	O
mode	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
for	O
the	O
Advanced	B-Algorithm
Encryption	I-Algorithm
Standard	I-Algorithm
which	O
provides	O
similar	O
performance	O
to	O
Galois/counter	B-Algorithm
mode	I-Algorithm
as	O
well	O
as	O
misuse	O
resistance	O
in	O
the	O
event	O
of	O
the	O
reuse	O
of	O
a	O
cryptographic	O
nonce	O
.	O
</s>
<s>
AES-GCM-SIV	B-Algorithm
synthesizes	O
the	O
internal	O
IV	O
.	O
</s>
<s>
It	O
derives	O
a	O
hash	B-Algorithm
of	O
the	O
additional	O
authenticated	O
data	O
and	O
plaintext	O
using	O
the	O
POLYVAL	O
Galois	O
hash	B-Algorithm
function	I-Algorithm
.	O
</s>
<s>
The	O
hash	B-Algorithm
is	O
then	O
encrypted	O
an	O
AES-key	O
,	O
and	O
used	O
as	O
authentication	O
tag	O
and	O
AES-CTR	O
initialization	B-Algorithm
vector	I-Algorithm
.	O
</s>
<s>
AES-GCM-SIV	B-Algorithm
is	O
an	O
improvement	O
over	O
the	O
very	O
similarly	O
named	O
algorithm	O
GCM-SIV	O
,	O
with	O
a	O
few	O
very	O
small	O
changes	O
(	O
e.g.	O
</s>
<s>
how	O
AES-CTR	O
is	O
initialized	O
)	O
,	O
but	O
which	O
yields	O
practical	O
benefits	O
to	O
its	O
security	O
"	O
This	O
addition	O
allows	O
for	O
encrypting	O
up	O
to	O
250	O
messages	O
with	O
the	O
same	O
key	O
,	O
compared	O
to	O
the	O
significant	O
limitation	O
of	O
only	O
232	O
messages	O
that	O
were	O
allowed	O
with	O
GCM-SIV.	O
"	O
</s>
<s>
Many	O
modes	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
have	O
been	O
defined	O
.	O
</s>
<s>
The	O
purpose	O
of	O
cipher	B-Algorithm
modes	I-Algorithm
is	O
to	O
mask	O
patterns	O
which	O
exist	O
in	O
encrypted	O
data	O
,	O
as	O
illustrated	O
in	O
the	O
description	O
of	O
the	O
weakness	O
of	O
ECB	O
.	O
</s>
<s>
Different	O
cipher	B-Algorithm
modes	I-Algorithm
mask	O
patterns	O
by	O
cascading	O
outputs	O
from	O
the	O
cipher	O
block	B-General_Concept
or	O
other	O
globally	O
deterministic	O
variables	O
into	O
the	O
subsequent	O
cipher	O
block	B-General_Concept
.	O
</s>
<s>
The	O
simplest	O
(	O
and	O
not	O
to	O
be	O
used	O
anymore	O
)	O
of	O
the	O
encryption	B-Algorithm
modes	I-Algorithm
is	O
the	O
electronic	O
codebook	B-Algorithm
(	O
ECB	O
)	O
mode	O
(	O
named	O
after	O
conventional	O
physical	O
codebooks	B-Algorithm
)	O
.	O
</s>
<s>
The	O
message	O
is	O
divided	O
into	O
blocks	O
,	O
and	O
each	O
block	B-General_Concept
is	O
encrypted	O
separately	O
.	O
</s>
<s>
ECB	O
is	O
not	O
recommended	O
for	O
use	O
in	O
cryptographic	B-Protocol
protocols	I-Protocol
.	O
</s>
<s>
While	O
the	O
color	O
of	O
each	O
individual	O
pixel	B-Algorithm
is	O
encrypted	O
,	O
the	O
overall	O
image	O
may	O
still	O
be	O
discerned	O
,	O
as	O
the	O
pattern	O
of	O
identically	O
colored	O
pixels	B-Algorithm
in	O
the	O
original	O
remains	O
in	O
the	O
encrypted	O
version	O
.	O
</s>
<s>
ECB	O
mode	O
can	O
also	O
make	O
protocols	O
without	O
integrity	O
protection	O
even	O
more	O
susceptible	O
to	O
replay	O
attacks	O
,	O
since	O
each	O
block	B-General_Concept
gets	O
decrypted	O
in	O
exactly	O
the	O
same	O
way	O
.	O
</s>
<s>
Ehrsam	O
,	O
Meyer	O
,	O
Smith	O
and	O
Tuchman	O
invented	O
the	O
cipher	O
block	B-General_Concept
chaining	O
(	O
CBC	O
)	O
mode	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
in	O
1976	O
.	O
</s>
<s>
In	O
CBC	O
mode	O
,	O
each	O
block	B-General_Concept
of	O
plaintext	O
is	O
XORed	O
with	O
the	O
previous	O
ciphertext	O
block	B-General_Concept
before	O
being	O
encrypted	O
.	O
</s>
<s>
This	O
way	O
,	O
each	O
ciphertext	O
block	B-General_Concept
depends	O
on	O
all	O
plaintext	O
blocks	O
processed	O
up	O
to	O
that	O
point	O
.	O
</s>
<s>
To	O
make	O
each	O
message	O
unique	O
,	O
an	O
initialization	B-Algorithm
vector	I-Algorithm
must	O
be	O
used	O
in	O
the	O
first	O
block	B-General_Concept
.	O
</s>
<s>
CBC	O
has	O
been	O
the	O
most	O
commonly	O
used	O
mode	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
.	O
</s>
<s>
Its	O
main	O
drawbacks	O
are	O
that	O
encryption	O
is	O
sequential	O
(	O
i.e.	O
,	O
it	O
cannot	O
be	O
parallelized	O
)	O
,	O
and	O
that	O
the	O
message	O
must	O
be	O
padded	B-Algorithm
to	O
a	O
multiple	O
of	O
the	O
cipher	O
block	B-General_Concept
size	I-General_Concept
.	O
</s>
<s>
One	O
way	O
to	O
handle	O
this	O
last	O
issue	O
is	O
through	O
the	O
method	O
known	O
as	O
ciphertext	B-Algorithm
stealing	I-Algorithm
.	O
</s>
<s>
Note	O
that	O
a	O
one-bit	O
change	O
in	O
a	O
plaintext	O
or	O
initialization	B-Algorithm
vector	I-Algorithm
(	O
IV	O
)	O
affects	O
all	O
following	O
ciphertext	O
blocks	O
.	O
</s>
<s>
Decrypting	O
with	O
the	O
incorrect	O
IV	O
causes	O
the	O
first	O
block	B-General_Concept
of	O
plaintext	O
to	O
be	O
corrupt	O
but	O
subsequent	O
plaintext	O
blocks	O
will	O
be	O
correct	O
.	O
</s>
<s>
This	O
is	O
because	O
each	O
block	B-General_Concept
is	O
XORed	O
with	O
the	O
ciphertext	O
of	O
the	O
previous	O
block	B-General_Concept
,	O
not	O
the	O
plaintext	O
,	O
so	O
one	O
does	O
not	O
need	O
to	O
decrypt	O
the	O
previous	O
block	B-General_Concept
before	O
using	O
it	O
as	O
the	O
IV	O
for	O
the	O
decryption	O
of	O
the	O
current	O
one	O
.	O
</s>
<s>
This	O
means	O
that	O
a	O
plaintext	O
block	B-General_Concept
can	O
be	O
recovered	O
from	O
two	O
adjacent	O
blocks	O
of	O
ciphertext	O
.	O
</s>
<s>
Note	O
that	O
a	O
one-bit	O
change	O
to	O
the	O
ciphertext	O
causes	O
complete	O
corruption	O
of	O
the	O
corresponding	O
block	B-General_Concept
of	O
plaintext	O
,	O
and	O
inverts	O
the	O
corresponding	O
bit	O
in	O
the	O
following	O
block	B-General_Concept
of	O
plaintext	O
,	O
but	O
the	O
rest	O
of	O
the	O
blocks	O
remain	O
intact	O
.	O
</s>
<s>
This	O
peculiarity	O
is	O
exploited	O
in	O
different	O
padding	B-Application
oracle	I-Application
attacks	I-Application
,	O
such	O
as	O
POODLE	B-Protocol
.	O
</s>
<s>
Explicit	O
initialization	B-Algorithm
vectors	I-Algorithm
takes	O
advantage	O
of	O
this	O
property	O
by	O
prepending	O
a	O
single	O
random	O
block	B-General_Concept
to	O
the	O
plaintext	O
.	O
</s>
<s>
Whatever	O
IV	O
decryption	O
uses	O
,	O
only	O
the	O
random	O
block	B-General_Concept
is	O
"	O
corrupted	O
"	O
.	O
</s>
<s>
The	O
propagating	O
cipher	O
block	B-General_Concept
chaining	O
or	O
plaintext	O
cipher-block	O
chaining	O
mode	O
was	O
designed	O
to	O
cause	O
small	O
changes	O
in	O
the	O
ciphertext	O
to	O
propagate	O
indefinitely	O
when	O
decrypting	O
,	O
as	O
well	O
as	O
when	O
encrypting	O
.	O
</s>
<s>
In	O
PCBC	O
mode	O
,	O
each	O
block	B-General_Concept
of	O
plaintext	O
is	O
XORed	O
with	O
both	O
the	O
previous	O
plaintext	O
block	B-General_Concept
and	O
the	O
previous	O
ciphertext	O
block	B-General_Concept
before	O
being	O
encrypted	O
.	O
</s>
<s>
Like	O
with	O
CBC	O
mode	O
,	O
an	O
initialization	B-Algorithm
vector	I-Algorithm
is	O
used	O
in	O
the	O
first	O
block	B-General_Concept
.	O
</s>
<s>
Unlike	O
CBC	O
,	O
decrypting	O
PCBC	O
with	O
the	O
incorrect	O
IV	O
(	O
initialization	B-Algorithm
vector	I-Algorithm
)	O
causes	O
all	O
blocks	O
of	O
plaintext	O
to	O
be	O
corrupt	O
.	O
</s>
<s>
PCBC	O
is	O
used	O
in	O
Kerberos	B-Protocol
v4	I-Protocol
and	O
WASTE	O
,	O
most	O
notably	O
,	O
but	O
otherwise	O
is	O
not	O
common	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
PCBC	O
is	O
not	O
used	O
in	O
Kerberos	B-Protocol
v5	O
.	O
</s>
<s>
The	O
cipher	O
feedback	O
(	O
CFB	O
)	O
mode	O
,	O
in	O
its	O
simplest	O
form	O
uses	O
the	O
entire	O
output	O
of	O
the	O
block	B-General_Concept
cipher	O
.	O
</s>
<s>
In	O
this	O
variation	O
,	O
it	O
is	O
very	O
similar	O
to	O
CBC	O
,	O
makes	O
a	O
block	B-General_Concept
cipher	O
into	O
a	O
self-synchronizing	B-Algorithm
stream	I-Algorithm
cipher	I-Algorithm
.	O
</s>
<s>
These	O
modes	O
will	O
truncate	O
the	O
output	O
of	O
the	O
underlying	O
block	B-General_Concept
cipher	O
.	O
</s>
<s>
1-bit	O
loss	O
in	O
a	O
128-bit-wide	O
block	B-General_Concept
cipher	O
like	O
AES	B-Algorithm
will	O
render	O
129	O
invalid	O
bits	O
before	O
emitting	O
valid	O
bits	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
one	O
bit	O
change	O
in	O
CFB-128	O
with	O
an	O
underlying	O
128	O
bit	O
block	B-General_Concept
cipher	O
,	O
will	O
re-synchronize	O
after	O
two	O
blocks	O
.	O
</s>
<s>
CFB	O
,	O
OFB	O
and	O
CTR	O
share	O
two	O
advantages	O
over	O
CBC	O
mode	O
:	O
the	O
block	B-General_Concept
cipher	O
is	O
only	O
ever	O
used	O
in	O
the	O
encrypting	O
direction	O
,	O
and	O
the	O
message	O
does	O
not	O
need	O
to	O
be	O
padded	B-Algorithm
to	O
a	O
multiple	O
of	O
the	O
cipher	O
block	B-General_Concept
size	I-General_Concept
(	O
though	O
ciphertext	B-Algorithm
stealing	I-Algorithm
can	O
also	O
be	O
used	O
for	O
CBC	O
mode	O
to	O
make	O
padding	B-Algorithm
unnecessary	O
)	O
.	O
</s>
<s>
The	O
output	O
feedback	O
(	O
OFB	O
)	O
mode	O
makes	O
a	O
block	B-General_Concept
cipher	O
into	O
a	O
synchronous	O
stream	B-Algorithm
cipher	I-Algorithm
.	O
</s>
<s>
It	O
generates	O
keystream	B-Algorithm
blocks	O
,	O
which	O
are	O
then	O
XORed	O
with	O
the	O
plaintext	O
blocks	O
to	O
get	O
the	O
ciphertext	O
.	O
</s>
<s>
Just	O
as	O
with	O
other	O
stream	B-Algorithm
ciphers	I-Algorithm
,	O
flipping	O
a	O
bit	O
in	O
the	O
ciphertext	O
produces	O
a	O
flipped	O
bit	O
in	O
the	O
plaintext	O
at	O
the	O
same	O
location	O
.	O
</s>
<s>
This	O
property	O
allows	O
many	O
error-correcting	B-Error_Name
codes	I-Error_Name
to	O
function	O
normally	O
even	O
when	O
applied	O
before	O
encryption	O
.	O
</s>
<s>
Because	O
of	O
the	O
symmetry	O
of	O
the	O
XOR	B-Application
operation	O
,	O
encryption	O
and	O
decryption	O
are	O
exactly	O
the	O
same	O
:	O
</s>
<s>
Each	O
output	O
feedback	O
block	B-General_Concept
cipher	O
operation	O
depends	O
on	O
all	O
previous	O
ones	O
,	O
and	O
so	O
cannot	O
be	O
performed	O
in	O
parallel	O
.	O
</s>
<s>
However	O
,	O
because	O
the	O
plaintext	O
or	O
ciphertext	O
is	O
only	O
used	O
for	O
the	O
final	O
XOR	B-Application
,	O
the	O
block	B-General_Concept
cipher	O
operations	O
may	O
be	O
performed	O
in	O
advance	O
,	O
allowing	O
the	O
final	O
step	O
to	O
be	O
performed	O
in	O
parallel	O
once	O
the	O
plaintext	O
or	O
ciphertext	O
is	O
available	O
.	O
</s>
<s>
It	O
is	O
possible	O
to	O
obtain	O
an	O
OFB	O
mode	O
keystream	B-Algorithm
by	O
using	O
CBC	O
mode	O
with	O
a	O
constant	O
string	B-Language
of	O
zeroes	O
as	O
input	O
.	O
</s>
<s>
Using	O
OFB	O
mode	O
with	O
a	O
partial	O
block	B-General_Concept
as	O
feedback	O
like	O
CFB	O
mode	O
reduces	O
the	O
average	O
cycle	O
length	O
by	O
a	O
factor	O
of	O
232	O
or	O
more	O
.	O
</s>
<s>
Like	O
OFB	O
,	O
counter	O
mode	O
turns	O
a	O
block	B-General_Concept
cipher	O
into	O
a	O
stream	B-Algorithm
cipher	I-Algorithm
.	O
</s>
<s>
It	O
generates	O
the	O
next	O
keystream	B-Algorithm
block	B-General_Concept
by	O
encrypting	O
successive	O
values	O
of	O
a	O
"	O
counter	O
"	O
.	O
</s>
<s>
However	O
,	O
today	O
CTR	O
mode	O
is	O
widely	O
accepted	O
,	O
and	O
any	O
problems	O
are	O
considered	O
a	O
weakness	O
of	O
the	O
underlying	O
block	B-General_Concept
cipher	O
,	O
which	O
is	O
expected	O
to	O
be	O
secure	O
regardless	O
of	O
systemic	O
bias	O
in	O
its	O
input	O
.	O
</s>
<s>
Along	O
with	O
CBC	O
,	O
CTR	O
mode	O
is	O
one	O
of	O
two	O
block	B-Algorithm
cipher	I-Algorithm
modes	I-Algorithm
recommended	O
by	O
Niels	O
Ferguson	O
and	O
Bruce	O
Schneier	O
.	O
</s>
<s>
If	O
the	O
IV/nonce	O
is	O
random	O
,	O
then	O
they	O
can	O
be	O
combined	O
with	O
the	O
counter	O
using	O
any	O
invertible	O
operation	O
(	O
concatenation	O
,	O
addition	O
,	O
or	O
XOR	B-Application
)	O
to	O
produce	O
the	O
actual	O
unique	O
counter	O
block	B-General_Concept
for	O
encryption	O
.	O
</s>
<s>
In	O
case	O
of	O
a	O
non-random	O
nonce	O
(	O
such	O
as	O
a	O
packet	O
counter	O
)	O
,	O
the	O
nonce	O
and	O
counter	O
should	O
be	O
concatenated	O
(	O
e.g.	O
,	O
storing	O
the	O
nonce	O
in	O
the	O
upper	O
64bits	O
and	O
the	O
counter	O
in	O
the	O
lower	O
64bits	O
of	O
a	O
128-bit	O
counter	O
block	B-General_Concept
)	O
.	O
</s>
<s>
Once	O
an	O
attacker	O
controls	O
the	O
IV	O
–	O
counter	O
pair	O
and	O
plaintext	O
,	O
XOR	B-Application
of	O
the	O
ciphertext	O
with	O
the	O
known	O
plaintext	O
would	O
yield	O
a	O
value	O
that	O
,	O
when	O
XORed	O
with	O
the	O
ciphertext	O
of	O
the	O
other	O
block	B-General_Concept
sharing	O
the	O
same	O
IV	O
–	O
counter	O
pair	O
,	O
would	O
decrypt	O
that	O
block	B-General_Concept
.	O
</s>
<s>
Note	O
that	O
the	O
nonce	O
in	O
this	O
diagram	O
is	O
equivalent	O
to	O
the	O
initialization	B-Algorithm
vector	I-Algorithm
(	O
IV	O
)	O
in	O
the	O
other	O
diagrams	O
.	O
</s>
<s>
Specific	O
bit	O
errors	O
in	O
stream	B-Algorithm
cipher	I-Algorithm
modes	O
(	O
OFB	O
,	O
CTR	O
,	O
etc	O
.	O
)	O
</s>
<s>
CBC	O
)	O
:	O
adaptive	O
chosen-ciphertext	O
attack	O
may	O
intelligently	O
combine	O
many	O
different	O
specific	O
bit	O
errors	O
to	O
break	O
the	O
cipher	B-Algorithm
mode	I-Algorithm
.	O
</s>
<s>
In	O
Padding	B-Application
oracle	I-Application
attack	I-Application
,	O
CBC	O
can	O
be	O
decrypted	O
in	O
the	O
attack	O
by	O
guessing	O
encryption	O
secrets	O
based	O
on	O
error	O
responses	O
.	O
</s>
<s>
The	O
Padding	B-Application
Oracle	I-Application
attack	I-Application
variant	O
"	O
CBC-R	O
"	O
(	O
CBC	O
Reverse	O
)	O
lets	O
the	O
attacker	O
construct	O
any	O
valid	O
message	O
.	O
</s>
<s>
For	O
modern	O
authenticated	B-Algorithm
encryption	I-Algorithm
(	O
AEAD	O
)	O
or	O
protocols	O
with	O
message	B-Algorithm
authentication	I-Algorithm
codes	I-Algorithm
chained	O
in	O
MAC-Then-Encrypt	O
order	O
,	O
any	O
bit	O
error	O
should	O
completely	O
abort	O
decryption	O
and	O
must	O
not	O
generate	O
any	O
specific	O
bit	O
errors	O
to	O
decryptor	O
.	O
</s>
<s>
As	O
such	O
error	O
propagation	O
is	O
less	O
important	O
subject	O
in	O
modern	O
cipher	B-Algorithm
modes	I-Algorithm
than	O
in	O
traditional	O
confidentiality-only	O
modes	O
.	O
</s>
<s>
It	O
might	O
be	O
observed	O
,	O
for	O
example	O
,	O
that	O
a	O
one-block	O
error	O
in	O
the	O
transmitted	O
ciphertext	O
would	O
result	O
in	O
a	O
one-block	O
error	O
in	O
the	O
reconstructed	O
plaintext	O
for	O
ECB	O
mode	O
encryption	O
,	O
while	O
in	O
CBC	O
mode	O
such	O
an	O
error	O
would	O
affect	O
two	O
blocks	O
.	O
</s>
<s>
If	O
resistance	O
to	O
random	O
error	O
is	O
desirable	O
,	O
error-correcting	B-Error_Name
codes	I-Error_Name
should	O
be	O
applied	O
to	O
the	O
ciphertext	O
before	O
transmission	O
.	O
</s>
<s>
Many	O
more	O
modes	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
for	O
block	B-General_Concept
ciphers	O
have	O
been	O
suggested	O
.	O
</s>
<s>
Still	O
others	O
do	O
n't	O
categorize	O
as	O
confidentiality	O
,	O
authenticity	O
,	O
or	O
authenticated	B-Algorithm
encryption	I-Algorithm
–	O
for	O
example	O
key	B-Algorithm
feedback	I-Algorithm
mode	I-Algorithm
and	O
Davies	O
–	O
Meyer	O
hashing	O
.	O
</s>
<s>
NIST	O
maintains	O
a	O
list	O
of	O
proposed	O
modes	O
for	O
block	B-General_Concept
ciphers	O
at	O
Modes	O
Development	O
.	O
</s>
<s>
Tweakable	O
narrow-block	O
encryption	B-Algorithm
modes	I-Algorithm
(	O
LRW	O
,	O
XEX	B-Algorithm
,	O
and	O
XTS	O
)	O
and	O
wide-block	O
encryption	B-Algorithm
modes	I-Algorithm
(	O
CMC	O
and	O
EME	O
)	O
are	O
designed	O
to	O
securely	O
encrypt	O
sectors	O
of	O
a	O
disk	O
(	O
see	O
disk	B-Algorithm
encryption	I-Algorithm
theory	I-Algorithm
)	O
.	O
</s>
<s>
Many	O
modes	O
use	O
an	O
initialization	B-Algorithm
vector	I-Algorithm
(	O
IV	O
)	O
which	O
,	O
depending	O
on	O
the	O
mode	O
,	O
may	O
have	O
requirements	O
such	O
as	O
being	O
only	O
used	O
once	O
(	O
a	O
nonce	O
)	O
or	O
being	O
unpredictable	O
ahead	O
of	O
its	O
publication	O
,	O
etc	O
.	O
</s>
<s>
Reusing	O
an	O
IV	O
with	O
the	O
same	O
key	O
in	O
CTR	O
,	O
GCM	B-Algorithm
or	O
OFB	O
mode	O
results	O
in	O
XORing	O
the	O
same	O
keystream	B-Algorithm
with	O
two	O
or	O
more	O
plaintexts	O
,	O
a	O
clear	O
misuse	O
of	O
a	O
stream	O
,	O
with	O
a	O
catastrophic	O
loss	O
of	O
security	O
.	O
</s>
<s>
Deterministic	O
authenticated	B-Algorithm
encryption	I-Algorithm
modes	O
such	O
as	O
the	O
NIST	B-Algorithm
Key	I-Algorithm
Wrap	I-Algorithm
algorithm	O
and	O
the	O
SIV	O
(	O
RFC	O
5297	O
)	O
AEAD	O
mode	O
do	O
not	O
require	O
an	O
IV	O
as	O
an	O
input	O
,	O
and	O
return	O
the	O
same	O
ciphertext	O
and	O
authentication	O
tag	O
every	O
time	O
for	O
a	O
given	O
plaintext	O
and	O
key	O
.	O
</s>
<s>
Block	B-General_Concept
ciphers	O
can	O
also	O
be	O
used	O
in	O
other	O
cryptographic	B-Protocol
protocols	I-Protocol
.	O
</s>
<s>
They	O
are	O
generally	O
used	O
in	O
modes	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
similar	O
to	O
the	O
block	B-General_Concept
modes	O
described	O
here	O
.	O
</s>
<s>
As	O
with	O
all	O
protocols	O
,	O
to	O
be	O
cryptographically	O
secure	O
,	O
care	O
must	O
be	O
taken	O
to	O
design	O
these	O
modes	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
correctly	O
.	O
</s>
<s>
There	O
are	O
several	O
schemes	O
which	O
use	O
a	O
block	B-General_Concept
cipher	O
to	O
build	O
a	O
cryptographic	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
.	O
</s>
<s>
See	O
one-way	B-Algorithm
compression	I-Algorithm
function	I-Algorithm
for	O
descriptions	O
of	O
several	O
such	O
methods	O
.	O
</s>
<s>
Cryptographically	B-Algorithm
secure	I-Algorithm
pseudorandom	I-Algorithm
number	I-Algorithm
generators	I-Algorithm
(	O
CSPRNGs	B-Algorithm
)	O
can	O
also	O
be	O
built	O
using	O
block	B-General_Concept
ciphers	O
.	O
</s>
<s>
Message	B-Algorithm
authentication	I-Algorithm
codes	I-Algorithm
(	O
MACs	O
)	O
are	O
often	O
built	O
from	O
block	B-General_Concept
ciphers	O
.	O
</s>
<s>
CBC-MAC	B-Algorithm
,	O
OMAC	B-Algorithm
and	O
PMAC	B-Algorithm
are	O
examples	O
.	O
</s>
