2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such...

25
On the Security of TLS 1.3 (and QUIC) Against Weaknesses in PKCS#1 v1.5 EncrypHon Tibor Jager , Jörg Schwenk, Juraj Somorovsky Horst Görtz InsHtute for IT Security Ruhr-University Bochum TRON 1.0 Workshop 2016 21 February 2016 San Diego, CA, USA

Transcript of 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such...

Page 1: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

OntheSecurityofTLS1.3(andQUIC)AgainstWeaknessesinPKCS#1v1.5EncrypHon

TiborJager,JörgSchwenk,JurajSomorovskyHorstGörtzInsHtuteforITSecurity

Ruhr-UniversityBochum

TRON1.0Workshop201621February2016SanDiego,CA,USA

Page 2: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

RSA-PKCS#1v1.5EncrypHon

•  MostfrequentlyusedkeytransportmechanisminTLSbeforev1.3– “Textbook-RSAencrypHon”withaddiHonalrandomizedpadding

– Aciphertextis“valid”,ifitcontainsacorrectlypaddedmessage

2

Page 3: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

RSA-PKCS#1v1.5EncrypHon

•  MostfrequentlyusedkeytransportmechanisminTLSbeforev1.3– “Textbook-RSAencrypHon”withaddiHonalrandomizedpadding

– Aciphertextis“valid”,ifitcontainsacorrectlypaddedmessage

