SSL/TLS for Mortals (Oracle Groundbreaker EMEA Virtual Tour)

SSL/TLS
M
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
T L S
Awesome Sauce, or...
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
H 🤯Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed:
at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302)
at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296)
at sun.security.ssl.ClientHandshaker.serverCertif cate(ClientHandshaker.java:1506)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:914)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at sun.net. .protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
at sun.net. .protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
at sun.net. .protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512)
at sun.net. .protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440)
at sun.net. .protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at it.mulders.maarten.Demo.main(Demo.java:13)
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderExc
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292)
at sun.security.validator.Validator.validate(Validator.java:260)
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
at sun.security.ssl.ClientHandshaker.serverCertif cate(ClientHandshaker.java:1488)
13 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to f nd valid certif cation path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun security validator PKIXValidator doBuild(PKIXValidator java:382)
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
SSL/TLS for Mortals (Oracle Groundbreaker EMEA Virtual Tour)
7 L OSI M
data unit layers
Data
Data
Data
Segments
Packets
Frames
Bits
Application
Network Process to Application
Presentation
Data Representation
and Encryption
Session
Interhost Communication
Transport
End-to-End Connections
and Reliability
Network
Path Determination and
Logical Addressing (IP)
Data Link
Physical Addressing
(MAC and LLC)
Physical
Media, Signal and
Binary Transmission
HostLayersMediaLayers
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
H SSL TLS
SSL 1.0 never released
SSL 2.0 1995 - 2011 (POODLE)
SSL 3.0 1996 - 2014 (POODLE)
TLS 1.0 1999 - 2011 (BEAST)
TLS 1.1 2006
TLS 1.2 2008
TLS 1.3 2018
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
D
What's the issue?!
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
H
. public/private key encryption
. signed certificates
. certificate authorities
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
1 P P
K E
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
SSL/TLS for Mortals (Oracle Groundbreaker EMEA Virtual Tour)
SSL/TLS for Mortals (Oracle Groundbreaker EMEA Virtual Tour)
M
. Select two prime numbers:
. Calculate product:
. Select random number < product:
. Find d, so that
a.
b.
c.
d.
Note that varies with : when .
p = 11, q = 17
p ∗ q = 187
e = 3
(d ∗ e) − 1 mod (p − 1) ∗ (q − 1) = 0
(d ∗ 3) − 1 mod (10 ∗ 16) = 0
320 mod 160 = 0
(321 − 1) mod 160 = 0
(107 ∗ 3) = 321 ⇒ d = 107
d e e = 75, d = 183
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
N , P Q
.
. Find d, so that
Pretty hard without knowing and !
As soon as we know , calculating is trivial
(again).
p ∗ q = 299, e = 5
(d ∗ e) − 1 mod (p − 1) ∗ (q − 1) = 0
p q
p = 13, q = 23 d = 317
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
For big enough and , finding those factors will cost an
eternity!
So we can distribute and even !
p q
p ∗ q e
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
L "G"
p ∗ q = 187, e = 3, G ⇒ 7
= = 3437
e
7
3
343 mod 187 = 156
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
L "156"
Since we know and , we can calculatep q d = 107
= ≈ 4.6 ∗156
d
156
107
10
234
mod 187 = 7156
107
7 ⇒ G
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
SSL/TLS for Mortals (Oracle Groundbreaker EMEA Virtual Tour)
N
Client Server
1 ClientHello →
2 ← ServerHello
3 ← Certificate
4 ← ServerKeyExchange
5 ← ServerHelloDone
6 ClientKeyExchange →
7 ChangeCipherSpec →
8 Finished →
9 ← ChangeCipherSpec
10 ← Finished
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
D
No-one is eavesdropping!
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
2 S
C
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
A certificate contains:
Serial Number
Subject
Validity
Usage
Public Key
Fingerprint Algorithm
Fingerprint
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
But wait... anyone could create a certificate!
So we also need
Signature Algorithm
Signature
Issuer
... and a way to sign certificates.
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
SSL/TLS for Mortals (Oracle Groundbreaker EMEA Virtual Tour)
A signature is a mathematical relationship between a message
, a private key and a public key .
It consists of two functions:
. signing function
. verifying function
So, given and and knowing , we can tell if is indeed signed
by .
x sk pk
t = f (sk, x)
[accept, reject] = g(pk, t, x)
x t pk x
sk
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
3 C
A
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
An entity that issues digital certificates,
certifying the ownership of a public key
by the subject of the certificate.
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
I
John
?
Alice
So, who is John, anyway?
Many John's in todays browsers and operating systems!
“I can trust you, because I trust John, and
John trusts Alice, and Alice trusts you.
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
Top-notch security procedures, including "key ceremonies"
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
SSL/TLS for Mortals (Oracle Groundbreaker EMEA Virtual Tour)
SSL/TLS for Mortals (Oracle Groundbreaker EMEA Virtual Tour)
/** intentionally left blank */
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
W
Google blacklists 247 certificates in Chromium
Microsoft removes the DigiNotar root certificate from all
supported Windows-releases *
Mozilla revokes trust in the DigiNotar root certificate in all
supported versions
Apple issued Security Update 2011-005
Update Certificate Revocation Lists (although these are self-
signed)
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
D
Trust (for what it's worth)
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
T , T T
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
Simple HTTP client with TLS support:
curl -v -k <address>
Troubleshoot trust issues and see certificates being used:
openssl s_client -showcerts -servername <address> -
connect <address>:443
Troubleshoot supported protocols, ciphers, ...:
nmap --script ssl-enum-ciphers -p 443 <address>
Trace (or even decrypt) TLS traffic:
ssldump -i eth0 port 443 and host <address> (add -Ad
-k <keyfile> -p <password> for decryption)
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
JVM S
-Djavax.net.ssl.trustStore=<file>
Denotes where a truststore can be found: a file that contains
trusted certs.
-Djavax.net.ssl.trustStorePassword=changeit
is the password to that file.
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
JVM S
-Djavax.net.ssl.keyStore=<file>
Denotes where a keystore can be found: a file that contains
public and/or private keys.
-Djavax.net.ssl.keyStorePassword=changeit
is the password to that file.
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
JVM S
-Djavax.net.debug=ssl[:flag]
Include debug logging for TLS handshake and connections.
Additional flags:
record session sessioncache pluggability plaintext
handshake defaultctx keymanager data packet
keygen sslctx trustmanager verbose
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
P
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
P 🔑 -
. Don't use SSL!
Use TLS v1.2 or v1.3.
. Be careful whom you trust!
. When in doubt, open your toolbox:
openssl, curl, nmap, ssldump and Portecle
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
Q
I
Router by
Public Key Krüpto by , , and ( )
Puss In Boots by
IANA Root KSK Ceremony #36 @
Beverwijk by @
unknown author
Sándor P. Fekete Sebastian Morr Sebastian Stiller @ideainstruction
kisspng
https://www.iana.org/dnssec/ceremonies/36
Gerard Hogervorst Wikimedia Commons
Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
1 of 41

Recommended

SSL/TLS for Mortals (Lockdown Lecture) by
SSL/TLS for Mortals (Lockdown Lecture)SSL/TLS for Mortals (Lockdown Lecture)
SSL/TLS for Mortals (Lockdown Lecture)Maarten Mulders
122 views42 slides
SSL/TLS for Mortals (Devoxx UK) by
SSL/TLS for Mortals (Devoxx UK)SSL/TLS for Mortals (Devoxx UK)
SSL/TLS for Mortals (Devoxx UK)Maarten Mulders
70 views41 slides
SSL/TLS for Mortals (JavaLand) by
SSL/TLS for Mortals (JavaLand) SSL/TLS for Mortals (JavaLand)
SSL/TLS for Mortals (JavaLand) Maarten Mulders
58 views41 slides
Catching Pitfalls in Authentication Implementations (Yuchen Zhou) by
Catching Pitfalls in Authentication Implementations (Yuchen Zhou)Catching Pitfalls in Authentication Implementations (Yuchen Zhou)
Catching Pitfalls in Authentication Implementations (Yuchen Zhou)David Evans
1.3K views67 slides
Technology, Process, and Strategy by
Technology, Process, and StrategyTechnology, Process, and Strategy
Technology, Process, and Strategyereddick
32 views46 slides
Whispered secrets by
Whispered secretsWhispered secrets
Whispered secretsEleanor McHugh
2K views74 slides

More Related Content

Similar to SSL/TLS for Mortals (Oracle Groundbreaker EMEA Virtual Tour)

SSL/TLS for Mortals (UtrechtJUG) by
SSL/TLS for Mortals (UtrechtJUG)SSL/TLS for Mortals (UtrechtJUG)
SSL/TLS for Mortals (UtrechtJUG)Maarten Mulders
202 views41 slides
SSL/TLS for Mortals (Devoxx) by
 SSL/TLS for Mortals (Devoxx) SSL/TLS for Mortals (Devoxx)
SSL/TLS for Mortals (Devoxx)Maarten Mulders
389 views41 slides
Introduction to cryptography by
Introduction to cryptographyIntroduction to cryptography
Introduction to cryptographySuresh Thammishetty
1.8K views31 slides
SSL/TLS for Mortals (GOTO Berlin) by
SSL/TLS for Mortals (GOTO Berlin)SSL/TLS for Mortals (GOTO Berlin)
SSL/TLS for Mortals (GOTO Berlin)Maarten Mulders
236 views41 slides
SSL/TLS for Mortals (Devoxx FR 2018) by
SSL/TLS for Mortals (Devoxx FR 2018)SSL/TLS for Mortals (Devoxx FR 2018)
SSL/TLS for Mortals (Devoxx FR 2018)Maarten Mulders
275 views40 slides
SSL/TLS for Mortals (JAX DE 2018) by
SSL/TLS for Mortals (JAX DE 2018)SSL/TLS for Mortals (JAX DE 2018)
SSL/TLS for Mortals (JAX DE 2018)Maarten Mulders
245 views40 slides

Similar to SSL/TLS for Mortals (Oracle Groundbreaker EMEA Virtual Tour)(20)

SSL/TLS for Mortals (UtrechtJUG) by Maarten Mulders
SSL/TLS for Mortals (UtrechtJUG)SSL/TLS for Mortals (UtrechtJUG)
SSL/TLS for Mortals (UtrechtJUG)
Maarten Mulders202 views
SSL/TLS for Mortals (GOTO Berlin) by Maarten Mulders
SSL/TLS for Mortals (GOTO Berlin)SSL/TLS for Mortals (GOTO Berlin)
SSL/TLS for Mortals (GOTO Berlin)
Maarten Mulders236 views
SSL/TLS for Mortals (Devoxx FR 2018) by Maarten Mulders
SSL/TLS for Mortals (Devoxx FR 2018)SSL/TLS for Mortals (Devoxx FR 2018)
SSL/TLS for Mortals (Devoxx FR 2018)
Maarten Mulders275 views
SSL/TLS for Mortals (JAX DE 2018) by Maarten Mulders
SSL/TLS for Mortals (JAX DE 2018)SSL/TLS for Mortals (JAX DE 2018)
SSL/TLS for Mortals (JAX DE 2018)
Maarten Mulders245 views
Encrption in mule by Sindhu VL
Encrption in muleEncrption in mule
Encrption in mule
Sindhu VL381 views
Pgp security mule by Sindhu VL
Pgp security   mulePgp security   mule
Pgp security mule
Sindhu VL390 views
Beyond php - it's not (just) about the code by Wim Godden
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden403 views
Beyond php - it's not (just) about the code by Wim Godden
Beyond php - it's not (just) about the codeBeyond php - it's not (just) about the code
Beyond php - it's not (just) about the code
Wim Godden957 views
SSL/TLS for Mortals (Voxxed Days Luxembourg) by Maarten Mulders
SSL/TLS for Mortals (Voxxed Days Luxembourg)SSL/TLS for Mortals (Voxxed Days Luxembourg)
SSL/TLS for Mortals (Voxxed Days Luxembourg)
Maarten Mulders257 views
TLS/SSL Internet Security Talk by Nisheed KM
TLS/SSL Internet Security TalkTLS/SSL Internet Security Talk
TLS/SSL Internet Security Talk
Nisheed KM744 views
SSL/TLS for Mortals (JavaOne 2017) by Maarten Mulders
SSL/TLS for Mortals (JavaOne 2017)SSL/TLS for Mortals (JavaOne 2017)
SSL/TLS for Mortals (JavaOne 2017)
Maarten Mulders325 views
Grokking Grok: Monitorama PDX 2015 by GregMefford
Grokking Grok: Monitorama PDX 2015Grokking Grok: Monitorama PDX 2015
Grokking Grok: Monitorama PDX 2015
GregMefford4.3K views
Dss digital signature standard and dsa algorithm by Abhishek Kesharwani
Dss  digital signature standard and dsa algorithmDss  digital signature standard and dsa algorithm
Dss digital signature standard and dsa algorithm
Abhishek Kesharwani2.7K views

More from Maarten Mulders

What's cooking in Maven? (Devoxx FR) by
What's cooking in Maven? (Devoxx FR)What's cooking in Maven? (Devoxx FR)
What's cooking in Maven? (Devoxx FR)Maarten Mulders
173 views25 slides
Making Maven Marvellous (Devnexus) by
Making Maven Marvellous (Devnexus)Making Maven Marvellous (Devnexus)
Making Maven Marvellous (Devnexus)Maarten Mulders
149 views13 slides
Making Maven Marvellous (Java.il) by
Making Maven Marvellous (Java.il)Making Maven Marvellous (Java.il)
Making Maven Marvellous (Java.il)Maarten Mulders
146 views13 slides
Making Maven Marvellous (JavaZone) by
Making Maven Marvellous (JavaZone)Making Maven Marvellous (JavaZone)
Making Maven Marvellous (JavaZone)Maarten Mulders
90 views13 slides
Dapr: Dinosaur or Developer's Dream? (v1) by
Dapr: Dinosaur or Developer's Dream? (v1)Dapr: Dinosaur or Developer's Dream? (v1)
Dapr: Dinosaur or Developer's Dream? (v1)Maarten Mulders
132 views42 slides
Dapr: Dinosaur or Developer Dream? (J-Fall) by
Dapr: Dinosaur or Developer Dream? (J-Fall)Dapr: Dinosaur or Developer Dream? (J-Fall)
Dapr: Dinosaur or Developer Dream? (J-Fall)Maarten Mulders
137 views42 slides

More from Maarten Mulders(20)

What's cooking in Maven? (Devoxx FR) by Maarten Mulders
What's cooking in Maven? (Devoxx FR)What's cooking in Maven? (Devoxx FR)
What's cooking in Maven? (Devoxx FR)
Maarten Mulders173 views
Making Maven Marvellous (Devnexus) by Maarten Mulders
Making Maven Marvellous (Devnexus)Making Maven Marvellous (Devnexus)
Making Maven Marvellous (Devnexus)
Maarten Mulders149 views
Making Maven Marvellous (Java.il) by Maarten Mulders
Making Maven Marvellous (Java.il)Making Maven Marvellous (Java.il)
Making Maven Marvellous (Java.il)
Maarten Mulders146 views
Dapr: Dinosaur or Developer's Dream? (v1) by Maarten Mulders
Dapr: Dinosaur or Developer's Dream? (v1)Dapr: Dinosaur or Developer's Dream? (v1)
Dapr: Dinosaur or Developer's Dream? (v1)
Maarten Mulders132 views
Dapr: Dinosaur or Developer Dream? (J-Fall) by Maarten Mulders
Dapr: Dinosaur or Developer Dream? (J-Fall)Dapr: Dinosaur or Developer Dream? (J-Fall)
Dapr: Dinosaur or Developer Dream? (J-Fall)
Maarten Mulders137 views
React in 40 minutes (Voxxed Days Romania) by Maarten Mulders
React in 40 minutes (Voxxed Days Romania) React in 40 minutes (Voxxed Days Romania)
React in 40 minutes (Voxxed Days Romania)
Maarten Mulders93 views
React in 50 minutes (Bucharest Software Craftsmanship Community) by Maarten Mulders
React in 50 minutes (Bucharest Software Craftsmanship Community)React in 50 minutes (Bucharest Software Craftsmanship Community)
React in 50 minutes (Bucharest Software Craftsmanship Community)
Maarten Mulders244 views
React in 50 Minutes (JNation) by Maarten Mulders
 React in 50 Minutes (JNation)  React in 50 Minutes (JNation)
React in 50 Minutes (JNation)
Maarten Mulders143 views
Building a DSL with GraalVM (Oracle Groundbreaker APAC Virtual Tour) by Maarten Mulders
Building a DSL with GraalVM (Oracle Groundbreaker APAC Virtual Tour)Building a DSL with GraalVM (Oracle Groundbreaker APAC Virtual Tour)
Building a DSL with GraalVM (Oracle Groundbreaker APAC Virtual Tour)
Maarten Mulders128 views
Building a DSL with GraalVM (javaBin online) by Maarten Mulders
Building a DSL with GraalVM (javaBin online)Building a DSL with GraalVM (javaBin online)
Building a DSL with GraalVM (javaBin online)
Maarten Mulders221 views
React in 50 Minutes (OpenValue) by Maarten Mulders
React in 50 Minutes (OpenValue) React in 50 Minutes (OpenValue)
React in 50 Minutes (OpenValue)
Maarten Mulders162 views
React in 50 Minutes (DevNexus) by Maarten Mulders
React in 50 Minutes (DevNexus) React in 50 Minutes (DevNexus)
React in 50 Minutes (DevNexus)
Maarten Mulders114 views
Building web applications with React (Jfokus) by Maarten Mulders
Building web applications with React (Jfokus)Building web applications with React (Jfokus)
Building web applications with React (Jfokus)
Maarten Mulders202 views
Building a DSL with GraalVM (CodeOne) by Maarten Mulders
Building a DSL with GraalVM (CodeOne)Building a DSL with GraalVM (CodeOne)
Building a DSL with GraalVM (CodeOne)
Maarten Mulders160 views
Building a DSL with GraalVM (Full Stack Antwerpen) by Maarten Mulders
Building a DSL with GraalVM (Full Stack Antwerpen)Building a DSL with GraalVM (Full Stack Antwerpen)
Building a DSL with GraalVM (Full Stack Antwerpen)
Maarten Mulders169 views
Building a DSL with GraalVM (Devoxx PL) by Maarten Mulders
Building a DSL with GraalVM (Devoxx PL) Building a DSL with GraalVM (Devoxx PL)
Building a DSL with GraalVM (Devoxx PL)
Maarten Mulders253 views

Recently uploaded

The Era of Large Language Models.pptx by
The Era of Large Language Models.pptxThe Era of Large Language Models.pptx
The Era of Large Language Models.pptxAbdulVahedShaik
5 views9 slides
Generic or specific? Making sensible software design decisions by
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
6 views60 slides
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut... by
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...Deltares
7 views28 slides
Keep by
KeepKeep
KeepGeniusee
75 views10 slides
Short_Story_PPT.pdf by
Short_Story_PPT.pdfShort_Story_PPT.pdf
Short_Story_PPT.pdfutkarshsatishkumarsh
5 views16 slides
Unleash The Monkeys by
Unleash The MonkeysUnleash The Monkeys
Unleash The MonkeysJacob Duijzer
7 views28 slides

Recently uploaded(20)

Generic or specific? Making sensible software design decisions by Bert Jan Schrijver
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut... by Deltares
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
Deltares7 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm14 views
Advanced API Mocking Techniques by Dimpy Adhikary
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking Techniques
Dimpy Adhikary19 views
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the... by Deltares
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
Deltares6 views
Airline Booking Software by SharmiMehta
Airline Booking SoftwareAirline Booking Software
Airline Booking Software
SharmiMehta6 views
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema by Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - GeertsemaDSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
DSD-INT 2023 Delft3D FM Suite 2024.01 1D2D - Beta testing programme - Geertsema
Deltares17 views
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by Deltares
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
Deltares11 views
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares9 views
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... by Marc Müller
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller38 views
Dapr Unleashed: Accelerating Microservice Development by Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski10 views
AI and Ml presentation .pptx by FayazAli87
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptx
FayazAli8711 views
Sprint 226 by ManageIQ
Sprint 226Sprint 226
Sprint 226
ManageIQ5 views

SSL/TLS for Mortals (Oracle Groundbreaker EMEA Virtual Tour)

  • 1. SSL/TLS M Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 2. T L S Awesome Sauce, or... Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 3. H 🤯Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) at sun.security.ssl.ClientHandshaker.serverCertif cate(ClientHandshaker.java:1506) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:979) at sun.security.ssl.Handshaker.process_record(Handshaker.java:914) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) at sun.net. .protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) at sun.net. .protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at sun.net. .protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1512) at sun.net. .protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1440) at sun.net. .protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254) at it.mulders.maarten.Demo.main(Demo.java:13) Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderExc at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:387) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) at sun.security.validator.Validator.validate(Validator.java:260) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) at sun.security.ssl.ClientHandshaker.serverCertif cate(ClientHandshaker.java:1488) 13 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to f nd valid certif cation path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:146) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:131) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun security validator PKIXValidator doBuild(PKIXValidator java:382) Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 5. 7 L OSI M data unit layers Data Data Data Segments Packets Frames Bits Application Network Process to Application Presentation Data Representation and Encryption Session Interhost Communication Transport End-to-End Connections and Reliability Network Path Determination and Logical Addressing (IP) Data Link Physical Addressing (MAC and LLC) Physical Media, Signal and Binary Transmission HostLayersMediaLayers Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 6. H SSL TLS SSL 1.0 never released SSL 2.0 1995 - 2011 (POODLE) SSL 3.0 1996 - 2014 (POODLE) TLS 1.0 1999 - 2011 (BEAST) TLS 1.1 2006 TLS 1.2 2008 TLS 1.3 2018 Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 7. D What's the issue?! Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 8. H . public/private key encryption . signed certificates . certificate authorities Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 9. 1 P P K E Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 12. M . Select two prime numbers: . Calculate product: . Select random number < product: . Find d, so that a. b. c. d. Note that varies with : when . p = 11, q = 17 p ∗ q = 187 e = 3 (d ∗ e) − 1 mod (p − 1) ∗ (q − 1) = 0 (d ∗ 3) − 1 mod (10 ∗ 16) = 0 320 mod 160 = 0 (321 − 1) mod 160 = 0 (107 ∗ 3) = 321 ⇒ d = 107 d e e = 75, d = 183 Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 13. N , P Q . . Find d, so that Pretty hard without knowing and ! As soon as we know , calculating is trivial (again). p ∗ q = 299, e = 5 (d ∗ e) − 1 mod (p − 1) ∗ (q − 1) = 0 p q p = 13, q = 23 d = 317 Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 14. For big enough and , finding those factors will cost an eternity! So we can distribute and even ! p q p ∗ q e Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 15. L "G" p ∗ q = 187, e = 3, G ⇒ 7 = = 3437 e 7 3 343 mod 187 = 156 Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 16. L "156" Since we know and , we can calculatep q d = 107 = ≈ 4.6 ∗156 d 156 107 10 234 mod 187 = 7156 107 7 ⇒ G Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 18. N Client Server 1 ClientHello → 2 ← ServerHello 3 ← Certificate 4 ← ServerKeyExchange 5 ← ServerHelloDone 6 ClientKeyExchange → 7 ChangeCipherSpec → 8 Finished → 9 ← ChangeCipherSpec 10 ← Finished Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 19. D No-one is eavesdropping! Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 20. 2 S C Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 21. A certificate contains: Serial Number Subject Validity Usage Public Key Fingerprint Algorithm Fingerprint Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 22. But wait... anyone could create a certificate! So we also need Signature Algorithm Signature Issuer ... and a way to sign certificates. Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 24. A signature is a mathematical relationship between a message , a private key and a public key . It consists of two functions: . signing function . verifying function So, given and and knowing , we can tell if is indeed signed by . x sk pk t = f (sk, x) [accept, reject] = g(pk, t, x) x t pk x sk Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 25. 3 C A Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 26. An entity that issues digital certificates, certifying the ownership of a public key by the subject of the certificate. Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 27. I John ? Alice So, who is John, anyway? Many John's in todays browsers and operating systems! “I can trust you, because I trust John, and John trusts Alice, and Alice trusts you. Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 28. Top-notch security procedures, including "key ceremonies" Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 31. /** intentionally left blank */ Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 32. W Google blacklists 247 certificates in Chromium Microsoft removes the DigiNotar root certificate from all supported Windows-releases * Mozilla revokes trust in the DigiNotar root certificate in all supported versions Apple issued Security Update 2011-005 Update Certificate Revocation Lists (although these are self- signed) Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 33. D Trust (for what it's worth) Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 34. T , T T Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 35. Simple HTTP client with TLS support: curl -v -k <address> Troubleshoot trust issues and see certificates being used: openssl s_client -showcerts -servername <address> - connect <address>:443 Troubleshoot supported protocols, ciphers, ...: nmap --script ssl-enum-ciphers -p 443 <address> Trace (or even decrypt) TLS traffic: ssldump -i eth0 port 443 and host <address> (add -Ad -k <keyfile> -p <password> for decryption) Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 36. JVM S -Djavax.net.ssl.trustStore=<file> Denotes where a truststore can be found: a file that contains trusted certs. -Djavax.net.ssl.trustStorePassword=changeit is the password to that file. Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 37. JVM S -Djavax.net.ssl.keyStore=<file> Denotes where a keystore can be found: a file that contains public and/or private keys. -Djavax.net.ssl.keyStorePassword=changeit is the password to that file. Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 38. JVM S -Djavax.net.debug=ssl[:flag] Include debug logging for TLS handshake and connections. Additional flags: record session sessioncache pluggability plaintext handshake defaultctx keymanager data packet keygen sslctx trustmanager verbose Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 39. P Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 40. P 🔑 - . Don't use SSL! Use TLS v1.2 or v1.3. . Be careful whom you trust! . When in doubt, open your toolbox: openssl, curl, nmap, ssldump and Portecle Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals
  • 41. Q I Router by Public Key Krüpto by , , and ( ) Puss In Boots by IANA Root KSK Ceremony #36 @ Beverwijk by @ unknown author Sándor P. Fekete Sebastian Morr Sebastian Stiller @ideainstruction kisspng https://www.iana.org/dnssec/ceremonies/36 Gerard Hogervorst Wikimedia Commons Maarten Mulders (@mthmulders)  OGB EMEA Virtual Tour #tlsformortals