PCIT303: Cryptography andInformation Security
Sanjivani Rural Education Society’s
Sanjivani College of Engineering, Kopargaon-423603
(An Autonomous Institute Affiliated to Savitribai Phule Pune University, Pune)
NACC ‘A’ Grade Accredited, ISO 9001:2015 Certified
Department of Information Technology
(UG Programme - NBAAccredited)
Dr. M.A. Jawale
Professor and Head, Dept. of IT
2.
Unit III :Message Digest
▪ Cryptographic Hash Functions
▪ Applications of Cryptographic Hash Functions –
a) Message Authentication,
b) Digital Signatures,
Unit-III: Part-I Message Digest Prof. Dr. Madhuri Jawale Department of Information Technology
3.
Cryptographic Hash Functions
▪A hash function maps a variable-length message into a fixed-length hash
value, or message digest.
▪ A hash function H accepts a variable-length block of data M as input and produces a
fixed-size hash value h = H(M)
▪ A “good” hash function has the property that the results of applying the function to a
large set of inputs will produce outputs that are evenly distributed and apparently
random.
▪ In general terms, the principal object of a hash function is data integrity.
▪ A change to any bit or bits in M results, with high probability, in a change to the hash
code.
Unit-III: Part-I Message Digest Prof. Dr. Madhuri Jawale Department of Information Technology
4.
Cryptographic Hash Functions
▪A cryptographic hash function is an algorithm for which it is computationally
infeasible to find either
a) a data object that maps to a pre-specified hash result (the one-way property) or
b) two data objects that map to the same hash result (the collision-free property).
▪ Because of these characteristics, hash functions are often used to determine whether
or not data has changed.
Unit-III: Part-I Message Digest Prof. Dr. Madhuri Jawale Department of Information Technology
Message Authentication
▪ Messageauthentication is a mechanism or service used to verify the integrity of a
message. Message authentication assures that data received are exactly as sent (i.e.,
contain no modification, insertion, deletion, or replay).
Unit-III: Part-I Message Digest Prof. Dr. Madhuri Jawale Department of Information Technology
7.
Examples of theUse of a Hash Function for Message
Authentication
Unit-III: Part-I Message Digest Prof. Dr. Madhuri Jawale Department of Information Technology
▪ The message plus concatenated hash code is encrypted using symmetric encryption.
Because only A and B share the secret key, the message must have come from A and
has not been altered.
▪ Because encryption is applied to the entire message plus hash code, confidentiality is
also provided.
8.
Examples of theUse of a Hash Function for Message
Authentication
Unit-III: Part-I Message Digest Prof. Dr. Madhuri Jawale Department of Information Technology
▪ Only the hash code is encrypted, using symmetric encryption. This reduces the processing
burden for those applications that do not require confidentiality.
9.
Digital Signatures
▪ Anotherimportant application is the digital signature.
▪ In the case of the digital signature, the hash value of a message is encrypted with a
user’s private key. Anyone who knows the user’s public key can verify the integrity
of the message that is associated with the digital signature.
▪ In this case, an attacker who wishes to alter the message would need to know the
user’s private key.
Unit-III: Part-I Message Digest Prof. Dr. Madhuri Jawale Department of Information Technology
10.
Digital Signatures
Unit-III: Part-IMessage Digest Prof. Dr. Madhuri Jawale Department of Information Technology
▪ The hash code is encrypted, using public-key encryption with the sender’s private
key. This provides authentication. It also provides a digital signature, because only
the sender could have produced the encrypted hash code. In fact, this is the essence
of the digital signature technique.
11.
Digital Signatures
Unit-III: Part-IMessage Digest Prof. Dr. Madhuri Jawale Department of Information Technology
▪ If confidentiality as well as a digital signature is desired, then the message plus the
private-key-encrypted hash code can be encrypted using a symmetric secret key. This is
a common technique.
12.
Reference
1. Atul Kahate,“Cryptography and Network Security”, Second Edition, Chapter 4.
Unit-III: Part-I Message Digest Prof. Dr. Madhuri Jawale Department of Information Technology