1
Jonathan Berger
Introduction to Cyber Security
TA 4 part 2: Intro to Cryptography
Based on slides of Avishay Yanai
Cryptographic Hash Function
2
Cryptographic Hash Function
3
4
5
6
7
Application example of cryptographic hash functions
Merkle Trees
Application: File Storage
8
Application: File Storage – single file
9
Application: File Storage – many files
10
Application: File Storage – many files
11
Application: File Storage – many files
12
Application: File Storage – many files
13
Local storage: Constant.
Communication per file: 2 files + (log n)-1 hashes
Finding Collision
14
The “Birthday” Problem/Paradox
15
The “Birthday” Problem/Paradox (cont.)
16
The “Birthday” Problem/Paradox – Lower bound proof
17
18
A Reminder – Message Authentication Code (MAC)
19
Canonical Verification
20
MAC from Collision Resistant Hash Functions
21
Timing attacks
22
Python | C |
| |
Timing attacks (cont.)
23
Python | C |
| |
Timing attacks (cont.)
24
Attacker
Verifier
(m,t)
0/1
(m,t’)
Data Integrity, Message Authentication
page 25
Alice
Eve
Bob
M
M
M’
M’
Message Authentication Code (MAC)
26
Requirements
page 27
The Security of MACs
28
A Fixed-Length MAC
If F is a PRF, then the above MAC scheme is secure.
29
A Variable-Length MAC (NMAC)
A Variable-Length MAC (NMAC)
State of the art – HMAC
State of the art – HMAC
Exercises
34
Questions?
35
(MAC("יאללה עופו הביתה"))
36