<s>
IEEE	B-Protocol
802.11i-2004	I-Protocol
,	O
or	O
802.11i	B-Protocol
for	O
short	O
,	O
is	O
an	O
amendment	O
to	O
the	O
original	O
IEEE	O
802.11	O
,	O
implemented	O
as	O
Wi-Fi	O
Protected	O
Access	O
II	O
(	O
WPA2	O
)	O
.	O
</s>
<s>
This	O
standard	O
specifies	O
security	B-Application
mechanisms	O
for	O
wireless	O
networks	O
,	O
replacing	O
the	O
short	O
Authentication	O
and	O
privacy	O
clause	O
of	O
the	O
original	O
standard	O
with	O
a	O
detailed	O
Security	B-Application
clause	O
.	O
</s>
<s>
In	O
the	O
process	O
,	O
the	O
amendment	O
deprecated	B-General_Concept
broken	O
Wired	B-Protocol
Equivalent	I-Protocol
Privacy	I-Protocol
(	O
WEP	O
)	O
,	O
while	O
it	O
was	O
later	O
incorporated	O
into	O
the	O
published	O
IEEE	O
802.11-2007	O
standard	O
.	O
</s>
<s>
802.11i	B-Protocol
supersedes	O
the	O
previous	O
security	B-Application
specification	O
,	O
Wired	B-Protocol
Equivalent	I-Protocol
Privacy	I-Protocol
(	O
WEP	O
)	O
,	O
which	O
was	O
shown	O
to	O
have	O
security	B-Application
vulnerabilities	O
.	O
</s>
<s>
WPA	O
implemented	O
a	O
subset	O
of	O
a	O
draft	O
of	O
802.11i	B-Protocol
.	O
</s>
<s>
The	O
Wi-Fi	O
Alliance	O
refers	O
to	O
their	O
approved	O
,	O
interoperable	O
implementation	O
of	O
the	O
full	O
802.11i	B-Protocol
as	O
WPA2	O
,	O
also	O
called	O
RSN	O
(	O
Robust	O
Security	B-Application
)	O
.	O
</s>
<s>
802.11i	B-Protocol
makes	O
use	O
of	O
the	O
Advanced	B-Algorithm
Encryption	I-Algorithm
Standard	I-Algorithm
(	O
AES	B-Algorithm
)	O
block	O
cipher	O
,	O
whereas	O
WEP	O
and	O
WPA	O
use	O
the	O
RC4	B-Algorithm
stream	B-Algorithm
cipher	I-Algorithm
.	O
</s>
<s>
IEEE	B-Protocol
802.11i	I-Protocol
enhances	O
IEEE	O
802.11-1999	O
by	O
providing	O
a	O
Robust	B-Protocol
Security	I-Protocol
Network	I-Protocol
(	O
RSN	O
)	O
with	O
two	O
new	O
protocols	O
:	O
the	O
four-way	O
handshake	O
and	O
the	O
group	O
key	O
handshake	O
.	O
</s>
<s>
The	O
RSN	O
is	O
a	O
security	B-Application
network	O
that	O
only	O
allows	O
the	O
creation	O
of	O
robust	B-Protocol
security	I-Protocol
network	I-Protocol
associations	O
(	O
RSNAs	O
)	O
,	O
which	O
are	O
a	O
type	O
of	O
association	O
used	O
by	O
a	O
pair	O
of	O
stations	O
(	O
STAs	O
)	O
if	O
the	O
procedure	O
to	O
establish	O
authentication	O
or	O
association	O
between	O
them	O
includes	O
the	O
4-Way	O
Handshake	O
.	O
</s>
<s>
The	O
standard	O
also	O
provides	O
two	O
RSNA	O
data	O
confidentiality	O
and	O
integrity	O
protocols	O
,	O
TKIP	B-Protocol
and	O
CCMP	B-Protocol
,	O
with	O
implementation	O
of	O
CCMP	B-Protocol
being	O
mandatory	O
since	O
the	O
confidentiality	O
and	O
integrity	O
mechanisms	O
of	O
TKIP	B-Protocol
are	O
not	O
as	O
robust	O
as	O
those	O
of	O
CCMP	B-Protocol
.	O
</s>
<s>
The	O
main	O
purpose	O
to	O
implement	O
TKIP	B-Protocol
was	O
that	O
the	O
algorithm	O
should	O
be	O
implementable	O
within	O
the	O
capabilities	O
of	O
most	O
of	O
the	O
old	O
devices	O
supporting	O
only	O
WEP	O
.	O
</s>
<s>
The	O
initial	O
authentication	O
process	O
is	O
carried	O
out	O
either	O
using	O
a	O
pre-shared	O
key	O
(	O
PSK	O
)	O
,	O
or	O
following	O
an	O
EAP	B-Protocol
exchange	O
through	O
802.1X	O
(	O
known	O
as	O
EAPOL	B-Protocol
,	O
which	O
requires	O
the	O
presence	O
of	O
an	O
authentication	O
server	O
)	O
.	O
</s>
<s>
This	O
process	O
ensures	O
that	O
the	O
client	O
station	O
(	O
STA	O
)	O
is	O
authenticated	O
with	O
the	O
access	O
point	O
(	O
AP	B-Device
)	O
.	O
</s>
<s>
In	O
PSK	O
authentication	O
,	O
the	O
PMK	O
is	O
actually	O
the	O
PSK	O
,	O
which	O
is	O
typically	O
derived	O
from	O
the	O
WiFi	O
password	O
by	O
putting	O
it	O
through	O
a	O
key	O
derivation	O
function	O
that	O
uses	O
SHA-1	B-Algorithm
as	O
the	O
cryptographic	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
.	O
</s>
<s>
If	O
an	O
802.1X	O
EAP	B-Protocol
exchange	O
was	O
carried	O
out	O
,	O
the	O
PMK	O
is	O
derived	O
from	O
the	O
EAP	B-Protocol
parameters	O
provided	O
by	O
the	O
authentication	O
server	O
.	O
</s>
<s>
Instead	O
of	O
disclosing	O
the	O
key	O
,	O
the	O
access	O
point	O
(	O
AP	B-Device
)	O
and	O
client	O
encrypt	O
messages	O
to	O
each	O
other	O
—	O
that	O
can	O
only	O
be	O
decrypted	O
by	O
using	O
the	O
PMK	O
that	O
they	O
already	O
share	O
—	O
and	O
if	O
decryption	O
of	O
the	O
messages	O
was	O
successful	O
,	O
this	O
proves	O
knowledge	O
of	O
the	O
PMK	O
.	O
</s>
<s>
The	O
PTK	O
is	O
generated	O
by	O
concatenating	O
the	O
following	O
attributes	O
:	O
PMK	O
,	O
AP	B-Device
nonce	O
(	O
ANonce	O
)	O
,	O
STA	O
nonce	O
(	O
SNonce	O
)	O
,	O
AP	B-Device
MAC	O
address	O
,	O
and	O
STA	O
MAC	O
address	O
.	O
</s>
<s>
The	O
actual	O
messages	O
exchanged	O
during	O
the	O
handshake	O
are	O
depicted	O
in	O
the	O
figure	O
and	O
explained	O
below	O
(	O
all	O
messages	O
are	O
sent	O
as	O
EAPOL-Key	O
frames	O
)	O
:	O
</s>
<s>
The	O
AP	B-Device
sends	O
a	O
nonce-value	O
(	O
ANonce	O
)	O
to	O
the	O
STA	O
together	O
with	O
a	O
Key	O
Replay	O
Counter	O
,	O
which	O
is	O
a	O
number	O
that	O
is	O
used	O
to	O
match	O
each	O
pair	O
of	O
messages	O
sent	O
,	O
and	O
discard	O
replayed	O
messages	O
.	O
</s>
<s>
The	O
STA	O
sends	O
its	O
own	O
nonce-value	O
(	O
SNonce	O
)	O
to	O
the	O
AP	B-Device
together	O
with	O
a	O
Message	B-Algorithm
Integrity	I-Algorithm
Code	I-Algorithm
(	O
MIC	B-Algorithm
)	O
,	O
including	O
authentication	O
,	O
which	O
is	O
really	O
a	O
Message	O
Authentication	O
and	O
Integrity	O
Code	O
(	O
MAIC	O
)	O
,	O
and	O
the	O
Key	O
Replay	O
Counter	O
which	O
will	O
be	O
the	O
same	O
as	O
Message	O
1	O
,	O
to	O
allow	O
AP	B-Device
to	O
match	O
the	O
right	O
Message	O
1	O
.	O
</s>
<s>
The	O
AP	B-Device
verifies	O
Message	O
2	O
,	O
by	O
checking	O
MIC	B-Algorithm
,	O
RSN	O
,	O
ANonce	O
and	O
Key	O
Replay	O
Counter	O
Field	O
,	O
and	O
if	O
valid	O
constructs	O
and	O
sends	O
the	O
GTK	O
with	O
another	O
MIC	B-Algorithm
.	O
</s>
<s>
The	O
STA	O
verifies	O
Message	O
3	O
,	O
by	O
checking	O
MIC	B-Algorithm
and	O
Key	O
Replay	O
Counter	O
Field	O
,	O
and	O
if	O
valid	O
sends	O
a	O
confirmation	O
to	O
the	O
AP	B-Device
.	O
</s>
<s>
This	O
is	O
to	O
prevent	O
the	O
device	O
from	O
receiving	O
any	O
more	O
multicast	O
or	O
broadcast	O
messages	O
from	O
the	O
AP	B-Device
.	O
</s>
<s>
To	O
handle	O
the	O
updating	O
,	O
802.11i	B-Protocol
defines	O
a	O
Group	O
Key	O
Handshake	O
that	O
consists	O
of	O
a	O
two-way	O
handshake	O
:	O
</s>
<s>
The	O
AP	B-Device
sends	O
the	O
new	O
GTK	O
to	O
each	O
STA	O
in	O
the	O
network	O
.	O
</s>
<s>
The	O
GTK	O
is	O
encrypted	O
using	O
the	O
KEK	O
assigned	O
to	O
that	O
STA	O
,	O
and	O
protects	O
the	O
data	O
from	O
tampering	O
,	O
by	O
use	O
of	O
a	O
MIC	B-Algorithm
.	O
</s>
<s>
The	O
STA	O
acknowledges	O
the	O
new	O
GTK	O
and	O
replies	O
to	O
the	O
AP	B-Device
.	O
</s>
<s>
CCMP	B-Protocol
is	O
based	O
on	O
the	O
Counter	O
with	O
CBC-MAC	O
(	O
CCM	O
)	O
mode	O
of	O
the	O
AES	B-Algorithm
encryption	I-Algorithm
algorithm	O
.	O
</s>
