Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the...

34
Automated Analysis of TLS 1.3 0-RTT, Resumption and Delayed Authentication IEEE S&P, 24/05/2016 Cas Cremers Marko Horvat Sam Scott Thyla van der Merwe Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Transcript of Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the...

Page 1: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Automated Analysis of TLS 1.30-RTT, Resumption and Delayed Authentication

IEEE S&P, 24/05/2016

CasCremers

MarkoHorvat

SamScott

Thylavan der Merwe

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 2: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Where our work fits in

2011$ 2015$

1995$

1996$

1999$

2006$

2008$

2016$$$10$20

09$

2012$

2013$

2014$

1998$

2002$

Program'verifica-on'

Provable'security'

Formal'methods'

Dowling(et(al.([dra0105](Kohlweiss(et(al.([dra0105](Krawczyk(and(Wee([OPTLS](Dowling(et(al.([dra0110](

We'are'here!'

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 3: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Where our work fits in

2011$ 2015$

1995$

1996$

1999$

2006$

2008$

2016$$$10$20

09$

2012$

2013$

2014$

1998$

2002$

Program'verifica-on'

Provable'security'

Formal'methods'

Dowling(et(al.([dra0105](Kohlweiss(et(al.([dra0105](Krawczyk(and(Wee([OPTLS](Dowling(et(al.([dra0110](

We'are'here!'

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 4: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Motivation and approach

TLS 1.3 designed to be more efficient than TLS 1.2:

0-RTT handshake mode.

PSK mode.

Delayed client authentication.

Our goal

Improve the security of TLS 1.3 by analysing the specification using state-of-the-artformal analysis methods.

We focus on interaction attacks:

Perfect cryptography assumption.

Dolev-Yao attacker.

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 5: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Building a model. Client state machine

c0start

c1−dhe

c1−psk

c1−kc

c2a c2 c3

ClientHello Receive ServerHello/Finished +Send ClientFinished

Clientauthentication

C1

C 1 PSK

C 1 KC

C 2 PSK

C 2 PSK DHE

C 1 KC Auth

C 1 retry

C2

C 2 KC

C 2 NoAuth

C 2 Auth C 3

C 3 NST

C send

C recv

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 6: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Unbounded number of concurrent sessions

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 7: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Tamarin

We encoded our model for use in the Tamarin prover:

State-of-the-art tool for automated protocol analysis.

Loops.Branches.Symbolic Diffie-Hellman.

However, requires considerable user interaction for very complex models.

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 8: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Verification

We verified the core properties of TLS 1.3 revision 10 as an authenticated keyexchange protocol:

Secrecy of session keys.

Forward secrecy included.

Unilateral and mutual authentication.

Integrity of handshake messages.

Is it safe to include delayed client authentication in revision 10?

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 9: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Verification

We verified the core properties of TLS 1.3 revision 10 as an authenticated keyexchange protocol:

Secrecy of session keys.

Forward secrecy included.

Unilateral and mutual authentication.

Integrity of handshake messages.

Is it safe to include delayed client authentication in revision 10?

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 10: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

c0start

c1−dhe

c1−psk

c1−kc

c2a c2 c3

ClientHello Receive ServerHello/Finished +Send ClientFinished

Clientauthentication

C1

C 1 PSK

C 1 KC

C 2 PSK

C 2 PSK DHE

C 1 KC Auth

C 1 retry

C2

C 2 KC

C 2 NoAuth

C 2 Auth C 3

C 3 NST

C send

C Auth

C recv

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 11: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 12: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 13: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 14: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 15: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 16: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 17: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 18: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 19: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 20: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 21: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 22: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 23: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 24: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 25: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 26: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 27: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 28: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 29: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attacking client authentication

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 30: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Disclosure

We posted analysis results and attack to TLS mailing list end-October 2015.

“Nice analysis! I think that the composition of different mechanisms in theprotocol is likely to be where many subtle issues lie, and analyses like this onesupport that concern.”

“Thanks for posting this. It’s great to see people doing real formal analysis of theTLS 1.3 draft; this is really helpful in guiding the design.”

“This result motivates and confirms the need to modify the handshake hashes tocontain the server Finished when we add post-handshake authentication...”

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 31: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Disclosure

We posted analysis results and attack to TLS mailing list end-October 2015.

“Nice analysis! I think that the composition of different mechanisms in theprotocol is likely to be where many subtle issues lie, and analyses like this onesupport that concern.”

“Thanks for posting this. It’s great to see people doing real formal analysis of theTLS 1.3 draft; this is really helpful in guiding the design.”

“This result motivates and confirms the need to modify the handshake hashes tocontain the server Finished when we add post-handshake authentication...”

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 32: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Disclosure

We posted analysis results and attack to TLS mailing list end-October 2015.

“Nice analysis! I think that the composition of different mechanisms in theprotocol is likely to be where many subtle issues lie, and analyses like this onesupport that concern.”

“Thanks for posting this. It’s great to see people doing real formal analysis of theTLS 1.3 draft; this is really helpful in guiding the design.”

“This result motivates and confirms the need to modify the handshake hashes tocontain the server Finished when we add post-handshake authentication...”

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 33: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Attack cause and mitigation

Attack shows initial proposal for delayed client authentication incomplete.

Highlights strict necessity of binding client signatures to server certificate.

Working group proposed to include transcript to bind them to sessions.

This proposal was merged in revision 11, which prevents our attack.

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3

Page 34: Automated Analysis of TLS 1 - ieee- · PDF fileAutomated Analysis of TLS ... We veri ed the core properties of TLS 1.3 revision 10 as an authenticated key exchange protocol: ... Working

Conclusions

First comprehensive analysis of the new TLS 1.3 modes and their interaction.

This story has a happy ending:

Revision 10 was successfully verified.Tamarin was used to find an interaction attack on delayed authentication.Proposed fix verified and included in revision 11.

Future work: Update model and verify revision 13.

Our work is part of the larger, concerted effort of different approaches tohardening TLS 1.3.

Authors:

Cas [email protected]

Sam [email protected]

Marko [email protected]

Thyla van der [email protected]

Cas Cremers, Marko Horvat, Sam Scott, Thyla van der Merwe Automated Analysis of TLS 1.3