<s>
In	O
cryptography	O
,	O
Galois/Counter	B-Algorithm
Mode	I-Algorithm
(	O
GCM	O
)	O
is	O
a	O
mode	B-Algorithm
of	I-Algorithm
operation	I-Algorithm
for	O
symmetric-key	B-Algorithm
cryptographic	O
block	O
ciphers	O
which	O
is	O
widely	O
adopted	O
for	O
its	O
performance	O
.	O
</s>
<s>
The	O
GCM	O
algorithm	O
provides	O
both	O
data	O
authenticity	O
(	O
integrity	O
)	O
and	O
confidentiality	O
and	O
belongs	O
to	O
the	O
class	O
of	O
authenticated	B-Algorithm
encryption	I-Algorithm
with	O
associated	O
data	O
(	O
AEAD	O
)	O
methods	O
.	O
</s>
<s>
GCM	O
uses	O
a	O
block	O
cipher	O
with	O
block	O
size	O
128	O
bits	O
(	O
commonly	O
AES-128	B-Algorithm
)	O
operated	O
in	O
counter	O
mode	O
for	O
encryption	O
,	O
and	O
uses	O
arithmetic	O
in	O
the	O
Galois	O
field	O
GF(2128 )	O
to	O
compute	O
the	O
authentication	O
tag	O
;	O
hence	O
the	O
name	O
.	O
</s>
<s>
Galois	B-Algorithm
Message	I-Algorithm
Authentication	I-Algorithm
Code	I-Algorithm
(	O
GMAC	O
)	O
is	O
an	O
authentication-only	O
variant	O
of	O
the	O
GCM	O
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	O
and	O
GMAC	O
can	O
accept	O
initialization	B-Algorithm
vectors	I-Algorithm
of	O
arbitrary	O
length	O
.	O
</s>
<s>
Different	O
block	B-Algorithm
cipher	I-Algorithm
modes	I-Algorithm
of	I-Algorithm
operation	I-Algorithm
can	O
have	O
significantly	O
different	O
performance	O
and	O
efficiency	O
characteristics	O
,	O
even	O
when	O
used	O
with	O
the	O
same	O
block	O
cipher	O
.	O
</s>
<s>
GCM	O
can	O
take	O
full	O
advantage	O
of	O
parallel	B-Operating_System
processing	I-Operating_System
and	O
implementing	O
GCM	O
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>
By	O
contrast	O
,	O
the	O
cipher	O
block	O
chaining	O
(	O
CBC	O
)	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
normal	O
counter	O
mode	O
,	O
blocks	O
are	O
numbered	O
sequentially	O
,	O
and	O
then	O
this	O
block	O
number	O
is	O
combined	O
with	O
an	O
initialization	B-Algorithm
vector	I-Algorithm
(	O
IV	O
)	O
and	O
encrypted	O
with	O
a	O
block	O
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>
The	O
authentication	O
tag	O
is	O
constructed	O
by	O
feeding	O
blocks	O
of	O
data	O
into	O
the	O
GHASH	B-Algorithm
function	O
and	O
encrypting	O
the	O
result	O
.	O
</s>
<s>
If	O
the	O
length	O
of	O
the	O
IV	O
is	O
not	O
96	O
,	O
the	O
GHASH	B-Algorithm
function	O
is	O
used	O
to	O
calculate	O
Counter	O
0	O
:	O
</s>
<s>
GCM	O
was	O
designed	O
by	O
John	O
Viega	O
and	O
David	O
A	O
.	O
McGrew	O
to	O
be	O
an	O
improvement	O
to	O
Carter	B-Algorithm
–	I-Algorithm
Wegman	I-Algorithm
counter	I-Algorithm
mode	I-Algorithm
(	O
CWC	B-Algorithm
mode	I-Algorithm
)	O
.	O
</s>
<s>
In	O
November	O
2007	O
,	O
NIST	O
announced	O
the	O
release	O
of	O
NIST	O
Special	O
Publication	O
800-38D	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	O
)	O
and	O
GMAC	O
making	O
GCM	O
and	O
GMAC	O
official	O
standards	O
.	O
</s>
<s>
GCM	B-Algorithm
mode	I-Algorithm
is	O
used	O
in	O
the	O
IEEE	O
802.1AE	O
(	O
MACsec	O
)	O
Ethernet	O
security	O
,	O
WPA3-Enterprise	O
Wifi	O
security	O
protocol	O
,	O
IEEE	B-General_Concept
802.11ad	I-General_Concept
(	O
also	O
dubbed	O
WiGig	O
)	O
,	O
ANSI	O
(	O
INCITS	O
)	O
Fibre	B-Architecture
Channel	I-Architecture
Security	O
Protocols	O
(	O
FC-SP	O
)	O
,	O
IEEE	O
P1619.1	O
tape	O
storage	O
,	O
IETF	O
IPsec	B-Protocol
standards	O
,	O
SSH	B-Protocol
,	O
TLS	B-Protocol
1.2	O
and	O
TLS	B-Protocol
1.3	O
.	O
</s>
<s>
AES-GCM	B-Algorithm
is	O
included	O
in	O
the	O
NSA	O
Suite	O
B	O
Cryptography	O
and	O
its	O
latest	O
replacement	O
in	O
2018	O
Commercial	O
National	O
Security	O
Algorithm	O
(	O
CNSA	O
)	O
suite	O
.	O
</s>
<s>
GCM	B-Algorithm
mode	I-Algorithm
is	O
used	O
in	O
the	O
SoftEther	B-Application
VPN	I-Application
server	O
and	O
client	O
,	O
as	O
well	O
as	O
OpenVPN	B-Language
since	O
version	O
2.4	O
.	O
</s>
<s>
The	O
block	O
cipher	O
operations	O
are	O
easily	O
pipelined	O
or	O
parallelized	B-Operating_System
;	O
the	O
multiplication	O
operations	O
are	O
easily	O
pipelined	O
and	O
can	O
be	O
parallelized	B-Operating_System
with	O
some	O
modest	O
effort	O
(	O
either	O
by	O
parallelizing	O
the	O
actual	O
operation	O
,	O
by	O
adapting	O
Horner	O
's	O
method	O
per	O
the	O
original	O
NIST	O
submission	O
,	O
or	O
both	O
)	O
.	O
</s>
<s>
Intel	O
has	O
added	O
the	O
PCLMULQDQ	B-Device
instruction	O
,	O
highlighting	O
its	O
use	O
for	O
GCM	O
.	O
</s>
<s>
Käsper	O
and	O
Schwabe	O
described	O
a	O
"	O
Faster	O
and	O
Timing-Attack	O
Resistant	O
AES-GCM	B-Algorithm
"	O
that	O
achieves	O
10.68	O
cycles	O
per	O
byte	O
AES-GCM	B-Algorithm
authenticated	B-Algorithm
encryption	I-Algorithm
on	O
64-bit	O
Intel	O
processors	O
.	O
</s>
<s>
report	O
3.5	O
cycles	O
per	O
byte	O
for	O
the	O
same	O
algorithm	O
when	O
using	O
Intel	O
's	O
AES-NI	O
and	O
PCLMULQDQ	B-Device
instructions	O
.	O
</s>
<s>
Appropriate	O
patches	O
were	O
prepared	O
for	O
the	O
OpenSSL	B-Language
and	O
NSS	B-Protocol
libraries	O
.	O
</s>
<s>
Performance	O
is	O
increased	O
by	O
exploiting	O
instruction-level	B-Operating_System
parallelism	I-Operating_System
by	O
interleaving	O
operations	O
.	O
</s>
<s>
GCM	O
has	O
been	O
criticized	O
for	O
example	O
by	O
Silicon	O
Labs	O
in	O
the	O
embedded	O
world	O
because	O
the	O
parallel	B-Operating_System
processing	I-Operating_System
is	O
n't	O
suited	O
for	O
performant	O
use	O
of	O
cryptographic	O
hardware	O
engines	O
and	O
therefore	O
reduces	O
the	O
performance	O
of	O
encryption	O
for	O
some	O
of	O
the	O
most	O
performance-sensitive	O
devices	O
.	O
</s>
<s>
GCM	O
is	O
proven	O
secure	O
in	O
the	O
concrete	B-General_Concept
security	I-General_Concept
model	I-General_Concept
.	O
</s>
<s>
It	O
is	O
secure	O
when	O
it	O
is	O
used	O
with	O
a	O
block	O
cipher	O
that	O
is	O
indistinguishable	O
from	O
a	O
random	O
permutation	O
;	O
however	O
,	O
security	O
depends	O
on	O
choosing	O
a	O
unique	O
initialization	B-Algorithm
vector	I-Algorithm
for	O
every	O
encryption	O
performed	O
with	O
the	O
same	O
key	O
(	O
see	O
stream	B-Algorithm
cipher	I-Algorithm
attack	O
)	O
.	O
</s>
<s>
For	O
any	O
given	O
key	O
and	O
initialization	B-Algorithm
vector	I-Algorithm
combination	O
,	O
GCM	O
is	O
limited	O
to	O
encrypting	O
bits	O
of	O
plain	O
text	O
(	O
64	O
GiB	O
)	O
.	O
</s>
<s>
NIST	O
Special	O
Publication	O
800-38D	O
includes	O
guidelines	O
for	O
initialization	B-Algorithm
vector	I-Algorithm
selection	O
.	O
</s>
<s>
The	O
authentication	O
strength	O
depends	O
on	O
the	O
length	O
of	O
the	O
authentication	O
tag	O
,	O
like	O
with	O
all	O
symmetric	O
message	B-Algorithm
authentication	I-Algorithm
codes	I-Algorithm
.	O
</s>
<s>
Like	O
with	O
any	O
message	B-Algorithm
authentication	I-Algorithm
code	I-Algorithm
,	O
if	O
the	O
adversary	O
chooses	O
a	O
t-bit	O
tag	O
at	O
random	O
,	O
it	O
is	O
expected	O
to	O
be	O
correct	O
for	O
given	O
data	O
with	O
probability	O
measure	O
2−t	O
.	O
</s>
<s>
Ferguson	O
showed	O
that	O
,	O
if	O
n	O
denotes	O
the	O
total	O
number	O
of	O
blocks	O
in	O
the	O
encoding	O
(	O
the	O
input	O
to	O
the	O
GHASH	B-Algorithm
function	O
)	O
,	O
then	O
there	O
is	O
a	O
method	O
of	O
constructing	O
a	O
targeted	O
ciphertext	O
forgery	O
that	O
is	O
expected	O
to	O
succeed	O
with	O
a	O
probability	O
of	O
approximately	O
n⋅2−t	O
.	O
</s>
<s>
Saarinen	O
also	O
described	O
a	O
GCM	O
variant	O
Sophie	B-Algorithm
Germain	I-Algorithm
Counter	I-Algorithm
Mode	I-Algorithm
(	O
SGCM	B-Algorithm
)	O
based	O
on	O
Sophie	O
Germain	O
primes	O
.	O
</s>
