<s>
In	O
cryptography	O
,	O
SHA-1	B-Algorithm
(	O
Secure	O
Hash	B-Error_Name
Algorithm	I-Error_Name
1	O
)	O
is	O
a	O
hash	B-Algorithm
function	I-Algorithm
which	O
takes	O
an	O
input	O
and	O
produces	O
a	O
160-bit	O
(	O
20-byte	O
)	O
hash	B-Error_Name
value	I-Error_Name
known	O
as	O
a	O
message	B-Algorithm
digest	I-Algorithm
–	O
typically	O
rendered	O
as	O
40	O
hexadecimal	O
digits	O
.	O
</s>
<s>
Since	O
2005	O
,	O
SHA-1	B-Algorithm
has	O
not	O
been	O
considered	O
secure	O
against	O
well-funded	O
opponents	O
;	O
as	O
of	O
2010	O
many	O
organizations	O
have	O
recommended	O
its	O
replacement	O
.	O
</s>
<s>
NIST	O
formally	O
deprecated	O
use	O
of	O
SHA-1	B-Algorithm
in	O
2011	O
and	O
disallowed	O
its	O
use	O
for	O
digital	O
signatures	O
in	O
2013	O
,	O
and	O
declared	O
that	O
it	O
should	O
be	O
phased	O
out	O
by	O
2030	O
.	O
,	O
chosen-prefix	O
attacks	O
against	O
SHA-1	B-Algorithm
are	O
practical	O
.	O
</s>
<s>
As	O
such	O
,	O
it	O
is	O
recommended	O
to	O
remove	O
SHA-1	B-Algorithm
from	O
products	O
as	O
soon	O
as	O
possible	O
and	O
instead	O
use	O
SHA-2	B-Algorithm
or	O
SHA-3	B-Algorithm
.	O
</s>
<s>
Replacing	O
SHA-1	B-Algorithm
is	O
urgent	O
where	O
it	O
is	O
used	O
for	O
digital	O
signatures	O
.	O
</s>
<s>
All	O
major	O
web	B-Application
browser	I-Application
vendors	O
ceased	O
acceptance	O
of	O
SHA-1	B-Algorithm
SSL	B-Protocol
certificates	O
in	O
2017	O
.	O
</s>
<s>
In	O
February	O
2017	O
,	O
CWI	O
Amsterdam	O
and	O
Google	B-Application
announced	O
they	O
had	O
performed	O
a	O
collision	B-Algorithm
attack	I-Algorithm
against	O
SHA-1	B-Algorithm
,	O
publishing	O
two	O
dissimilar	O
PDF	O
files	O
which	O
produced	O
the	O
same	O
SHA-1	B-Algorithm
hash	I-Algorithm
.	O
</s>
<s>
However	O
,	O
SHA-1	B-Algorithm
is	O
still	O
secure	O
for	O
HMAC	B-Algorithm
.	O
</s>
<s>
Microsoft	O
has	O
discontinued	O
SHA-1	B-Algorithm
code	O
signing	O
support	O
for	O
Windows	O
Update	O
on	O
August	O
7	O
,	O
2020	O
.	O
</s>
<s>
SHA-1	B-Algorithm
produces	O
a	O
message	B-Algorithm
digest	I-Algorithm
based	O
on	O
principles	O
similar	O
to	O
those	O
used	O
by	O
Ronald	O
L	O
.	O
Rivest	O
of	O
MIT	O
in	O
the	O
design	O
of	O
the	O
MD2	B-Algorithm
,	O
MD4	B-Algorithm
and	O
MD5	B-Algorithm
message	B-Algorithm
digest	I-Algorithm
algorithms	O
,	O
but	O
generates	O
a	O
larger	O
hash	B-Error_Name
value	I-Error_Name
(	O
160	O
bits	O
vs.	O
128	O
bits	O
)	O
.	O
</s>
<s>
SHA-1	B-Algorithm
was	O
developed	O
as	O
part	O
of	O
the	O
U.S.	O
Government	O
's	O
Capstone	O
project	O
.	O
</s>
<s>
The	O
original	O
specification	O
of	O
the	O
algorithm	O
was	O
published	O
in	O
1993	O
under	O
the	O
title	O
Secure	O
Hash	B-Algorithm
Standard	O
,	O
FIPS	O
PUB	O
180	O
,	O
by	O
U.S.	O
government	O
standards	O
agency	O
NIST	O
(	O
National	O
Institute	O
of	O
Standards	O
and	O
Technology	O
)	O
.	O
</s>
<s>
This	O
version	O
is	O
now	O
often	O
named	O
SHA-0	B-Algorithm
.	O
</s>
<s>
It	O
was	O
withdrawn	O
by	O
the	O
NSA	O
shortly	O
after	O
publication	O
and	O
was	O
superseded	O
by	O
the	O
revised	O
version	O
,	O
published	O
in	O
1995	O
in	O
FIPS	O
PUB	O
180-1	O
and	O
commonly	O
designated	O
SHA-1	B-Algorithm
.	O
</s>
<s>
SHA-1	B-Algorithm
differs	O
from	O
SHA-0	B-Algorithm
only	O
by	O
a	O
single	O
bitwise	O
rotation	O
in	O
the	O
message	O
schedule	O
of	O
its	O
compression	B-Algorithm
function	I-Algorithm
.	O
</s>
<s>
Publicly	O
available	O
techniques	O
did	O
indeed	O
demonstrate	O
a	O
compromise	O
of	O
SHA-0	B-Algorithm
,	O
in	O
2004	O
,	O
before	O
SHA-1	B-Algorithm
in	O
2017	O
(	O
see	O
§Attacks	O
)	O
.	O
</s>
<s>
SHA-1	B-Algorithm
forms	O
part	O
of	O
several	O
widely	O
used	O
security	O
applications	O
and	O
protocols	O
,	O
including	O
TLS	B-Protocol
and	O
SSL	B-Protocol
,	O
PGP	B-Application
,	O
SSH	B-Protocol
,	O
S/MIME	B-Protocol
,	O
and	O
IPsec	B-Protocol
.	O
</s>
<s>
Those	O
applications	O
can	O
also	O
use	O
MD5	B-Algorithm
;	O
both	O
MD5	B-Algorithm
and	O
SHA-1	B-Algorithm
are	O
descended	O
from	O
MD4	B-Algorithm
.	O
</s>
<s>
SHA-1	B-Algorithm
and	O
SHA-2	B-Algorithm
are	O
the	O
hash	B-Error_Name
algorithms	I-Error_Name
required	O
by	O
law	O
for	O
use	O
in	O
certain	O
U.S.	O
government	O
applications	O
,	O
including	O
use	O
within	O
other	O
cryptographic	O
algorithms	O
and	O
protocols	O
,	O
for	O
the	O
protection	O
of	O
sensitive	O
unclassified	O
information	O
.	O
</s>
<s>
FIPS	O
PUB	O
180-1	O
also	O
encouraged	O
adoption	O
and	O
use	O
of	O
SHA-1	B-Algorithm
by	O
private	O
and	O
commercial	O
organizations	O
.	O
</s>
<s>
SHA-1	B-Algorithm
is	O
being	O
retired	O
from	O
most	O
government	O
uses	O
;	O
the	O
U.S.	O
National	O
Institute	O
of	O
Standards	O
and	O
Technology	O
said	O
,	O
"	O
Federal	O
agencies	O
should	O
stop	O
using	O
SHA-1	B-Algorithm
for	O
...	O
applications	O
that	O
require	O
collision	O
resistance	O
as	O
soon	O
as	O
practical	O
,	O
and	O
must	O
use	O
the	O
SHA-2	B-Algorithm
family	O
of	O
hash	B-Algorithm
functions	I-Algorithm
for	O
these	O
applications	O
after	O
2010	O
"	O
(	O
emphasis	O
in	O
original	O
)	O
,	O
though	O
that	O
was	O
later	O
relaxed	O
to	O
allow	O
SHA-1	B-Algorithm
to	O
be	O
used	O
for	O
verifying	O
old	O
digital	O
signatures	O
and	O
time	O
stamps	O
.	O
</s>
<s>
A	O
prime	O
motivation	O
for	O
the	O
publication	O
of	O
the	O
Secure	O
Hash	B-Error_Name
Algorithm	I-Error_Name
was	O
the	O
Digital	O
Signature	O
Standard	O
,	O
in	O
which	O
it	O
is	O
incorporated	O
.	O
</s>
<s>
The	O
SHA	O
hash	B-Algorithm
functions	I-Algorithm
have	O
been	O
used	O
for	O
the	O
basis	O
of	O
the	O
SHACAL	B-Algorithm
block	O
ciphers	O
.	O
</s>
<s>
Revision	B-Architecture
control	I-Architecture
systems	I-Architecture
such	O
as	O
Git	B-Application
,	O
Mercurial	B-Protocol
,	O
and	O
Monotone	B-Application
use	O
SHA-1	B-Algorithm
,	O
not	O
for	O
security	O
,	O
but	O
to	O
identify	O
revisions	O
and	O
to	O
ensure	O
that	O
the	O
data	O
has	O
not	O
changed	O
due	O
to	O
accidental	O
corruption	O
.	O
</s>
<s>
Linus	O
Torvalds	O
said	O
about	O
Git	B-Application
:	O
</s>
<s>
If	O
you	O
have	O
disk	O
corruption	O
,	O
if	O
you	O
have	O
DRAM	O
corruption	O
,	O
if	O
you	O
have	O
any	O
kind	O
of	O
problems	O
at	O
all	O
,	O
Git	B-Application
will	O
notice	O
them	O
.	O
</s>
<s>
 [ ... ] 	O
