<s>
The	O
MD5	B-Algorithm
message-digest	B-Algorithm
algorithm	I-Algorithm
is	O
a	O
widely	O
used	O
hash	B-Algorithm
function	I-Algorithm
producing	O
a	O
128-bit	O
hash	B-Error_Name
value	I-Error_Name
.	O
</s>
<s>
MD5	B-Algorithm
was	O
designed	O
by	O
Ronald	O
Rivest	O
in	O
1991	O
to	O
replace	O
an	O
earlier	O
hash	B-Algorithm
function	I-Algorithm
MD4	B-Algorithm
,	O
and	O
was	O
specified	O
in	O
1992	O
as	O
RFC	O
1321	O
.	O
</s>
<s>
MD5	B-Algorithm
can	O
be	O
used	O
as	O
a	O
checksum	B-Algorithm
to	O
verify	O
data	O
integrity	O
against	O
unintentional	O
corruption	O
.	O
</s>
<s>
Historically	O
it	O
was	O
widely	O
used	O
as	O
a	O
cryptographic	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
;	O
however	O
it	O
has	O
been	O
found	O
to	O
suffer	O
from	O
extensive	O
vulnerabilities	O
.	O
</s>
<s>
It	O
remains	O
suitable	O
for	O
other	O
non-cryptographic	O
purposes	O
,	O
for	O
example	O
for	O
determining	O
the	O
partition	B-General_Concept
for	O
a	O
particular	O
key	O
in	O
a	O
partitioned	B-General_Concept
database	I-General_Concept
,	O
and	O
may	O
be	O
preferred	O
due	O
to	O
lower	O
computational	O
requirements	O
than	O
more	O
recent	O
Secure	O
Hash	B-Error_Name
Algorithms	I-Error_Name
.	O
</s>
<s>
MD5	B-Algorithm
is	O
one	O
in	O
a	O
series	O
of	O
message	B-Algorithm
digest	I-Algorithm
algorithms	O
designed	O
by	O
Professor	O
Ronald	O
Rivest	O
of	O
MIT	O
(	O
Rivest	O
,	O
1992	O
)	O
.	O
</s>
<s>
When	O
analytic	O
work	O
indicated	O
that	O
MD5	B-Algorithm
's	O
predecessor	O
MD4	B-Algorithm
was	O
likely	O
to	O
be	O
insecure	O
,	O
Rivest	O
designed	O
MD5	B-Algorithm
in	O
1991	O
as	O
a	O
secure	O
replacement	O
.	O
</s>
<s>
(	O
Hans	O
Dobbertin	O
did	O
indeed	O
later	O
find	O
weaknesses	O
in	O
MD4	B-Algorithm
.	O
)	O
</s>
<s>
In	O
1993	O
,	O
Den	O
Boer	O
and	O
Bosselaers	O
gave	O
an	O
early	O
,	O
although	O
limited	O
,	O
result	O
of	O
finding	O
a	O
"	O
pseudo-collision	B-Algorithm
"	O
of	O
the	O
MD5	B-Algorithm
compression	B-Algorithm
function	I-Algorithm
;	O
that	O
is	O
,	O
two	O
different	O
initialization	B-Algorithm
vectors	I-Algorithm
that	O
produce	O
an	O
identical	O
digest	O
.	O
</s>
<s>
In	O
1996	O
,	O
Dobbertin	O
announced	O
a	O
collision	O
of	O
the	O
compression	B-Algorithm
function	I-Algorithm
of	O
MD5	B-Algorithm
(	O
Dobbertin	O
,	O
1996	O
)	O
.	O
</s>
<s>
While	O
this	O
was	O
not	O
an	O
attack	O
on	O
the	O
full	O
MD5	B-Algorithm
hash	I-Algorithm
function	O
,	O
it	O
was	O
close	O
enough	O
for	O
cryptographers	O
to	O
recommend	O
switching	O
to	O
a	O
replacement	O
,	O
such	O
as	O
SHA-1	B-Algorithm
(	O
also	O
compromised	O
since	O
)	O
or	O
RIPEMD-160	B-Algorithm
.	O
</s>
<s>
The	O
size	O
of	O
the	O
hash	B-Error_Name
value	I-Error_Name
(	O
128	O
bits	O
)	O
is	O
small	O
enough	O
to	O
contemplate	O
a	O
birthday	O
attack	O
.	O
</s>
<s>
MD5CRK	B-Operating_System
was	O
a	O
distributed	B-Architecture
project	I-Architecture
started	O
in	O
March	O
2004	O
to	O
demonstrate	O
that	O
MD5	B-Algorithm
is	O
practically	O
insecure	O
by	O
finding	O
a	O
collision	O
using	O
a	O
birthday	O
attack	O
.	O
</s>
<s>
MD5CRK	B-Operating_System
ended	O
shortly	O
after	O
17	O
August	O
2004	O
,	O
when	O
collisions	B-Algorithm
for	O
the	O
full	O
MD5	B-Algorithm
were	O
announced	O
by	O
Xiaoyun	O
Wang	O
,	O
Dengguo	O
Feng	O
,	O
Xuejia	O
Lai	O
,	O
and	O
Hongbo	O
Yu	O
.	O
</s>
<s>
On	O
1	O
March	O
2005	O
,	O
Arjen	O
Lenstra	O
,	O
Xiaoyun	O
Wang	O
,	O
and	O
Benne	O
de	O
Weger	O
demonstrated	O
construction	O
of	O
two	O
X.509	O
certificates	O
with	O
different	O
public	O
keys	O
and	O
the	O
same	O
MD5	B-Algorithm
hash	I-Algorithm
value	O
,	O
a	O
demonstrably	O
practical	O
collision	O
.	O
</s>
<s>
A	O
few	O
days	O
later	O
,	O
Vlastimil	O
Klima	O
described	O
an	O
improved	O
algorithm	O
,	O
able	O
to	O
construct	O
MD5	B-Algorithm
collisions	B-Algorithm
in	O
a	O
few	O
hours	O
on	O
a	O
single	O
notebook	O
computer	O
.	O
</s>
<s>
Various	O
MD5-related	O
RFC	O
errata	O
have	O
been	O
published	O
.	O
</s>
<s>
In	O
2009	O
,	O
the	O
United	O
States	O
Cyber	O
Command	O
used	O
an	O
MD5	B-Algorithm
hash	I-Algorithm
value	O
of	O
their	O
mission	O
statement	O
as	O
a	O
part	O
of	O
their	O
official	O
emblem	O
.	O
</s>
<s>
On	O
24	O
December	O
2010	O
,	O
Tao	O
Xie	O
and	O
Dengguo	O
Feng	O
announced	O
the	O
first	O
published	O
single-block	O
(	O
512-bit	O
)	O
MD5	B-Algorithm
collision	O
.	O
</s>
<s>
They	O
issued	O
a	O
challenge	O
to	O
the	O
cryptographic	O
community	O
,	O
offering	O
a	O
US$	O
10,000	O
reward	O
to	O
the	O
first	O
finder	O
of	O
a	O
different	O
64-byte	O
collision	O
before	O
1	O
January	O
2013	O
.	O
</s>
<s>
In	O
2011	O
an	O
informational	O
RFC	O
6151	O
was	O
approved	O
to	O
update	O
the	O
security	O
considerations	O
in	O
MD5	B-Algorithm
and	O
HMAC-MD5	O
.	O
</s>
<s>
One	O
basic	O
requirement	O
of	O
any	O
cryptographic	B-Algorithm
hash	I-Algorithm
function	I-Algorithm
is	O
that	O
it	O
should	O
be	O
computationally	O
infeasible	O
to	O
find	O
two	O
distinct	O
messages	O
that	O
hash	B-Algorithm
to	O
the	O
same	O
value	O
.	O
</s>
<s>
MD5	B-Algorithm
fails	O
this	O
requirement	O
catastrophically	O
;	O
such	O
collisions	B-Algorithm
can	O
be	O
found	O
in	O
seconds	O
on	O
an	O
ordinary	O
home	O
computer	O
.	O
</s>
<s>
On	O
31	O
December	O
2008	O
,	O
the	O
CMU	O
Software	O
Engineering	O
Institute	O
concluded	O
that	O
MD5	B-Algorithm
was	O
essentially	O
"	O
cryptographically	O
broken	O
and	O
unsuitable	O
for	O
further	O
use	O
"	O
.	O
</s>
<s>
The	O
weaknesses	O
of	O
MD5	B-Algorithm
have	O
been	O
exploited	O
in	O
the	O
field	O
,	O
most	O
infamously	O
by	O
the	O
Flame	O
malware	O
in	O
2012	O
.	O
,	O
MD5	B-Algorithm
continues	O
to	O
be	O
widely	O
used	O
,	O
despite	O
its	O
well-documented	O
weaknesses	O
and	O
deprecation	O
by	O
security	O
experts	O
.	O
</s>
<s>
The	O
security	O
of	O
the	O
MD5	B-Algorithm
hash	I-Algorithm
function	O
is	O
severely	O
compromised	O
.	O
</s>
<s>
A	O
collision	B-Algorithm
attack	I-Algorithm
exists	O
that	O
can	O
find	O
collisions	B-Algorithm
within	O
seconds	O
on	O
a	O
computer	O
with	O
a	O
2.6GHz	O
Pentium	O
4	O
processor	O
(	O
complexity	O
of	O
224.1	O
)	O
.	O
</s>
<s>
Further	O
,	O
there	O
is	O
also	O
a	O
chosen-prefix	O
collision	B-Algorithm
attack	I-Algorithm
that	O
can	O
produce	O
a	O
collision	O
for	O
two	O
inputs	O
with	O
specified	O
prefixes	O
within	O
seconds	O
,	O
using	O
off-the-shelf	O
computing	O
hardware	O
(	O
complexity	O
239	O
)	O
.	O
</s>
<s>
The	O
ability	O
to	O
find	O
collisions	B-Algorithm
has	O
been	O
greatly	O
aided	O
by	O
the	O
use	O
of	O
off-the-shelf	O
GPUs	B-Architecture
.	O
</s>
<s>
On	O
an	O
NVIDIA	O
GeForce	O
8400GS	O
graphics	B-Architecture
processor	I-Architecture
,	O
16	O
–	O
18	O
million	O
hashes	B-Algorithm
per	O
second	O
can	O
be	O
computed	O
.	O
</s>
<s>
An	O
NVIDIA	O
GeForce	O
8800	O
Ultra	O
can	O
calculate	O
more	O
than	O
200	O
million	O
hashes	B-Algorithm
per	O
second	O
.	O
</s>
<s>
These	O
hash	B-Algorithm
and	O
collision	B-Algorithm
attacks	I-Algorithm
have	O
been	O
demonstrated	O
in	O
the	O
public	O
in	O
various	O
situations	O
,	O
including	O
colliding	O
document	O
files	O
and	O
digital	O
certificates	O
.	O
</s>
<s>
As	O
of	O
2015	O
,	O
MD5	B-Algorithm
was	O
demonstrated	O
to	O
be	O
still	O
quite	O
widely	O
used	O
,	O
most	O
notably	O
by	O
security	O
research	O
and	O
antivirus	O
companies	O
.	O
</s>
<s>
As	O
of	O
2019	O
,	O
one	O
quarter	O
of	O
widely	O
used	O
content	B-Protocol
management	I-Protocol
systems	I-Protocol
were	O
reported	O
to	O
still	O
use	O
MD5	B-Algorithm
for	O
password	O
hashing	O
.	O
</s>
<s>
In	O
1996	O
,	O
a	O
flaw	O
was	O
found	O
in	O
the	O
design	O
of	O
MD5	B-Algorithm
.	O
</s>
<s>
While	O
it	O
was	O
not	O
deemed	O
a	O
fatal	O
weakness	O
at	O
the	O
time	O
,	O
cryptographers	O
began	O
recommending	O
the	O
use	O
of	O
other	O
algorithms	O
,	O
such	O
as	O
SHA-1	B-Algorithm
,	O
which	O
has	O
since	O
been	O
found	O
to	O
be	O
vulnerable	O
as	O
well	O
.	O
</s>
<s>
In	O
2004	O
it	O
was	O
shown	O
that	O
MD5	B-Algorithm
is	O
not	O
collision-resistant	O
.	O
</s>
<s>
As	O
such	O
,	O
MD5	B-Algorithm
is	O
not	O
suitable	O
for	O
applications	O
like	O
SSL	B-Protocol
certificates	O
or	O
digital	O
signatures	O
that	O
rely	O
on	O
this	O
property	O
for	O
digital	O
security	O
.	O
</s>
<s>
Researchers	O
additionally	O
discovered	O
more	O
serious	O
flaws	O
in	O
MD5	B-Algorithm
,	O
and	O
described	O
a	O
feasible	O
collision	B-Algorithm
attack	I-Algorithm
--	O
a	O
method	O
to	O
create	O
a	O
pair	O
of	O
inputs	O
for	O
which	O
MD5	B-Algorithm
produces	O
identical	O
checksums	B-Algorithm
.	O
</s>
<s>
Further	O
advances	O
were	O
made	O
in	O
breaking	O
MD5	B-Algorithm
in	O
2005	O
,	O
2006	O
,	O
and	O
2007	O
.	O
</s>
<s>
In	O
December	O
2008	O
,	O
a	O
group	O
of	O
researchers	O
used	O
this	O
technique	O
to	O
fake	O
SSL	B-Protocol
certificate	O
validity	O
.	O
</s>
<s>
As	O
of	O
2010	O
,	O
the	O
CMU	O
Software	O
Engineering	O
Institute	O
considers	O
MD5	B-Algorithm
"	O
cryptographically	O
broken	O
and	O
unsuitable	O
for	O
further	O
use	O
"	O
,	O
and	O
most	O
U.S.	O
government	O
applications	O
now	O
require	O
the	O
SHA-2	B-Algorithm
family	O
of	O
hash	B-Algorithm
functions	I-Algorithm
.	O
</s>
<s>
In	O
2012	O
,	O
the	O
Flame	O
malware	O
exploited	O
the	O
weaknesses	O
in	O
MD5	B-Algorithm
to	O
fake	O
a	O
Microsoft	O
digital	O
signature	O
.	O
</s>
<s>
In	O
1996	O
,	O
collisions	B-Algorithm
were	O
found	O
in	O
the	O
compression	B-Algorithm
function	I-Algorithm
of	O
MD5	B-Algorithm
,	O
and	O
Hans	O
Dobbertin	O
wrote	O
in	O
the	O
RSA	O
Laboratories	O
technical	O
newsletter	O
,	O
"	O
The	O
presented	O
attack	O
does	O
not	O
yet	O
threaten	O
practical	O
applications	O
of	O
MD5	B-Algorithm
,	O
but	O
it	O
comes	O
rather	O
close	O
...	O
in	O
the	O
future	O
MD5	B-Algorithm
should	O
no	O
longer	O
be	O
implemented	O
...	O
where	O
a	O
collision-resistant	O
hash	B-Algorithm
function	I-Algorithm
is	O
required.	O
"	O
</s>
<s>
In	O
2005	O
,	O
researchers	O
were	O
able	O
to	O
create	O
pairs	O
of	O
PostScript	B-Language
documents	O
and	O
X.509	O
certificates	O
with	O
the	O
same	O
hash	B-Algorithm
.	O
</s>
<s>
Later	O
that	O
year	O
,	O
MD5	B-Algorithm
's	O
designer	O
Ron	O
Rivest	O
wrote	O
that	O
"	O
md5	B-Algorithm
and	O
sha1	B-Algorithm
are	O
both	O
clearly	O
broken	O
(	O
in	O
terms	O
of	O
collision-resistance	O
)	O
"	O
.	O
</s>
<s>
On	O
30	O
December	O
2008	O
,	O
a	O
group	O
of	O
researchers	O
announced	O
at	O
the	O
25th	O
Chaos	O
Communication	O
Congress	O
how	O
they	O
had	O
used	O
MD5	B-Algorithm
collisions	B-Algorithm
to	O
create	O
an	O
intermediate	B-Architecture
certificate	I-Architecture
authority	I-Architecture
certificate	O
that	O
appeared	O
to	O
be	O
legitimate	O
when	O
checked	O
by	O
its	O
MD5	B-Algorithm
hash	I-Algorithm
.	O
</s>
<s>
The	O
researchers	O
used	O
a	O
PS3	B-General_Concept
cluster	I-General_Concept
at	O
the	O
EPFL	O
in	O
Lausanne	O
,	O
Switzerland	O
to	O
change	O
a	O
normal	O
SSL	B-Protocol
certificate	O
issued	O
by	O
RapidSSL	O
into	O
a	O
working	O
CA	B-Architecture
certificate	I-Architecture
for	O
that	O
issuer	O
,	O
which	O
could	O
then	O
be	O
used	O
to	O
create	O
other	O
certificates	O
that	O
would	O
appear	O
to	O
be	O
legitimate	O
and	O
issued	O
by	O
RapidSSL	O
.	O
</s>
<s>
VeriSign	B-Application
,	O
the	O
issuers	O
of	O
RapidSSL	O
certificates	O
,	O
said	O
they	O
stopped	O
issuing	O
new	O
certificates	O
using	O
MD5	B-Algorithm
as	O
their	O
checksum	B-Algorithm
algorithm	I-Algorithm
for	O
RapidSSL	O
once	O
the	O
vulnerability	O
was	O
announced	O
.	O
</s>
<s>
Although	O
Verisign	B-Application
declined	O
to	O
revoke	O
existing	O
certificates	O
signed	O
using	O
MD5	B-Algorithm
,	O
their	O
response	O
was	O
considered	O
adequate	O
by	O
the	O
authors	O
of	O
the	O
exploit	O
(	O
Alexander	O
Sotirov	O
,	O
Marc	O
Stevens	O
,	O
Jacob	O
Appelbaum	O
,	O
Arjen	O
Lenstra	O
,	O
David	O
Molnar	O
,	O
Dag	O
Arne	O
Osvik	O
,	O
and	O
Benne	O
de	O
Weger	O
)	O
.	O
</s>
<s>
Bruce	O
Schneier	O
wrote	O
of	O
the	O
attack	O
that	O
"	O
we	O
already	O
knew	O
that	O
MD5	B-Algorithm
is	O
a	O
broken	O
hash	B-Algorithm
function	I-Algorithm
"	O
and	O
that	O
"	O
no	O
one	O
should	O
be	O
using	O
MD5	B-Algorithm
anymore	O
"	O
.	O
</s>
<s>
The	O
SSL	B-Protocol
researchers	O
wrote	O
,	O
"	O
Our	O
desired	O
impact	O
is	O
that	O
Certification	B-Architecture
Authorities	I-Architecture
will	O
stop	O
using	O
MD5	B-Algorithm
in	O
issuing	O
new	O
certificates	O
.	O
</s>
<s>
We	O
also	O
hope	O
that	O
use	O
of	O
MD5	B-Algorithm
in	O
other	O
applications	O
will	O
be	O
reconsidered	O
as	O
well.	O
"	O
</s>
<s>
In	O
2012	O
,	O
according	O
to	O
Microsoft	O
,	O
the	O
authors	O
of	O
the	O
Flame	O
malware	O
used	O
an	O
MD5	B-Algorithm
collision	O
to	O
forge	O
a	O
Windows	O
code-signing	O
certificate	O
.	O
</s>
<s>
MD5	B-Algorithm
uses	O
the	O
Merkle	B-Algorithm
–	I-Algorithm
Damgård	I-Algorithm
construction	I-Algorithm
,	O
so	O
if	O
two	O
prefixes	O
with	O
the	O
same	O
hash	B-Algorithm
can	O
be	O
constructed	O
,	O
a	O
common	O
suffix	O
can	O
be	O
added	O
to	O
both	O
to	O
make	O
the	O
collision	O
more	O
likely	O
to	O
be	O
accepted	O
as	O
valid	O
data	O
by	O
the	O
application	O
using	O
it	O
.	O
</s>
<s>
All	O
the	O
attacker	O
needs	O
to	O
generate	O
two	O
colliding	O
files	O
is	O
a	O
template	O
file	O
with	O
a	O
128-byte	O
block	O
of	O
data	O
,	O
aligned	O
on	O
a	O
64-byte	O
boundary	O
,	O
that	O
can	O
be	O
changed	O
freely	O
by	O
the	O
collision-finding	O
algorithm	O
.	O
</s>
<s>
An	O
example	O
MD5	B-Algorithm
collision	O
,	O
with	O
the	O
two	O
messages	O
differing	O
in	O
6	O
bits	O
,	O
is	O
:	O
</s>
<s>
Both	O
produce	O
the	O
MD5	B-Algorithm
hash	I-Algorithm
79054025255fb1a26e4bc422aef54eb4	O
.	O
</s>
<s>
For	O
example	O
,	O
the	O
20th	O
byte	B-Application
(	O
offset	O
0x13	O
)	O
in	O
the	O
top	O
sample	O
,	O
0x87	O
,	O
is	O
10000111	O
in	O
binary	O
.	O
</s>
<s>
The	O
leading	O
bit	O
in	O
the	O
byte	B-Application
(	O
also	O
the	O
leading	O
bit	O
in	O
the	O
first	O
nibble	O
)	O
is	O
flipped	O
to	O
make	O
00000111	O
,	O
which	O
is	O
0x07	O
,	O
as	O
shown	O
in	O
the	O
lower	O
sample	O
.	O
</s>
<s>
Later	O
it	O
was	O
also	O
found	O
to	O
be	O
possible	O
to	O
construct	O
collisions	B-Algorithm
between	O
two	O
files	O
with	O
separately	O
chosen	O
prefixes	O
.	O
</s>
<s>
This	O
technique	O
was	O
used	O
in	O
the	O
creation	O
of	O
the	O
rogue	O
CA	B-Architecture
certificate	I-Architecture
in	O
2008	O
.	O
</s>
<s>
A	O
new	O
variant	O
of	O
parallelized	O
collision	O
searching	O
using	O
MPI	B-Application
was	O
proposed	O
by	O
Anton	O
Kuznetsov	O
in	O
2014	O
,	O
which	O
allowed	O
finding	O
a	O
collision	O
in	O
11	O
hours	O
on	O
a	O
computing	O
cluster	O
.	O
</s>
<s>
In	O
April	O
2009	O
,	O
an	O
attack	O
against	O
MD5	B-Algorithm
was	O
published	O
that	O
breaks	O
MD5	B-Algorithm
's	O
preimage	O
resistance	O
.	O
</s>
<s>
MD5	B-Algorithm
digests	O
have	O
been	O
widely	O
used	O
in	O
the	O
software	O
world	O
to	O
provide	O
some	O
assurance	O
that	O
a	O
transferred	O
file	O
has	O
arrived	O
intact	O
.	O
</s>
<s>
For	O
example	O
,	O
file	O
servers	O
often	O
provide	O
a	O
pre-computed	O
MD5	B-Algorithm
(	O
known	O
as	O
md5sum	B-Device
)	O
checksum	B-Algorithm
for	O
the	O
files	O
,	O
so	O
that	O
a	O
user	O
can	O
compare	O
the	O
checksum	B-Algorithm
of	O
the	O
downloaded	O
file	O
to	O
it	O
.	O
</s>
<s>
Most	O
unix-based	O
operating	O
systems	O
include	O
MD5	B-Algorithm
sum	O
utilities	O
in	O
their	O
distribution	O
packages	O
;	O
Windows	O
users	O
may	O
use	O
the	O
included	O
PowerShell	B-Application
function	O
"	O
Get-FileHash	O
"	O
,	O
install	O
a	O
Microsoft	O
utility	O
,	O
or	O
use	O
third-party	O
applications	O
.	O
</s>
<s>
Android	O
ROMs	O
also	O
use	O
this	O
type	O
of	O
checksum	B-Algorithm
.	O
</s>
<s>
As	O
it	O
is	O
easy	O
to	O
generate	O
MD5	B-Algorithm
collisions	B-Algorithm
,	O
it	O
is	O
possible	O
for	O
the	O
person	O
who	O
created	O
the	O
file	O
to	O
create	O
a	O
second	O
file	O
with	O
the	O
same	O
checksum	B-Algorithm
,	O
so	O
this	O
technique	O
cannot	O
protect	O
against	O
some	O
forms	O
of	O
malicious	O
tampering	O
.	O
</s>
<s>
In	O
some	O
cases	O
,	O
the	O
checksum	B-Algorithm
cannot	O
be	O
trusted	O
(	O
for	O
example	O
,	O
if	O
it	O
was	O
obtained	O
over	O
the	O
same	O
channel	O
as	O
the	O
downloaded	O
file	O
)	O
,	O
in	O
which	O
case	O
MD5	B-Algorithm
can	O
only	O
provide	O
error-checking	O
functionality	O
:	O
it	O
will	O
recognize	O
a	O
corrupt	O
or	O
incomplete	O
download	O
,	O
which	O
becomes	O
more	O
likely	O
when	O
downloading	O
larger	O
files	O
.	O
</s>
<s>
Historically	O
,	O
MD5	B-Algorithm
has	O
been	O
used	O
to	O
store	O
a	O
one-way	B-Algorithm
hash	I-Algorithm
of	O
a	O
password	O
,	O
often	O
with	O
key	O
stretching	O
.	O
</s>
<s>
NIST	O
does	O
not	O
include	O
MD5	B-Algorithm
in	O
their	O
list	O
of	O
recommended	O
hashes	B-Algorithm
for	O
password	O
storage	O
.	O
</s>
<s>
MD5	B-Algorithm
is	O
also	O
used	O
in	O
the	O
field	O
of	O
electronic	O
discovery	O
,	O
to	O
provide	O
a	O
unique	O
identifier	O
for	O
each	O
document	O
that	O
is	O
exchanged	O
during	O
the	O
legal	O
discovery	O
process	O
.	O
</s>
<s>
As	O
above	O
,	O
this	O
usage	O
should	O
be	O
discouraged	O
due	O
to	O
the	O
ease	O
of	O
collision	B-Algorithm
attacks	I-Algorithm
.	O
</s>
<s>
MD5	B-Algorithm
processes	O
a	O
variable-length	O
message	O
into	O
a	O
fixed-length	O
output	O
of	O
128	O
bits	O
.	O
</s>
<s>
The	O
input	O
message	O
is	O
broken	O
up	O
into	O
chunks	O
of	O
512-bit	O
blocks	O
(	O
sixteen	O
32-bit	O
words	O
)	O
;	O
the	O
message	O
is	O
padded	B-Algorithm
so	O
that	O
its	O
length	O
is	O
divisible	O
by	O
512	O
.	O
</s>
<s>
The	O
padding	B-Algorithm
works	O
as	O
follows	O
:	O
first	O
,	O
a	O
single	O
bit	O
,	O
1	O
,	O
is	O
appended	O
to	O
the	O
end	O
of	O
the	O
message	O
.	O
</s>
<s>
The	O
main	O
MD5	B-Algorithm
algorithm	O
operates	O
on	O
a	O
128-bit	O
state	O
,	O
divided	O
into	O
four	O
32-bit	O
words	O
,	O
denoted	O
,	O
,	O
,	O
and	O
.	O
</s>
<s>
denote	O
the	O
XOR	B-Application
,	O
AND	O
,	O
OR	O
and	O
NOT	O
operations	O
respectively	O
.	O
</s>
<s>
The	O
MD5	B-Algorithm
hash	I-Algorithm
is	O
calculated	O
according	O
to	O
this	O
algorithm	O
.	O
</s>
<s>
//	O
Notice	O
:	O
the	O
input	O
bytes	B-Application
are	O
considered	O
as	O
bit	O
strings	O
,	O
</s>
<s>
//	O
where	O
the	O
first	O
bit	O
is	O
the	O
most	O
significant	O
bit	O
of	O
the	O
byte	B-Application
.	O
</s>
<s>
//	O
and	O
pad	O
with	O
0x00	O
bytes	B-Application
so	O
that	O
the	O
message	O
length	O
in	O
bytes	B-Application
≡	O
56	O
(	O
mod	O
64	O
)	O
.	O
</s>
<s>
//	O
Initialize	O
hash	B-Error_Name
value	I-Error_Name
for	O
this	O
chunk	O
:	O
</s>
<s>
//	O
Add	O
this	O
chunk	O
's	O
hash	B-Algorithm
to	O
result	O
so	O
far	O
:	O
</s>
<s>
The	O
128-bit	O
(	O
16-byte	O
)	O
MD5	B-Algorithm
hashes	I-Algorithm
(	O
also	O
termed	O
message	B-Algorithm
digests	I-Algorithm
)	O
are	O
typically	O
represented	O
as	O
a	O
sequence	O
of	O
32	O
hexadecimal	O
digits	O
.	O
</s>
<s>
The	O
following	O
demonstrates	O
a	O
43-byte	O
ASCII	B-Protocol
input	O
and	O
the	O
corresponding	O
MD5	B-Algorithm
hash	I-Algorithm
:	O
</s>
<s>
Even	O
a	O
small	O
change	O
in	O
the	O
message	O
will	O
(	O
with	O
overwhelming	O
probability	O
)	O
result	O
in	O
a	O
mostly	O
different	O
hash	B-Algorithm
,	O
due	O
to	O
the	O
avalanche	O
effect	O
.	O
</s>
<s>
The	O
hash	B-Algorithm
of	O
the	O
zero-length	O
string	O
is	O
:	O
</s>
<s>
The	O
MD5	B-Algorithm
algorithm	O
is	O
specified	O
for	O
messages	O
consisting	O
of	O
any	O
number	O
of	O
bits	O
;	O
it	O
is	O
not	O
limited	O
to	O
multiples	O
of	O
eight	O
bits	O
(	O
octets	O
,	O
bytes	B-Application
)	O
.	O
</s>
<s>
Some	O
MD5	B-Algorithm
implementations	O
such	O
as	O
md5sum	B-Device
might	O
be	O
limited	O
to	O
octets	O
,	O
or	O
they	O
might	O
not	O
support	O
streaming	O
for	O
messages	O
of	O
an	O
initially	O
undetermined	O
length	O
.	O
</s>
<s>
Below	O
is	O
a	O
list	O
of	O
cryptography	O
libraries	O
that	O
support	O
MD5	B-Algorithm
:	O
</s>
