Lecture 06
Lecture 06
Security
Fifth Edition
by William Stallings
Chapter 11
Cryptographic Hash Functions
Hash Functions
condenses arbitrary message to fixed size
h = H(M)
usually assume hash function is public
hash used to detect changes to message
want a cryptographic hash function
computationally infeasible to find data mapping to specific hash (one-way property)
computationally infeasible to find two data to same hash (collision-free property)
Cryptographic Hash Function
Hash Functions
& Message
Authent-ication
Hash Functions & Digital Signatures
Other Hash Function Uses
Message size < 264 < 264 < 264 < 2128 < 2128
Block size 512 512 512 1024 1024
Word size 32 32 32 64 64
Number of
steps 80 64 64 80 80
SHA-512 Overview
SHA-512 Compression Function
• have considered:
• hash functions
• uses, requirements, security
• hash functions based on block ciphers
• SHA-1, SHA-2, SHA-3
Cryptography and Network
Security
Fifth Edition
by William Stallings
Chapter 12
Message Authentication Codes
Message Authentication
• disclosure
• traffic analysis
• masquerade
• content modification
• sequence modification
• timing modification
• source repudiation
• destination repudiation
Symmetric Message Encryption
encryption can also provides authentication
if symmetric encryption is used then:
receiver know sender must have created it
since only sender and receiver now key used
know content cannot of been altered
if message has suitable structure, redundancy or a checksum to detect any
changes
Public-Key Message Encryption
• if public-key encryption is used:
• encryption provides no confidence of sender
• since anyone potentially knows public-key
• however if
• sender signs message using their private-key
• then encrypts with recipients public key
• have both secrecy and authentication
• again need to recognize corrupted messages
• but at cost of two public-key uses on message
Message Authentication Code (MAC)
• can use any block cipher chaining mode and use final block as a MAC
• Data Authentication Algorithm (DAA) is a widely used MAC based on
DES-CBC
• using IV=0 and zero-pad of final block
• encrypt message using DES in CBC mode
• and send just the final block as the MAC
• or the leftmost M bits (16≤M≤64) of final block
• but final MAC is now too small for security
Data Authentication Algorithm
CMAC
• have considered:
• message authentication requirements
• message authentication using encryption
• MACs
• HMAC authentication using a hash function
• CMAC authentication using a block cipher
• Pseudorandom Number Generation (PRNG) using Hash Functions and MACs
Cryptography and Network
Security
Fifth Edition
by William Stallings
Chapter 13
Digital Signatures
Digital Signatures
• have discussed:
• digital signatures
• ElGamal & Schnorr signature schemes
• digital signature algorithm and standard