Hash Function
Hash Function
A message digest is as a
``digital fingerprint'' of the
original document
1
Hashing V.S. Encryption
Hello, world. k NhbXBsZSBzZW50ZW5jZS
A sample sentence to E B0byBzaG93IEVuY3J5cHR
show encryption. pb24KsZSBzZ
Iam#4VKU Iam#4VKU
Password
store
h h
Hash Matching
Exactly?
Password
Yes No
store Deny
Grant
Topics
Overview of Cryptography Hash Function
Usages
Properties
Hashing Function Structure
Attack on Hash Function
The Road to new Secure Hash Standard
Hash Function Usages (I)
Fixed length L
This is a clear text that
can easily read without 52f21cf7c7034a20
using the key. The 17a21e17e061a863
sentence is longer than
the text above.
Given one message, can’t find another message that has the same message digest. An attack that
finds a second message with the same message digest is a second pre-image attack.
It would be easy to forge new digital signatures from old signatures if the hash function used
weren’t second preimage resistant
Collision Resistant
Can’t find any two different messages with the same message digest
Collision resistance implies second preimage resistance
Collisions, if we could find them, would give signatories a way to repudiate their signatures
Topics
Overview of Cryptography Hash Function
Usages
Properties
Hashing Function Structure
Attack on Hash Function
The Road to new Secure Hash Standard
Two Group of Compression Functions
The compression function is made from scratch
Message Digest
21
MD2, MD4 and MD5
Family of one-way hash functions by Ronald Rivest
All produces 128 bits hash value
MD2: 1989
Optimized for 8 bit computer
Collision found in 1995
MD4: 1990
Full round collision attack found in 1995
MD5: 1992
Specified as Internet standard in RFC 1321
since 1997 it was theoretically not so hard to create a collision
Practical Collision MD5 has been broken since 2004
CA attack published in 2007
MD5 Overview
Topics
Overview of Cryptography Hash Function
Usages
Properties
Hashing Function Structure
MD5
SHA
Attack on Hash Function
The Road to new Secure Hash Standard
MD5 Overview
2. Append
length
(64bits)
1. Append padding
bits
(to 448 mod 512)
16 steps
M [q*16+k] = the kth 32-bit word from the qth 512-bit block of the msg
Single step
Topics
Overview of Cryptography Hash Function
Usages
Properties
Hashing Function Structure
MD5
SHA
Attack on Hash Function
The Road to new Secure Hash Standard
Secure Hash Algorithm
SHA originally designed by NIST & NSA in 1993
revised in 1995 as SHA-1
US standard for use with DSA signature scheme
standard is FIPS 180-1 1995, also Internet RFC3174
based on design of MD4 with key differences
produces 160-bit hash values
recent 2005 results on security of SHA-1 have raised concerns
on its use in future applications
Revised SHA
NIST issued revision FIPS 180-2 in 2002
adds 3 additional versions of SHA
SHA-256, SHA-384, SHA-512
designed for compatibility with increased security
provided by the AES cipher
structure & detail is similar to SHA-1
hence analysis should be similar
but security levels are rather higher
SHA Versions
What is the number of padding bits if the length of the original message
is 2590 bits?
We can calculate the number of padding bits as follows:
"md5
md5 and
and sha1
sha1 are
are both
both clearly
clearly broken
broken (in
(in terms
terms of collision-resistance”
of collision-resistance
Ron
Ron Rivest
Rivest
http://mail.python.org/pipermail/python-dev/2005-December/058850.html
http://mail.python.org/pipermail/python-dev/2005-December/058850.html
Topics
Overview of Cryptography Hash Function
Usages
Properties
Hashing Function Structure
MD5
SHA
Attack on Hash Function
The Road to new Secure Hash Standard
The need of new Hash standard
MD5 should be considered cryptographically broken and
unsuitable for further use, US CERT 2010
In 2004, a collision for the full SHA-0 algorithm was
announced