Ecs726p Week04 P
Ecs726p Week04 P
Authentication
Week 4: Hash functions, MAC, digital
signatures, freshness, dynamic password
schemes
Pasquale Malacaria
EECS, QMUL
Table of contents
1. Data Integrity
4. Digital signatures
5. Entity authentication
1
Learning Outcomes
Data Integrity
Cryptographic Hash Functions
• Properties
• Applications
• Birthday Attack
• Well-known Hash functions
2
Learning Outcomes
3
Learning Outcomes
5
Data Integrity: Different levels
6
Cryptographic Hash Functions
(Cryptographic) Hash Functions
7
(Cryptographic) Hash Functions
8
(Cryptographic) Hash Functions: Requirements
”first 256 bits of the file xor with second 256 bits of the file
xor with third 256 bits etc etc”
why this simple xor 256 bits blocks function is bad as a
hash function?
Preimage Resistance: ?
Second Preimage Resistance:?
Collision Resistance:?
10
(Cryptographic) Hash Functions: Applications
• Preimage Resistance
• Second Preimage Resistance
• Collision Resistance
11
(Cryptographic) Hash Functions: Applications
12
(Cryptographic) Hash Functions: Applications
13
(Cryptographic) Hash Functions: Applications
14
Hash security: The birthday paradox
19
Message authentication codes
(MAC)
Message authentication codes (MAC)
20
Message authentication codes (MAC)
21
Message authentication codes (MAC)
23
Message authentication codes (MAC)
MAC algorithms
24
Message authentication codes (MAC)
25
Message authentication codes (MAC)
26
Message authentication codes (MAC)
28
Message authentication codes (MAC)
29
Message authentication codes (MAC)
• MAC-then-encrypt
• Encrypt-then-MAC
• Authenticated-Encryption Primitives (e.g. Galois
counter mode of operation)
30
Message authentication codes: non-repudiation
31
Digital signatures
Digital Signatures scheme
32
Digital Signatures
33
Digital Signatures
34
Digital Signatures
35
Digital Signatures
36
Example Digital Signatures
37
Example Digital Signatures
P de = P ed ≡ P(modn)
38
Toy Example Digital Signatures
39
Digital Signatures: confidentiality
40
Entity authentication
Entity authentication
41
Freshness Mechanisms
Clock-based mechanisms
42
Freshness Mechanisms
Sequence numbers
43
Freshness Mechanisms
Nonce-based mechanisms
• Nonces (numbers used only once): randomly
generated numbers for one-off use.
• Alice generates a nonce at some stage in a
communication session (protocol). If Alice receives a
subsequent message containing this nonce, then
Alice has assurance the new message is fresh,
where by fresh we mean the received message must
have been created after the nonce was generated.
• Need to set a window of acceptance beyond which a
nonce will no longer be regarded as fresh.
• Requires random generator
44
Passwords
45
Passwords
46
Passwords
47
Passwords
• Length
• Complexity
• Repeatability
• Vulnerability
48
Dynamic Password Scheme
49
Dynamic Password Scheme
50