Symbolic verification of cryptographic protocols using Tamarin
Part 1 : Introduction David Basin
ETH Zurich
Symbolic verification of cryptographic protocols using Tamarin Part - - PowerPoint PPT Presentation
Symbolic verification of cryptographic protocols using Tamarin Part 1 : Introduction David Basin ETH Zurich Summer School on Verification Technology, Systems & Applications Nancy France August 2018 Organization of the course Two
ETH Zurich
2 / 63
3 / 63
4 / 63
5 / 63
5 / 63
1 Motivation 2 Building a key establishment protocol 3 Formalizing Security Protocols: An Example 4 Protocol attacks 5 Outlook
6 / 63
1 Motivation 2 Building a key establishment protocol 3 Formalizing Security Protocols: An Example 4 Protocol attacks 5 Outlook
7 / 63
8 / 63
Example: Securing an e-banking application
9 / 63
Example: Securing an e-banking application
9 / 63
Example: Securing an e-banking application
9 / 63
10 / 63
1 Motivation 2 Building a key establishment protocol 3 Formalizing Security Protocols: An Example 4 Protocol attacks 5 Outlook
11 / 63
session key for subsequent secure communications.
Note: Users are not necessarily honest! (More later)
Note: Often called “trusted server”, but trust = honesty! We assume that an honest server never cheats and never gives out user secrets.
12 / 63
known to A and B, and possibly S, but to no other parties.
13 / 63
A 3 message protocol
❊
❊
✤ B
1 A contacts S by sending
2 S sends the key KAB to A. 3 A forwards KAB to B.
14 / 63
❊
❊
✤ B
15 / 63
S A
❊
❊
✤ B
16 / 63
S A
❊
❊
✤ B
17 / 63
S A
❊
❊
✤ B
17 / 63
Use cryptography
❊
|KAB| }k(A,S), { |KAB| }k(B,S)
❊
|KAB| }k(B,S), A
✤ B
18 / 63
Use cryptography
❊
|KAB| }k(A,S), { |KAB| }k(B,S)
❊
|KAB| }k(B,S), A
✤ B
18 / 63
Use cryptography
❊
|KAB| }k(A,S), { |KAB| }k(B,S)
❊
|KAB| }k(B,S), A
✤ B
18 / 63
Security Issues
S A
❊
|KAB| }k(A,S), { |KAB| }k(B,S)
❊
|KAB| }k(B,S), A
✤ B
19 / 63
Security Issues
legitimate protocol session, there are infinitely many variations where the adversary can participate.
and each must satisfy the protocol’s security requirements.
20 / 63
i
1′. a,i
✤
2′. { |kai| }k(a,s), { |kai| }k(i,s)
✤
a
❅
|kai| }k(a,s), { |kai| }k(i,s)
❅
|kai| }k(i,s), a
✤ i
21 / 63
i
1′. a,i
✤
2′. { |kai| }k(a,s), { |kai| }k(i,s)
✤
a
❅
|kai| }k(a,s), { |kai| }k(i,s)
❅
|kai| }k(i,s), a
✤ i
22 / 63
❄
|KAB, B| }k(A,S), { |KAB, A| }k(B,S)
❄
|KAB, A| }k(B,S)
✤ B
23 / 63
Security Issues
particular, it should not be possible to replay messages from previous sessions.
24 / 63
i a
❀
|kab′, b| }k(a,s), { |kab′, a| }k(b,s)
❀
|kab′, a| }k(b,s)
✤ b
to know and replay the encrypted messages in which kab′ was transported to a and b.
know kab′.
25 / 63
sent in the previous session.
26 / 63
S A
✷
|KAB, B, NA, { |KAB, A| }k(B,S)| }k(A,S)
✷
|KAB, A| }k(B,S)
✤
|NB| }KAB
✤
|NB−1| }KAB
✤
B
27 / 63
S A
✷
|KAB, B, NA, { |KAB, A| }k(B,S)| }k(A,S)
✷
|KAB, A| }k(B,S)
✤
|NB| }KAB
✤
|NB−1| }KAB
✤
B
28 / 63
S A
✷
|KAB, B, NA, { |KAB, A| }k(B,S)| }k(A,S)
✷
|KAB, A| }k(B,S)
✤
|NB| }KAB
✤
|NB−1| }KAB
✤
B
29 / 63
Security Issue
S A
✷
|KAB, B, NA, { |KAB, A| }k(B,S)| }k(A,S)
✷
|KAB, A| }k(B,S)
✤
|NB| }KAB
✤
|NB−1| }KAB
✤
B
30 / 63
S A
✷
|KAB, B, NA, { |KAB, A| }k(B,S)| }k(A,S)
✷
|KAB, A| }k(B,S)
✤
|NB| }KAB
✤
|NB−1| }KAB
✤
B
i
|kab′, a| }k(b,s)
✤
|nb| }kab′
✤
|nb−1| }kab′
✤
b
31 / 63
S A
❀
|KAB, B, NA| }k(A,S), { |KAB, A, NB| }k(B,S)
❀
✤
|KAB, A, NB| }k(B,S)
✤ B
32 / 63
S A
❀
|KAB, B, NA| }k(A,S), { |KAB, A, NB| }k(B,S)
❀
✤
|KAB, A, NB| }k(B,S)
✤ B
This key confirmation property was achieved due to B’s use
|NB| }KAB cannot be formed without knowledge of KAB.
successful run that its partner actually received KAB. (Is this a problem?)
33 / 63
S A
❀
|KAB, B, NA| }k(A,S), { |KAB, A, NB| }k(B,S)
❀
✤
|KAB, A, NB| }k(B,S)
✤ B
34 / 63
S A
❀
|KAB, B, NA| }k(A,S), { |KAB, A, NB| }k(B,S)
❀
✤
|KAB, A, NB| }k(B,S)
✤ B
34 / 63
35 / 63
36 / 63
1 Motivation 2 Building a key establishment protocol 3 Formalizing Security Protocols: An Example 4 Protocol attacks 5 Outlook
37 / 63
38 / 63
1. A →B : {NA, A}pk(B) 2. B→ A : {NA, NB}pk(A) 3. A →B : {NB}pk(B)
1 Construct and send message 1.
with pk(B).
2 Receive a message M and check that it is message 2.
Q: how to detect wrong decryption? Q: what to do about rejected messages?
possible, reject M. Q: how to check this?
3 Construct and send message 3.
39 / 63
40 / 63
41 / 63
42 / 63
43 / 63
1 Motivation 2 Building a key establishment protocol 3 Formalizing Security Protocols: An Example 4 Protocol attacks 5 Outlook
44 / 63
45 / 63
46 / 63
47 / 63
48 / 63
48 / 63
49 / 63
50 / 63
51 / 63
52 / 63
M Encryption Decryption Intended interpretation
Interpretation 1001101100111100 11011011 00010010 A B Ciphertext 1001101100111100 11011011 00010010
AB
K
53 / 63
M Encryption Decryption Intended interpretation
Interpretation 1001101100111100 11011011 00010010 A B Ciphertext 1001101100111100 11011011 00010010
AB
K
mistaken as kab
53 / 63
54 / 63
54 / 63
message authentication, binding of messages, ... e.g., {X, Y }sk(K) versus {X}sk(K), {Y }sk(K)
then?
55 / 63
1 Motivation 2 Building a key establishment protocol 3 Formalizing Security Protocols: An Example 4 Protocol attacks 5 Outlook
56 / 63
57 / 63
interleaving trace models state−based models Cryptographically faithful proofs Probabilistic cryptographic view Dolev−Yao (perfect cryptography)
Security Protocol Analysis
Automatic Deductive
inductive proofs
Computational Models Formal Models
Bounded Session Unbounded Session
58 / 63
interleaving trace models state−based models Cryptographically faithful proofs Probabilistic cryptographic view Dolev−Yao (perfect cryptography)
Security Protocol Analysis
Automatic Deductive
inductive proofs
Computational Models Formal Models
Bounded Session Unbounded Session
58 / 63
59 / 63
60 / 63
61 / 63
62 / 63
Security Protocols, Handbook of Model Checking, 2018.
ın Abadi and Roger Needham. Prudent Engineering Practice for Cryptographic Protocols. IEEE Transactions on Software Engineering, 22(1):2-15, 1996.
Computer Science Today, vol. 1000 of LNCS, p. 426-440. Springer, 1995.
literature, 1997.
http://www.cs.york.ac.uk/~jac/PublishedPapers/reviewV1_1997.pdf
63 / 63