1 - Teaching Session
1 - Teaching Session
Objectives
• What is a Hash Value?
• Hash Function Requirements
• Hashing Algorithms
• Hash Value Applications
1
Finger Print
2
Finger Print & Hash Value
3
Finger Print & Hash Value
4
Hash Functions
• Hash functions produce a fixed-length output- usually 128 bits- form a message of any
length.
• Hashes are unique to the input (message) that produces them.
• Alerting just one bit of the input (message) will produce a noticeably different hash
output.
• There is no way of recovering the original input (message) form the output hash value.
The hash function is a one way function.
• One-way function is a function that is easy to compute output in one direction, but it is
very difficult to compute the input data from the output.
5
Hash Function Requirements
The basic requirements for a cryptographic hash function are as follows.
• H (x) is a length-reducing function
– Map arbitrary strings to strings of fixed length
– The input can be of any length, however the output has a fixed length.
• H (x) is one-way.
– Given y, hard to find x with h (x)=y
– Given x, easy to find y= h (x)
• Collision resistant (H (x) is collision-free)
– Hard to find any distinct x, x’ x with h (x’)=h (x)
6
Hashing Algorithms
• There are many hashing algorithm such as MD2, MD4, MD5, and
Secure Hash Algorithm (SHA).
• MD4 is faster than MD2 and simple to use. It uses three processing
rounds to produce a hash of 128 bits long. However it was subject to
successful attacks.
• MD5 was developed from MD4 and to be more secure than MD4. It
uses four processing rounds to produce a hash of 128 bits long.
7
Hashing Algorithms
• The most secure hashing algorithm is the SHA (Secure Hash Algorithm).
• SHA was developed by U.S. National Security Agency as NIST ( National
Institute Standard and Technology) standard.
• SHA produces a hash value (message digest) of 160 bits by four processing
rounds.
• SHA-256, SHA-384, and SHA-512 algorithms
• They designed to be used with the Advanced Encryption Standards (AES)
8
Hash Value Applications
• Malware identifier
• Virus scan software
• User authentication
• Software Authenticity
• Data integrity for stored files
– Compute and store hash of stored files
– Check later by re-computing hash and comparing
– Cyber crime investigation
• Provide data integrity for public encryption
• Keyed hash for message authentication
– MAC: Message Authentication Code
• Digital signatures
– Sign hash of message instead of entire message
9
Using Hash to Identify Malware
• Run a hashing function (e.g. MD5) against the malware code in order
to get the malware hash (fingerprint) that identifies the malware
10
Virus Scan Software
• You should update the virus database regularly to include the hash values of new viruses
11
Conclusion
12
Thank You
Questions?
13