<s>
In	O
computing	O
,	O
the	O
Challenge-Handshake	B-Protocol
Authentication	I-Protocol
Protocol	I-Protocol
(	O
CHAP	O
)	O
is	O
an	O
authentication	B-Protocol
protocol	I-Protocol
originally	O
used	O
by	O
Point-to-Point	B-Protocol
Protocol	I-Protocol
(	O
PPP	O
)	O
to	O
validate	O
users	O
.	O
</s>
<s>
CHAP	O
is	O
also	O
carried	O
in	O
other	O
authentication	B-Protocol
protocols	I-Protocol
such	O
as	O
RADIUS	B-Protocol
and	O
Diameter	B-Protocol
.	O
</s>
<s>
Almost	O
all	O
network	B-Protocol
operating	I-Protocol
systems	I-Protocol
support	O
PPP	O
with	O
CHAP	O
,	O
as	O
do	O
most	O
network	O
access	O
servers	O
.	O
</s>
<s>
CHAP	O
is	O
also	O
used	O
in	O
PPPoE	B-Protocol
,	O
for	O
authenticating	O
DSL	O
users	O
.	O
</s>
<s>
Where	O
CHAP	O
is	O
used	O
in	O
other	O
protocols	O
,	O
it	O
may	O
be	O
sent	O
in	O
the	O
clear	O
,	O
or	O
it	O
may	O
be	O
protected	O
by	O
a	O
security	O
layer	O
such	O
as	O
Transport	B-Protocol
Layer	I-Protocol
Security	I-Protocol
(	O
TLS	O
)	O
.	O
</s>
<s>
For	O
example	O
,	O
when	O
CHAP	O
is	O
sent	O
over	O
RADIUS	B-Protocol
using	O
User	B-Protocol
Datagram	I-Protocol
Protocol	I-Protocol
(	O
UDP	O
)	O
,	O
any	O
attacker	O
who	O
can	O
see	O
the	O
RADIUS	B-Protocol
packets	O
can	O
mount	O
an	O
offline	O
dictionary	O
attack	O
,	O
as	O
with	O
PPP	O
.	O
</s>
<s>
CHAP	O
requires	O
that	O
both	O
the	O
client	B-Protocol
and	O
server	O
know	O
the	O
clear-text	O
version	O
of	O
the	O
password	O
,	O
although	O
the	O
password	O
itself	O
is	O
never	O
sent	O
over	O
the	O
network	O
.	O
</s>
<s>
Thus	O
when	O
used	O
in	O
PPP	O
,	O
CHAP	O
provides	O
better	O
security	O
as	O
compared	O
to	O
Password	B-Protocol
Authentication	I-Protocol
Protocol	I-Protocol
(	O
PAP	B-Protocol
)	O
which	O
is	O
vulnerable	O
for	O
both	O
these	O
reasons	O
.	O
</s>
<s>
If	O
the	O
resulting	O
hashes	B-Algorithm
match	O
,	O
then	O
the	O
user	O
is	O
deemed	O
to	O
be	O
authenticated	O
.	O
</s>
<s>
If	O
the	O
hashes	B-Algorithm
do	O
not	O
match	O
,	O
then	O
the	O
users	O
authentication	O
attempt	O
is	O
rejected	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
while	O
CHAP	O
can	O
be	O
more	O
secure	O
than	O
PAP	B-Protocol
when	O
used	O
over	O
a	O
PPP	O
link	O
,	O
it	O
prevents	O
more	O
secure	O
storage	O
"	O
at	O
rest	O
"	O
than	O
with	O
other	O
methods	O
such	O
as	O
PAP	B-Protocol
.	O
</s>
<s>
MS-CHAP	B-Algorithm
is	O
similar	O
to	O
CHAP	O
but	O
uses	O
a	O
different	O
hash	B-Algorithm
algorithm	O
,	O
and	O
allows	O
for	O
each	O
party	O
to	O
authenticate	O
the	O
other	O
.	O
</s>
<s>
CHAP	O
is	O
an	O
authentication	O
scheme	O
originally	O
used	O
by	O
Point-to-Point	B-Protocol
Protocol	I-Protocol
(	O
PPP	O
)	O
servers	O
to	O
validate	O
the	O
identity	O
of	O
remote	O
clients	O
.	O
</s>
<s>
CHAP	O
periodically	O
verifies	O
the	O
identity	O
of	O
the	O
client	B-Protocol
by	O
using	O
a	O
three-way	B-Protocol
handshake	I-Protocol
.	O
</s>
<s>
The	O
verification	O
is	O
based	O
on	O
a	O
shared	O
secret	O
(	O
such	O
as	O
the	O
client	B-Protocol
's	O
password	O
)	O
.	O
</s>
<s>
The	O
peer	O
responds	O
with	O
a	O
value	O
calculated	O
using	O
a	O
one-way	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
on	O
the	O
challenge	O
and	O
the	O
secret	O
combined	O
.	O
</s>
<s>
The	O
authenticator	O
checks	O
the	O
response	O
against	O
its	O
own	O
calculation	O
of	O
the	O
expected	O
hash	B-Algorithm
value	O
.	O
</s>
<s>
RADIUS	B-Protocol
)	O
,	O
this	O
step	O
is	O
not	O
performed	O
.	O
</s>
<s>
For	O
MD5	B-Algorithm
as	O
hash	B-Algorithm
the	O
response	O
value	O
is	O
MD5( ID||secret||challenge	O
)	O
,	O
the	O
MD5	B-Algorithm
for	O
the	O
concatenation	O
of	O
ID	O
,	O
secret	O
,	O
and	O
challenge	O
.	O
</s>