Nobody	O
has	O
been	O
able	O
to	O
break	O
SHA-1	B-Algorithm
,	O
but	O
the	O
point	O
is	O
the	O
SHA-1	B-Algorithm
,	O
as	O
far	O
as	O
Git	B-Application
is	O
concerned	O
,	O
is	O
n't	O
even	O
a	O
security	O
feature	O
.	O
</s>
<s>
The	O
security	O
parts	O
are	O
elsewhere	O
,	O
so	O
a	O
lot	O
of	O
people	O
assume	O
that	O
since	O
Git	B-Application
uses	O
SHA-1	B-Algorithm
and	O
SHA-1	B-Algorithm
is	O
used	O
for	O
cryptographically	O
secure	O
stuff	O
,	O
they	O
think	O
that	O
,	O
Okay	O
,	O
it	O
's	O
a	O
huge	O
security	O
feature	O
.	O
</s>
<s>
It	O
has	O
nothing	O
at	O
all	O
to	O
do	O
with	O
security	O
,	O
it	O
's	O
just	O
the	O
best	O
hash	B-Algorithm
you	O
can	O
get	O
.	O
</s>
<s>
I	O
guarantee	O
you	O
,	O
if	O
you	O
put	O
your	O
data	O
in	O
Git	B-Application
,	O
you	O
can	O
trust	O
the	O
fact	O
that	O
five	O
years	O
later	O
,	O
after	O
it	O
was	O
converted	O
from	O
your	O
hard	O
disk	O
to	O
DVD	O
to	O
whatever	O
new	O
technology	O
and	O
you	O
copied	O
it	O
along	O
,	O
five	O
years	O
later	O
you	O
can	O
verify	O
that	O
the	O
data	O
you	O
get	O
back	O
out	O
is	O
the	O
exact	O
same	O
data	O
you	O
put	O
in	O
.	O
</s>
<s>
One	O
of	O
the	O
reasons	O
I	O
care	O
is	O
for	O
the	O
kernel	O
,	O
we	O
had	O
a	O
break	O
in	O
on	O
one	O
of	O
the	O
BitKeeper	B-Protocol
sites	O
where	O
people	O
tried	O
to	O
corrupt	O
the	O
kernel	O
source	O
code	O
repositories	O
.	O
</s>
<s>
However	O
Git	B-Application
does	O
not	O
require	O
the	O
second	O
preimage	O
resistance	O
of	O
SHA-1	B-Algorithm
as	O
a	O
security	O
feature	O
,	O
since	O
it	O
will	O
always	O
prefer	O
to	O
keep	O
the	O
earliest	O
version	O
of	O
an	O
object	O
in	O
case	O
of	O
collision	O
,	O
preventing	O
an	O
attacker	O
from	O
surreptitiously	O
overwriting	O
files	O
.	O
</s>
<s>
For	O
a	O
hash	B-Algorithm
function	I-Algorithm
for	O
which	O
L	O
is	O
the	O
number	O
of	O
bits	O
in	O
the	O
message	B-Algorithm
digest	I-Algorithm
,	O
finding	O
a	O
message	O
that	O
corresponds	O
to	O
a	O
given	O
message	B-Algorithm
digest	I-Algorithm
can	O
always	O
be	O
done	O
using	O
a	O
brute	B-Algorithm
force	I-Algorithm
search	I-Algorithm
in	O
approximately	O
2L	O
evaluations	O
.	O
</s>
<s>
However	O
,	O
a	O
collision	O
,	O
consisting	O
of	O
finding	O
two	O
different	O
messages	O
that	O
produce	O
the	O
same	O
message	B-Algorithm
digest	I-Algorithm
,	O
requires	O
on	O
average	O
only	O
about	O
evaluations	O
using	O
a	O
birthday	O
attack	O
.	O
</s>
<s>
Thus	O
the	O
strength	O
of	O
a	O
hash	B-Algorithm
function	I-Algorithm
is	O
usually	O
compared	O
to	O
a	O
symmetric	O
cipher	O
of	O
half	O
the	O
message	B-Algorithm
digest	I-Algorithm
length	O
.	O
</s>
<s>
SHA-1	B-Algorithm
,	O
which	O
has	O
a	O
160-bit	O
message	B-Algorithm
digest	I-Algorithm
,	O
was	O
originally	O
thought	O
to	O
have	O
80-bit	O
strength	O
.	O
</s>
<s>
Some	O
of	O
the	O
applications	O
that	O
use	O
cryptographic	B-Algorithm
hashes	I-Algorithm
,	O
like	O
password	O
storage	O
,	O
are	O
only	O
minimally	O
affected	O
by	O
a	O
collision	B-Algorithm
attack	I-Algorithm
.	O
</s>
<s>
Constructing	O
a	O
password	O
that	O
works	O
for	O
a	O
given	O
account	O
requires	O
a	O
preimage	O
attack	O
,	O
as	O
well	O
as	O
access	O
to	O
the	O
hash	B-Algorithm
of	O
the	O
original	O
password	O
,	O
which	O
may	O
or	O
may	O
not	O
be	O
trivial	O
.	O
</s>
<s>
(	O
However	O
,	O
even	O
a	O
secure	O
password	O
hash	B-Algorithm
ca	O
n't	O
prevent	O
brute-force	O
attacks	O
on	O
weak	O
passwords	O
.	O
)	O
</s>
<s>
There	O
are	O
practical	O
circumstances	O
in	O
which	O
this	O
is	O
possible	O
;	O
until	O
the	O
end	O
of	O
2008	O
,	O
it	O
was	O
possible	O
to	O
create	O
forged	O
SSL	B-Protocol
certificates	O
using	O
an	O
MD5	B-Algorithm
collision	O
.	O
</s>
<s>
Due	O
to	O
the	O
block	O
and	O
iterative	O
structure	O
of	O
the	O
algorithms	O
and	O
the	O
absence	O
of	O
additional	O
final	O
steps	O
,	O
all	O
SHA	O
functions	O
(	O
except	O
SHA-3	B-Algorithm
)	O
are	O
vulnerable	O
to	O
length-extension	O
and	O
partial-message	O
collision	B-Algorithm
attacks	I-Algorithm
.	O
</s>
<s>
These	O
attacks	O
allow	O
an	O
attacker	O
to	O
forge	O
a	O
message	O
signed	O
only	O
by	O
a	O
keyed	O
hash	B-Algorithm
–	O
or	O
–	O
by	O
extending	O
the	O
message	O
and	O
recalculating	O
the	O
hash	B-Algorithm
without	O
knowing	O
the	O
key	O
.	O
</s>
<s>
A	O
simple	O
improvement	O
to	O
prevent	O
these	O
attacks	O
is	O
to	O
hash	B-Algorithm
twice	O
:	O
(	O
the	O
length	O
of	O
0b	O
,	O
zero	O
block	O
,	O
is	O
equal	O
to	O
the	O
block	O
size	O
of	O
the	O
hash	B-Algorithm
function	I-Algorithm
)	O
.	O
</s>
<s>
At	O
CRYPTO	O
98	O
,	O
two	O
French	O
researchers	O
,	O
Florent	O
Chabaud	O
and	O
Antoine	O
Joux	O
,	O
presented	O
an	O
attack	O
on	O
SHA1	B-Algorithm
:	O
collisions	B-Algorithm
can	O
be	O
found	O
with	O
complexity	O
261	O
,	O
fewer	O
than	O
the	O
280	O
for	O
an	O
ideal	O
hash	B-Algorithm
function	I-Algorithm
of	O
the	O
same	O
size	O
.	O
</s>
<s>
In	O
2004	O
,	O
Biham	O
and	O
Chen	O
found	O
near-collisions	O
for	O
SHA-0	B-Algorithm
–	O
two	O
messages	O
that	O
hash	B-Algorithm
to	O
nearly	O
the	O
same	O
value	O
;	O
in	O
this	O
case	O
,	O
142	O
out	O
of	O
the	O
160	O
bits	O
are	O
equal	O
.	O
</s>
<s>
They	O
also	O
found	O
full	O
collisions	B-Algorithm
of	O
SHA-0	B-Algorithm
reduced	O
to	O
62	O
out	O
of	O
its	O
80	O
rounds	O
.	O
</s>
<s>
Subsequently	O
,	O
on	O
12	O
August	O
2004	O
,	O
a	O
collision	O
for	O
the	O
full	O
SHA-0	B-Algorithm
algorithm	O
was	O
announced	O
by	O
Joux	O
,	O
Carribault	O
,	O
Lemuet	O
,	O
and	O
Jalby	O
.	O
</s>
<s>
Finding	O
the	O
collision	O
had	O
complexity	O
251	O
and	O
took	O
about	O
80,000	O
processor-hours	O
on	O
a	O
supercomputer	B-Architecture
with	O
256	O
Itanium	O
2	O
processors	O
(	O
equivalent	O
to	O
13	O
days	O
of	O
full-time	O
use	O
of	O
the	O
computer	O
)	O
.	O
</s>
<s>
On	O
17	O
August	O
2004	O
,	O
at	O
the	O
Rump	O
Session	O
of	O
CRYPTO	O
2004	O
,	O
preliminary	O
results	O
were	O
announced	O
by	O
Wang	O
,	O
Feng	O
,	O
Lai	O
,	O
and	O
Yu	O
,	O
about	O
an	O
attack	O
on	O
MD5	B-Algorithm
,	O
SHA-0	B-Algorithm
and	O
other	O
hash	B-Algorithm
functions	I-Algorithm
.	O
</s>
<s>
The	O
complexity	O
of	O
their	O
attack	O
on	O
SHA-0	B-Algorithm
is	O
240	O
,	O
significantly	O
better	O
than	O
the	O
attack	O
by	O
Joux	O
et	O
al	O
.	O
</s>
<s>
In	O
February	O
2005	O
,	O
an	O
attack	O
by	O
Xiaoyun	O
Wang	O
,	O
Yiqun	O
Lisa	O
Yin	O
,	O
and	O
Hongbo	O
Yu	O
was	O
announced	O
which	O
could	O
find	O
collisions	B-Algorithm
in	O
SHA-0	B-Algorithm
in	O
239	O
operations	O
.	O
</s>
<s>
Another	O
attack	O
in	O
2008	O
applying	O
the	O
boomerang	O
attack	O
brought	O
the	O
complexity	O
of	O
finding	O
collisions	B-Algorithm
down	O
to	O
233.6	O
,	O
which	O
was	O
estimated	O
to	O
take	O
1	O
hour	O
on	O
an	O
average	O
PC	O
from	O
the	O
year	O
2008	O
.	O
</s>
<s>
In	O
light	O
of	O
the	O
results	O
for	O
SHA-0	B-Algorithm
,	O
some	O
experts	O
suggested	O
that	O
plans	O
for	O
the	O
use	O
of	O
SHA-1	B-Algorithm
in	O
new	O
cryptosystems	B-General_Concept
should	O
be	O
reconsidered	O
.	O
</s>
<s>
After	O
the	O
CRYPTO	O
2004	O
results	O
were	O
published	O
,	O
NIST	O
announced	O
that	O
they	O
planned	O
to	O
phase	O
out	O
the	O
use	O
of	O
SHA-1	B-Algorithm
by	O
2010	O
in	O
favor	O
of	O
the	O
SHA-2	B-Algorithm
variants	O
.	O
</s>
<s>
In	O
early	O
2005	O
,	O
Vincent	O
Rijmen	O
and	O
Elisabeth	O
Oswald	O
published	O
an	O
attack	O
on	O
a	O
reduced	O
version	O
of	O
SHA-1	B-Algorithm
–	O
53	O
out	O
of	O
80	O
rounds	O
–	O
which	O
finds	O
collisions	B-Algorithm
with	O
a	O
computational	O
effort	O
of	O
fewer	O
than	O
280	O
operations	O
.	O
</s>
<s>
The	O
attacks	O
can	O
find	O
collisions	B-Algorithm
in	O
the	O
full	O
version	O
of	O
SHA-1	B-Algorithm
,	O
requiring	O
fewer	O
than	O
269	O
operations	O
.	O
</s>
<s>
(	O
A	O
brute-force	B-Algorithm
search	I-Algorithm
would	O
require	O
280	O
operations	O
.	O
)	O
</s>
<s>
The	O
authors	O
write	O
:	O
"	O
In	O
particular	O
,	O
our	O
analysis	O
is	O
built	O
upon	O
the	O
original	O
differential	O
attack	O
on	O
SHA-0	B-Algorithm
,	O
the	O
near	O
collision	B-Algorithm
attack	I-Algorithm
on	O
SHA-0	B-Algorithm
,	O
the	O
multiblock	O
collision	O
techniques	O
,	O
as	O
well	O
as	O
the	O
message	O
modification	O
techniques	O
used	O
in	O
the	O
collision	O
search	O
attack	O
on	O
MD5	B-Algorithm
.	O
</s>
<s>
Breaking	O
SHA-1	B-Algorithm
would	O
not	O
be	O
possible	O
without	O
these	O
powerful	O
analytical	O
techniques.	O
"	O
</s>
<s>
The	O
authors	O
have	O
presented	O
a	O
collision	O
for	O
58-round	O
SHA-1	B-Algorithm
,	O
found	O
with	O
233	O
hash	B-Algorithm
operations	O
.	O
</s>
<s>
On	O
17	O
August	O
2005	O
,	O
an	O
improvement	O
on	O
the	O
SHA-1	B-Algorithm
attack	O
was	O
announced	O
on	O
behalf	O
of	O
Xiaoyun	O
Wang	O
,	O
Andrew	O
Yao	O
and	O
Frances	O
Yao	O
at	O
the	O
CRYPTO	O
2005	O
Rump	O
Session	O
,	O
lowering	O
the	O
complexity	O
required	O
for	O
finding	O
a	O
collision	O
in	O
SHA-1	B-Algorithm
to	O
263	O
.	O
</s>
<s>
Christophe	O
De	O
Cannière	O
and	O
Christian	O
Rechberger	O
further	O
improved	O
the	O
attack	O
on	O
SHA-1	B-Algorithm
in	O
"	O
Finding	O
SHA-1	B-Algorithm
Characteristics	O
:	O
General	O
Results	O
and	O
Applications	O
,	O
"	O
receiving	O
the	O
Best	O
Paper	O
Award	O
at	O
ASIACRYPT	O
2006	O
.	O
</s>
<s>
A	O
two-block	O
collision	O
for	O
64-round	O
SHA-1	B-Algorithm
was	O
presented	O
,	O
found	O
using	O
unoptimized	O
methods	O
with	O
235	O
compression	B-Algorithm
function	I-Algorithm
evaluations	O
.	O
</s>
<s>
In	O
order	O
to	O
find	O
an	O
actual	O
collision	O
in	O
the	O
full	O
80	O
rounds	O
of	O
the	O
hash	B-Algorithm
function	I-Algorithm
,	O
however	O
,	O
tremendous	O
amounts	O
of	O
computer	O
time	O
are	O
required	O
.	O
</s>
<s>
To	O
that	O
end	O
,	O
a	O
collision	O
search	O
for	O
SHA-1	B-Algorithm
using	O
the	O
volunteer	O
computing	O
platform	O
BOINC	B-Operating_System
began	O
August	O
8	O
,	O
2007	O
,	O
organized	O
by	O
the	O
Graz	O
University	O
of	O
Technology	O
.	O
</s>
<s>
At	O
the	O
Rump	O
Session	O
of	O
CRYPTO	O
2006	O
,	O
Christian	O
Rechberger	O
and	O
Christophe	O
De	O
Cannière	O
claimed	O
to	O
have	O
discovered	O
a	O
collision	B-Algorithm
attack	I-Algorithm
on	O
SHA-1	B-Algorithm
that	O
would	O
allow	O
an	O
attacker	O
to	O
select	O
at	O
least	O
parts	O
of	O
the	O
message	O
.	O
</s>
<s>
In	O
2008	O
,	O
an	O
attack	O
methodology	O
by	O
Stéphane	O
Manuel	O
reported	O
hash	B-Algorithm
collisions	I-Algorithm
with	O
an	O
estimated	O
theoretical	O
complexity	O
of	O
251	O
to	O
257	O
operations	O
.	O
</s>
<s>
Cameron	O
McDonald	O
,	O
Philip	O
Hawkes	O
and	O
Josef	O
Pieprzyk	O
presented	O
a	O
hash	B-Algorithm
collision	I-Algorithm
attack	O
with	O
claimed	O
complexity	O
252	O
at	O
the	O
Rump	O
Session	O
of	O
Eurocrypt	O
2009	O
.	O
</s>
<s>
However	O
,	O
the	O
accompanying	O
paper	O
,	O
"	O
Differential	O
Path	O
for	O
SHA-1	B-Algorithm
with	O
complexity	O
O(252 )	O
"	O
has	O
been	O
withdrawn	O
due	O
to	O
the	O
authors	O
 '	O
