1.
Explain Applications of cryptographic Hash function OR Explain Role of Cryptography in
message Authentication and Digital Signature
[Link] Authentication
Message authentication verifies that a message has not been modified, inserted, deleted, or replayed. It
also assures that the sender’s identity is genuine. When a hash function is used for authentication, the
resulting value is called a message digest.
• The sender computes a hash value from the message and sends both the message
and its hash.
• The receiver recomputes the hash and compares it with the received one.
Encrypt (Message + Hash) using symmetric encryption
→ Ensures authentication and confidentiality.
b. Encrypt only the hash code
→ Provides authentication with less computation if confidentiality is not required.
c. Use a shared secret value (S) without encryption
→ Sender computes H(M‖S) and sends it with M.
→ Receiver recomputes using the same S to verify authenticity.
→ The secret value is never transmitted, preventing tampering.
d. Encrypt (Message + Hash) for added confidentiality.
Method (b) is often preferred as encryption of the entire message is computationally expensive.
Reasons to avoid full encryption:
• Encryption software is slow for frequent small messages.
• Hardware cost adds up for all nodes.
• Hardware initialization overhead is high for small data.
• Encryption algorithms may be patent protected.
Message Authentication Code (MAC)
A MAC (keyed hash function) is used when two parties share a secret key.
• MAC function: MAC = F(K, M)
• Verifies both integrity and authenticity.
• An attacker cannot alter the message or MAC without knowing K.
• Combines hashing and encryption: e.g., E(K, H(M)) acts as a MAC. MACs are more efficient than
encryption algorithms.
2. Digital Signatures
Similar to MAC but uses public-key encryption.
• The hash value of a message is encrypted with the sender’s private key.
• Anyone with the public key can verify it.
• Ensures integrity, authentication, and non-repudiation (Figure 11.4a).
• For confidentiality, the message + signature can be encrypted with a symmetric key
2. Explain 2 Simple Hash Function