•  DeprecatedinTLS1.3– Vulnerable:Bleichenbacher’sa?ack(CRYPTO`98)– Sufficienttoprotectagainstitsweaknesses?

3

Page 4: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

Bleichenbacher’sAgack(CRYPTO1998)

4

C‘

„valid“/„invalid“C‘‘

„valid“/„invalid“...

PKCS-CiphertextC

PlaintextM

Page 5: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

Bleichenbacher’sAgack(CRYPTO1998)

•  Oracleusuallyprovidedbyaserver:– Errormessageifciphertextisinvalid– Othersidechannels,likeGming

•  AllowstoperformRSAsecretkeyoperaGon– DecryptRSA-PKCS#1v1.5ciphertexts– ComputedigitalRSAsignatures 5

C‘

„valid“/„invalid“C‘‘

„valid“/„invalid“...

PKCS-CiphertextC

PlaintextM

Page 6: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

Bleichenbacher’sAgack(CRYPTO1998)

•  Oracleusuallyprovidedbyaserver:– Errormessageifciphertextisinvalid– Othersidechannels,likeGming

•  AllowstoperformRSAsecretkeyoperaGon– DecryptRSA-PKCS#1v1.5ciphertexts– ComputedigitalRSAsignatures 6

C‘

„valid“/„invalid“C‘‘

„valid“/„invalid“...

PKCS-CiphertextC

PlaintextM

Page 7: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

Bleichenbacheragacksoverandover•  Bleichenbacher(CRYPTO1998)•  Klimaetal.(CHES2003)•  Jageretal.(ESORICS2012)•  Degabrieleetal.(CT-RSA2012)•  Bardouetal.(CRYPTO2012)•  Zhangetal.(ACMCCS2014)•  Meyeretal.(USENIXSecurity2014)•  … AssumpGon:Bleichenbacher-likeagacksremain

arealisHcthreat7

Manydifferenttechniquestoconstructtherequiredoracle

Page 8: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

TypicaluseofTLS1.3inpracHce

8

ServerS

TLS1.3

TLS1.0(BackwardscompaHbility)

RSA

TLS1.0

TLS1.3

Page 9: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

TypicaluseofTLS1.3inpracHce

9

ServerS

TLS1.3

TLS1.0(BackwardscompaHbility)

RSA

TLS1.0

TLS1.3

AssumpHon

Secure?

Page 10: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

High-levelAgackDescripHon

10

TLS1.3

ServerS

TLS1.3

TLS1.0(BackwardscompaHbility)

RSA

Page 11: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

High-levelAgackDescripHon

11

TLS1.3

ServerS

TLS1.3

TLS1.0(BackwardscompaHbility)

RSA

SKeyShare

ServerHello

ClientHello

Certificate

ClientKeyShare

Page 12: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

High-levelAgackDescripHon

12

TLS1.3

ServerS

TLS1.3

TLS1.0(BackwardscompaHbility)

RSA

CertVerify

SKeyShare

ServerHello

ClientHello

Certificate

ClientKeyShare

Page 13: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

High-levelAgackDescripHon

13

TLS1.3

ServerS

TLS1.3

TLS1.0(BackwardscompaHbility)

RSA

Bleichenbacher‘sAgack

CertVerify

SKeyShare

ServerHello

ClientHello

Certificate

ClientKeyShare

Page 14: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

High-levelAgackDescripHon

14

TLS1.3

ServerS

TLS1.3

TLS1.0(BackwardscompaHbility)

RSA

Bleichenbacher‘sAgack

CertVerify

SKeyShare

ServerHello

ClientHello

Certificate

ClientKeyShare

S-Finished C-Finished

Page 15: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

High-levelAgackDescripHon

15

TLS1.3

ServerS

TLS1.3

TLS1.0(BackwardscompaHbility)

RSA

Bleichenbacher‘sAgack

CertVerify

SKeyShare

ServerHello

ClientHello

Certificate

ClientKeyShare

S-Finished C-Finished

TLS1.3maybevulnerabletoBleichenbacher‘sagack,eventhoughPKCS#1v1.5encrypGonisnotused!

Page 16: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

PracHcalImpact

16

•  PracHcalimpactonTLS1.3isratherlimited– TypicalBleichenbacher-agackstakehoursordays– WouldLisawaitthatlong?– Machine-to-machinecommunicaHon?

Page 17: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

PracHcalImpact

17

•  PracHcalimpactonTLS1.3isratherlimited– TypicalBleichenbacher-agackstakehoursordays– WouldLisawaitthatlong?– Machine-to-machinecommunicaHon?

•  Nevertheless:– BackwardscompaGbilitymustbeconsidered

•  Cf.Jager,Paterson,Somorovsky(NDSS2013)

– FutureimprovementsofBleichenbacher’sagack?

Page 18: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

AgackontheQUICprotocol

ServerS

QUIC

TLS1.0

RSA

QUICBleichenbacher‘s

Agack

FullQUICprotocol

AgackerA

Page 19: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

AgackontheQUICprotocol

ServerS

QUIC

TLS1.0

RSA

QUICBleichenbacher‘s

Agack

FullQUICprotocol

•  AcanrunBleichenbacher’sagackbeforeLisaconnectstoS•  OnesignatureisequivalenttothesecretkeyofS•  PracGcal,evenifagacktakesweeks!

AgackerA

Page 20: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

LimitedImpactonTLS1.3

TLS1.3

CertVerify

ServerS

TLS1.3

TLS1.0

RSA

Bleichenbacher‘sAgack

•  AcanimpersonateSonlyinasingleTLSsession•  OnlypracHcalwithveryfastBleichenbacheragack

“Hello”

“Finished”

AgackerA

Page 21: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

ThedifficultyofprevenHngsuchagacks(example)

21

TLS1.3ServerS

TLS1.3

TLS1.0(BackwardscompaHbility)

RSA1

RSA2

Page 22: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

ThedifficultyofprevenHngsuchagacks(example)

22

TLS1.3 RSA1 ServerS

TLS1.3

TLS1.0(BackwardscompaHbility)

RSA1

RSA2

Bleichenbacher‘sAgack

Page 23: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

ThedifficultyofprevenHngsuchagacks(example)

23

TLS1.3 RSA2 ServerS

TLS1.3

TLS1.0(BackwardscompaHbility)

RSA1

RSA2•  X.509cerHficatesdonotcontainprotocolversion

Bleichenbacher‘sAgack

Page 24: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

FurtherdifficulHes

•  KeyseparaHonnotsupportedbymajorserverimplementaHons

•  CerHficatescostmoney(extendedvalidaHon)•  X.509supports“sign/encrypt-only”certs

– “Sign-only”keysforTLS>=1.3– “Encrypt-only”keysforTLS<=1.2

•  NoForwardSecrecyforversions<=1.2L

– Dobrowsersreallycheckthis?

Page 25: 2016 TLS 1.3 - NDSS SymposiumRSA1 RSA2 Bleichenbacher‘s Agack The difficulty of prevenng such aacks (example) 23 TLS 1.3 RSA2 Server S TLS 1.3 TLS 1.0 (Backwards compability ) RSA1

SummaryandrecommendaHons

•  RemovingRSA-PKCS#1v1.5fromTLSisanexcellentdecision– Notsufficienttoprotectcompletelyagainstweakness

•  TLS1.3ismore“robust”thanQUIC–  Butnotimmune–  Signingephemeralvaluesisagoodidea

•  RecommendaHonforfutureTLSversions:promotekeyseparaGon–  TalktoX.509andsozwaredevelopers

25