discovery	O
that	O
their	O
estimate	O
was	O
incorrect	O
.	O
</s>
<s>
One	O
attack	O
against	O
SHA-1	B-Algorithm
was	O
Marc	O
Stevens	O
with	O
an	O
estimated	O
cost	O
of	O
$2.77M(2012 )	O
to	O
break	O
a	O
single	O
hash	B-Error_Name
value	I-Error_Name
by	O
renting	O
CPU	O
power	O
from	O
cloud	O
servers	O
.	O
</s>
<s>
On	O
8	O
November	O
2010	O
,	O
he	O
claimed	O
he	O
had	O
a	O
fully	O
working	O
near-collision	O
attack	O
against	O
full	O
SHA-1	B-Algorithm
working	O
with	O
an	O
estimated	O
complexity	O
equivalent	O
to	O
257.5	O
SHA-1	B-Algorithm
compressions	O
.	O
</s>
<s>
On	O
8	O
October	O
2015	O
,	O
Marc	O
Stevens	O
,	O
Pierre	O
Karpman	O
,	O
and	O
Thomas	O
Peyrin	O
published	O
a	O
freestart	O
collision	B-Algorithm
attack	I-Algorithm
on	O
SHA-1	B-Algorithm
'	O
s	O
compression	B-Algorithm
function	I-Algorithm
that	O
requires	O
only	O
257	O
SHA-1	B-Algorithm
evaluations	O
.	O
</s>
<s>
This	O
does	O
not	O
directly	O
translate	O
into	O
a	O
collision	O
on	O
the	O
full	O
SHA-1	B-Algorithm
hash	I-Algorithm
function	O
(	O
where	O
an	O
attacker	O
is	O
not	O
able	O
to	O
freely	O
choose	O
the	O
initial	O
internal	O
state	O
)	O
,	O
but	O
undermines	O
the	O
security	O
claims	O
for	O
SHA-1	B-Algorithm
.	O
</s>
<s>
In	O
particular	O
,	O
it	O
was	O
the	O
first	O
time	O
that	O
an	O
attack	O
on	O
full	O
SHA-1	B-Algorithm
had	O
been	O
demonstrated	O
;	O
all	O
earlier	O
attacks	O
were	O
too	O
expensive	O
for	O
their	O
authors	O
to	O
carry	O
them	O
out	O
.	O
</s>
<s>
The	O
authors	O
named	O
this	O
significant	O
breakthrough	O
in	O
the	O
cryptanalysis	O
of	O
SHA-1	B-Algorithm
The	O
SHAppening	O
.	O
</s>
<s>
The	O
authors	O
estimated	O
that	O
a	O
similar	O
collision	O
could	O
be	O
found	O
by	O
buying	O
US$	O
2,000	O
of	O
GPU	O
time	O
on	O
EC2	B-General_Concept
.	O
</s>
<s>
The	O
authors	O
estimated	O
that	O
the	O
cost	O
of	O
renting	O
enough	O
of	O
EC2	B-General_Concept
CPU/GPU	O
time	O
to	O
generate	O
a	O
full	O
collision	O
for	O
SHA-1	B-Algorithm
at	O
the	O
time	O
of	O
publication	O
was	O
between	O
US$75K	O
and	O
120K	O
,	O
and	O
noted	O
that	O
was	O
well	O
within	O
the	O
budget	O
of	O
criminal	O
organizations	O
,	O
not	O
to	O
mention	O
national	O
intelligence	O
agencies	O
.	O
</s>
<s>
As	O
such	O
,	O
the	O
authors	O
recommended	O
that	O
SHA-1	B-Algorithm
be	O
deprecated	O
as	O
quickly	O
as	O
possible	O
.	O
</s>
<s>
On	O
23	O
February	O
2017	O
,	O
the	O
CWI	O
(	O
Centrum	O
Wiskunde	O
&	O
Informatica	O
)	O
and	O
Google	B-Application
announced	O
the	O
SHAttered	O
attack	O
,	O
in	O
which	O
they	O
generated	O
two	O
different	O
PDF	O
files	O
with	O
the	O
same	O
SHA-1	B-Algorithm
hash	I-Algorithm
in	O
roughly	O
263.1	O
SHA-1	B-Algorithm
evaluations	O
.	O
</s>
<s>
This	O
attack	O
is	O
about	O
100,000	O
times	O
faster	O
than	O
brute	O
forcing	O
a	O
SHA-1	B-Algorithm
collision	O
with	O
a	O
birthday	O
attack	O
,	O
which	O
was	O
estimated	O
to	O
take	O
280	O
SHA-1	B-Algorithm
evaluations	O
.	O
</s>
<s>
On	O
24	O
April	O
2019	O
a	O
paper	O
by	O
Gaëtan	O
Leurent	O
and	O
Thomas	O
Peyrin	O
presented	O
at	O
Eurocrypt	O
2019	O
described	O
an	O
enhancement	O
to	O
the	O
previously	O
best	O
chosen-prefix	O
attack	O
in	O
Merkle	B-Algorithm
–	I-Algorithm
Damgård	I-Algorithm
–	O
like	O
digest	O
functions	O
based	O
on	O
Davies	O
–	O
Meyer	O
block	O
ciphers	O
.	O
</s>
<s>
With	O
these	O
improvements	O
,	O
this	O
method	O
is	O
capable	O
of	O
finding	O
chosen-prefix	O
collisions	B-Algorithm
in	O
approximately	O
268	O
SHA-1	B-Algorithm
evaluations	O
.	O
</s>
<s>
This	O
is	O
approximately	O
1	O
billion	O
times	O
faster	O
(	O
and	O
now	O
usable	O
for	O
many	O
targeted	O
attacks	O
,	O
thanks	O
to	O
the	O
possibility	O
of	O
choosing	O
a	O
prefix	O
,	O
for	O
example	O
malicious	O
code	O
or	O
faked	O
identities	O
in	O
signed	O
certificates	O
)	O
than	O
the	O
previous	O
attack	O
's	O
277.1	O
evaluations	O
(	O
but	O
without	O
chosen	O
prefix	O
,	O
which	O
was	O
impractical	O
for	O
most	O
targeted	O
attacks	O
because	O
the	O
found	O
collisions	B-Algorithm
were	O
almost	O
random	O
)	O
and	O
is	O
fast	O
enough	O
to	O
be	O
practical	O
for	O
resourceful	O
attackers	O
,	O
requiring	O
approximately	O
$	O
100,000	O
of	O
cloud	O
processing	O
.	O
</s>
<s>
This	O
method	O
is	O
also	O
capable	O
of	O
finding	O
chosen-prefix	O
collisions	B-Algorithm
in	O
the	O
MD5	B-Algorithm
function	O
,	O
but	O
at	O
a	O
complexity	O
of	O
246.3	O
does	O
not	O
surpass	O
the	O
prior	O
best	O
available	O
method	O
at	O
a	O
theoretical	O
level	O
(	O
239	O
)	O
,	O
though	O
potentially	O
at	O
a	O
practical	O
level	O
( ≤249	O
)	O
.	O
</s>
<s>
In	O
this	O
paper	O
they	O
demonstrate	O
a	O
chosen-prefix	O
collision	B-Algorithm
attack	I-Algorithm
with	O
a	O
complexity	O
of	O
263.4	O
,	O
that	O
at	O
the	O
time	O
of	O
publication	O
would	O
cost	O
45k	O
USD	O
per	O
generated	O
collision	O
.	O
</s>
<s>
Implementations	O
of	O
all	O
FIPS-approved	O
security	O
functions	O
can	O
be	O
officially	O
validated	O
through	O
the	O
CMVP	B-General_Concept
program	I-General_Concept
,	O
jointly	O
run	O
by	O
the	O
National	O
Institute	O
of	O
Standards	O
and	O
Technology	O
(	O
NIST	O
)	O
and	O
the	O
Communications	O
Security	O
Establishment	O
(	O
CSE	O
)	O
.	O
</s>
<s>
For	O
informal	O
verification	O
,	O
a	O
package	O
to	O
generate	O
a	O
high	O
number	O
of	O
test	O
vectors	O
is	O
made	O
available	O
for	O
download	O
on	O
the	O
NIST	O
site	O
;	O
the	O
resulting	O
verification	O
,	O
however	O
,	O
does	O
not	O
replace	O
the	O
formal	O
CMVP	B-General_Concept
validation	O
,	O
which	O
is	O
required	O
by	O
law	O
for	O
certain	O
applications	O
.	O
</s>
<s>
,	O
there	O
are	O
over	O
2000	O
validated	O
implementations	O
of	O
SHA-1	B-Algorithm
,	O
with	O
14	O
of	O
them	O
capable	O
of	O
handling	O
messages	O
with	O
a	O
length	O
in	O
bits	O
not	O
a	O
multiple	O
of	O
eight	O
(	O
see	O
)	O
.	O
</s>
<s>
These	O
are	O
examples	O
of	O
SHA-1	B-Algorithm
message	B-Algorithm
digests	I-Algorithm
in	O
hexadecimal	O
and	O
in	O
Base64	B-Protocol
binary	O
to	O
ASCII	B-Protocol
text	I-Protocol
encoding	O
.	O
</s>
<s>
For	O
example	O
,	O
changing	O
dog	O
to	O
cog	O
produces	O
a	O
hash	B-Algorithm
with	O
different	O
values	O
for	O
81	O
of	O
the	O
160	O
bits	O
:	O
</s>
<s>
The	O
hash	B-Algorithm
of	O
the	O
zero-length	O
string	O
is	O
:	O
</s>
<s>
Pseudocode	B-Language
for	O
the	O
SHA-1	B-Algorithm
algorithm	O
follows	O
:	O
</s>
<s>
hh	O
,	O
the	O
message	B-Algorithm
digest	I-Algorithm
,	O
which	O
is	O
a	O
160-bit	O
quantity	O
.	O
</s>
<s>
Note	O
2	O
:	O
All	O
constants	O
in	O
this	O
pseudo	B-Language
code	I-Language
are	O
in	O
big	O
endian	O
.	O
</s>
<s>
Note	O
3	O
:	O
SHA-0	B-Algorithm
differs	O
by	O
not	O
having	O
this	O
leftrotate	B-Algorithm
.	O
</s>
<s>
Initialize	O
hash	B-Error_Name
value	I-Error_Name
for	O
this	O
chunk	O
:	O
</s>
<s>
Add	O
this	O
chunk	O
's	O
hash	B-Algorithm
to	O
result	O
so	O
far	O
:	O
</s>
<s>
Produce	O
the	O
final	O
hash	B-Error_Name
value	I-Error_Name
(	O
big-endian	O
)	O
as	O
a	O
160-bit	O
number	O
:	O
</s>
<s>
The	O
number	O
hh	O
is	O
the	O
message	B-Algorithm
digest	I-Algorithm
,	O
which	O
can	O
be	O
written	O
in	O
hexadecimal	O
(	O
base	O
16	O
)	O
.	O
</s>
<s>
As	O
well	O
,	O
choosing	O
the	O
square	O
root	O
of	O
10	O
(	O
which	O
is	O
not	O
a	O
prime	O
)	O
made	O
it	O
a	O
common	O
factor	O
for	O
the	O
two	O
other	O
chosen	O
square	O
roots	O
of	O
primes	O
2	O
and	O
5	O
,	O
with	O
possibly	O
usable	O
arithmetic	O
properties	O
across	O
successive	O
rounds	O
,	O
reducing	O
the	O
strength	O
of	O
the	O
algorithm	O
against	O
finding	O
collisions	B-Algorithm
on	O
some	O
bits	O
.	O
</s>
<s>
The	O
first	O
four	O
starting	O
values	O
for	O
h0	O
through	O
h3	O
are	O
the	O
same	O
with	O
the	O
MD5	B-Algorithm
algorithm	O
,	O
and	O
the	O
fifth	O
(	O
for	O
h4	O
)	O
is	O
similar	O
.	O
</s>
<s>
However	O
they	O
were	O
not	O
properly	O
verified	O
for	O
being	O
resistant	O
against	O
inversion	O
of	O
the	O
few	O
first	O
rounds	O
to	O
infer	O
possible	O
collisions	B-Algorithm
on	O
some	O
bits	O
,	O
usable	O
by	O
multiblock	O
differential	O
attacks	O
.	O
</s>
<s>
This	O
transformation	O
keeps	O
all	O
operands	O
64-bit	O
aligned	O
and	O
,	O
by	O
removing	O
the	O
dependency	O
of	O
w[i]	O
on	O
w[i-3],	O
allows	O
efficient	O
SIMD	O
implementation	O
with	O
a	O
vector	O
length	O
of	O
4	O
like	O
x86	B-Operating_System
SSE	B-General_Concept
instructions	I-General_Concept
.	O
</s>
<s>
In	O
the	O
table	O
below	O
,	O
internal	O
state	O
means	O
the	O
"	O
internal	O
hash	B-Error_Name
sum	I-Error_Name
"	O
after	O
each	O
compression	O
of	O
a	O
data	O
block	O
.	O
</s>
<s>
Below	O
is	O
a	O
list	O
of	O
cryptography	O
libraries	O
that	O
support	O
SHA-1	B-Algorithm
:	O
</s>
<s>
Intel	B-Device
SHA	I-Device
extensions	I-Device
:	O
Available	O
on	O
some	O
Intel	O
and	O
AMD	O
x86	B-Operating_System
processors	O
.	O
</s>
