Unit 2 Cryptography
Unit 2 Cryptography
• Hash Function
Message Authentication Code (MAC)
Message Authentication Code (MAC)
Message Authentication Code (MAC)
Limitations of MAC
• Though no third party can compute the MAC, still sender could
deny having sent the message and claim that the receiver forged
it, as it is impossible to determine which of the two parties
computed the MAC.
Hash Function
• Hash functions are extremely useful and appear in almost all
information security applications.
• A hash function is a mathematical function that converts a numerical
input value into another compressed numerical value. The input to
the hash function is of arbitrary length but output is always of fixed
length.
• Values returned by a hash function are called message digest or
simply hash values. The following picture illustrated hash function −
Hash Function
Hash Function
Hash Function
Hash Function
Hash Function
Hash Function
• Features of Hash Functions
• The typical features of hash functions are −
• In general, the hash is much smaller than the input data, hence
hash functions are sometimes called compression functions.
Hash Function
• Since a hash is a smaller representation of a larger data, it is also
referred to as a digest.
• Efficiency of Operation
• Generally for any hash function h with input x, computation of h(x)
is a fast operation.
• Whirlpool
Message Digest (MD)
MD5 was most popular and widely used hash function for
quite some years.
• The MD family comprises of hash functions MD2, MD4, MD5 and
MD6. It was adopted as Internet Standard RFC 1321. It is a 128-bit
hash function.
• MD5 digests have been widely used in the software world to provide
assurance about integrity of transferred file. For example, file servers
often provide a pre-computed MD5 checksum for the files, so that a
user can compare the checksum of the downloaded file to it.
Message Digest (MD)
• In 2004, collisions were found in MD5. An analytical attack was
reported to be successful only in an hour by using computer cluster.
This collision attack resulted in compromised MD5 and hence it is no
longer recommended for use.
Secure Hash Function (SHA)
Family of SHA comprise of four SHA algorithms; SHA-0, SHA-1,
SHA-2, and SHA-3. Though from same family, there are
structurally different.
• The original version is SHA-0, a 160-bit hash function, was published
by the National Institute of Standards and Technology (NIST) in 1993.
It had few weaknesses and did not become very popular. Later in
1995, SHA-1 was designed to correct alleged weaknesses of SHA-0.
• SHA-1 is the most widely used of the existing SHA hash functions. It is
employed in several widely used applications and protocols including
Secure Socket Layer (SSL) security.
Secure Hash Function (SHA)
• In 2005, a method was found for uncovering collisions for SHA-1
within practical time frame making long-term employability of SHA-1
doubtful.
• SHA-2 family has four further SHA variants, SHA-224, SHA-256, SHA-
384, and SHA-512 depending up on number of bits in their hash
value. No successful attacks have yet been reported on SHA-2 hash
function.
Secure Hash Function (SHA)
• Though SHA-2 is a strong hash function. Though significantly
different, its basic design is still follows design of SHA-1. Hence, NIST
called for new competitive hash function designs.
• In October 2012, the NIST chose the Keccak algorithm as the new
SHA-3 standard. Keccak offers many benefits, such as efficient
performance and good resistance for attacks.
RACE Integrity Primitives Evaluation Message
Digest.
The RIPEMD is an acronym for RACE Integrity Primitives Evaluation
Message Digest. This set of hash functions was designed by open
research community and generally known as a family of European hash
functions.
• Password Storage
• The integrity check helps the user to detect any changes made to
original file. It however, does not provide any assurance about
originality. The attacker, instead of modifying file data, can change the
entire file and compute all together new hash and send to the
receiver. This integrity check application is useful only if the user is
sure about the originality of file.
Data Integrity Check
Thank You