Forward Secrecy
Kevin O’Brien
Washtenaw Linux Users Group
Encrypted Communication
● Most examples involve Alice and Bob trying to
communicate securely
● This is not the actual most common use case
● Most of the time, we as individuals want to exchange
messages with servers on the Internet
● This generally involves both Diffie-Hellman and a public
key method such as RSA
Example
● I want a secure connection to my bank, and my messages
are traveling over the public Internet
● I cannot rule out someone eavesdropping on my
messages
● If my connection is not secure, they could get my
password to the bank site and steal all of my money
Secure Connections
● Ideally, my bank offers a secure connection by default (if
not, get a better bank!)
● This is usually seen as a URL the begins https, instead of
the old standby http
● This should denote at the very least an ssl connection,
though TLS is preferred these days
● I also have https everywhere installed, which I can get
from the Electronic Frontier Foundation
● https://www.eff.org/https-everywhere
Negotiation
● Whether the site offers a secure connection by default, or
offers it because my browser plug-in asked for one, this is
the beginning of a negotiation
● Which security protocols does the server have available?
● Which one does my browser have?
● What is the strongest protocol we have in common?
The opening bid
● This is the start
● I initiate the connection
● Amazon has not, AFAIK, ever just logged me in and then
asked if I need anything today (though if they figure out
how to do that…)
● I do it with what is called the ClientHello Message
The ClientHello Message
● This will look something like this:
● TLS_DHE_RSA_WITH_AES_256_CBC_SHA
● Every piece means something
● Again, this is something I am sending to the server
Interpretation 1
● TLS = establish a TLS (i.e. Transport Layer Security)
connection
● DHE = using Diffie-Hellman Ephemeral (for the shared
secret used for the session)
● RSA = combined with RSA (the public key protocol used to
create the secure initial connection
● WITH_AES_256 = using Advanced Encryption Standard
(AES) with 256 bits
Interpretation 2
● CBC = using Cipher Block Chaining (CBC)
● SHA = and using the Secure Hashing Algorithm (SHA)
Negotiation
● This should represent the highest level of security my
browser is capable of handling
● There have been security attacks that worked by forcing a
connection at a very low level of security, such as the
POODLE attack
● https://en.wikipedia.org/wiki/POODLE
● This is one reason why SSL has been deprecated in favor
of TLS, which won’t allow downgrade attacks
The ServerHello Message
● The server then responds with its own message, which will
either accept my proposal, or fail and propose something
different
● Once there is an agreed protocol, the server will send two
things
– A certificate containing the public key of the server,
which serves to authenticate it
– A random 32 byte number which will be used for the
Diffie-Hellman Key Exchange
– Note that these are sent publicly
Key Exchange
● Now the client (me) creates its own random number,
encrypts it using the public key of the server, and sends it
to the server
● The server decrypts the message using its private key, and
reads the number
● Each side now has a random secret number from the other
side, and a Diffie-Hellman Key Exchange is done
Negotiations Completed
● Now that there is a shared secret key, there is a Change
Cipher Spec message that switches from the Public Key to
the shared Diffie-Hellman key
● This is used for the rest of the communication
How Secure?
● Diffie-Hellman is known to be secure against
eavesdropping, particularly if a strong Elliptic Curve
algorithm is employed
● The use of a certificate with a Public Key (perhaps using
RSA) makes it more difficult to execute a man-in-the-
middle attack
● That can happen, though, if someone can get in the middle
at the right moment and set up communications with both
sides using its own keys
Man-in-the-middle
● I send a ClientHello message to my bank, but just my darn
luck, Mallory intercepts my ClientHello
● She in turn sends a ClientHello to my bank, and get back the
certificate
● She then creates her own certificate, and send it to me (I am
expecting a certificate, after all)
● She can sit in the middle passing messages back and forth
while decrypting and reading them
● In the US, companies have the right to do this on their
networks (though we hope not to clean out your account)
Securing this
● Number one, pay attention to the certificates. At least that
way you’ll know if someone is getting in the middle.
● Measures like OCSP Stapling make this type of attack
much harder to do
● TLS also provides improved authentication
● HTTP Public Key Pinning
● DNSSEC
End Points?
● Man-in-the-middle attacks are aimed at data in transit
● What about the end points?
● I have some control over my own computer
● But what about the server?
Server Control
● Servers can fall to malicious cracking
● Servers can be seized by law enforcement
● Possible keys can be taken from the server and used to
decrypt communications
● There is a reason governments are starting to insist that
companies keep e-mail servers for their citizens within the
country, and it is not for your protection
Lost Control
● I might not care if it is only my order of specialty teas from
Amazon
● But it might be confidential e-mails
● And if messages are kept for future decryption…
● NSA has a facility that appears to be for that exact purpose
● So even if the data is secure for now, will it be secure in
the future?
Forward Secrecy
● Some call it Perfect Forward Secrecy, but it is not perfect
● Remember, this is an arms race
● And in security perfection is very hard to find
● Any encrypted message can be brute force decrypted
given enough time and resources
● And with improvements in decryption (e.g. quantum
computing) it will take less time and fewer resources
What can you do?
● Forward Secrecy is essentially key protection
● This is done by using new keys for every session
● So even if someone cracked your e-mail written on
January 9, it would not help with your e-mail written
January 10
● Nor would it help with your web browsing on January 9
How It Can Fail
● This requires that keys are not stored, but discarded after
use
● How can you be sure?
● Incompetence happens a lot with servers
● Remember those governments and the e-mail servers?
O’Brien’s First Law
Every government, by its
very nature, regards the
security and privacy of its
citizens as a flaw which it
seeks to remedy by all
possible means.
Still, A Step Forward
● Being used by more companies
● Google
● Twitter
● Apple
● And others
Google
Adam Langley from the Security Team posted a
notice on their Security Blog on November 22, 2011
called Protecting data for the long term with forward
secrecy. In this short blog post he mentions that
Google “support(s) forward secrecy using elliptic
curve Diffie-Hellman”.
https://security.googleblog.com/2011/11/prot
ecting-data-for-long-term-with.html
Twitter
On November 22, 2013, Twitter announced in its blog under the heading
Forward Secrecy at Twitter that they would also be using forward secrecy, and
similarly said the following:
There are two main categories of Diffie-Hellman key exchange. Traditional Diffie-
Hellman (DHE) depends on the hardness of the Discrete Logarithm Problem and
uses significantly more CPU than RSA, the most common key exchange used in
SSL. Elliptic Curve Diffie-Hellman (ECDHE) is only a little more expensive than
RSA for an equivalent security level. Vincent Bernat (@vince2_) benchmarked
ECDHE at a 15% overhead relative to RSA over 2048-bit keys. DHE, by
comparison, used 310% more CPU than RSA.
https://blog.twitter.com/engineering/en_us/a/
2013/forward-secrecy-at-twitter.html
Apple
Apple published a specification called App Transport Security that is now
mandatory for all apps. It has several provisions, but one of them involves
forward security. In an article from the SSL store there is a good description
of this provision:
ATS also requires the use of TLS 1.2 and a cipher suite that provides
forward secrecy. Developers will need to ensure their server is configured
properly. TLS 1.2 is the most recent version of the SSL/TLS protocol, and
most modern servers have it turned on by default. Forward secrecy refers
to the way that connections are encrypted. An encryption cipher which
supports forward secrecy, like ECDHE, is able to offer security to past
sessions even if the private key is compromised.
https://www.thesslstore.com/blog/apple-will-require-use-ats-2017/

More Related Content

PDF
Public Key Authentication With SSH
ODP
Passwords
ODP
SSL certificates
PDF
PBU-Intro_to_PGP
PPTX
Using pgp with mule
PPTX
What is Asymmetric Encryption? Understand with Simple Examples
PPT
Message Authentication: MAC, Hashes
PDF
Industry Best Practices for SSH Access
Public Key Authentication With SSH
Passwords
SSL certificates
PBU-Intro_to_PGP
Using pgp with mule
What is Asymmetric Encryption? Understand with Simple Examples
Message Authentication: MAC, Hashes
Industry Best Practices for SSH Access

Similar to Forward Secrecy (20)

PDF
SSL/TLS Handshake
PPT
8.SSL encryption.ppt
PDF
Go paranoid
PPT
What is Encryption
PPTX
Cours4.pptx
PPTX
A TLS Story
PDF
5 infrastructure security
PPT
SSL.ppt
PDF
TLS/SSL Protocol Design 201006
PPTX
Demystifying TLS
PPTX
TLS/SSL - Study of Secured Communications
PDF
TLS/SSL Protocol Design
PDF
#Morecrypto (with tis) - version 2.2
PDF
SSL, X.509, HTTPS - How to configure your HTTPS server
PDF
The SSL Problem and How to Deploy SHA2 Certificates
PDF
Computer network (4)
PDF
Overview of SSL & TLS Client-Server Interactions
PDF
Ssl tls-beginners-guide
PPTX
SSL/TLS Eavesdropping with Fullpath Control
PDF
SSL Demystified
SSL/TLS Handshake
8.SSL encryption.ppt
Go paranoid
What is Encryption
Cours4.pptx
A TLS Story
5 infrastructure security
SSL.ppt
TLS/SSL Protocol Design 201006
Demystifying TLS
TLS/SSL - Study of Secured Communications
TLS/SSL Protocol Design
#Morecrypto (with tis) - version 2.2
SSL, X.509, HTTPS - How to configure your HTTPS server
The SSL Problem and How to Deploy SHA2 Certificates
Computer network (4)
Overview of SSL & TLS Client-Server Interactions
Ssl tls-beginners-guide
SSL/TLS Eavesdropping with Fullpath Control
SSL Demystified
Ad

More from Kevin OBrien (20)

PPTX
American icon pmi
ODP
Tls 1.3
ODP
Diffie_Hellman-Merkle Key Exchange
ODP
Password best practices and the last pass hack
ODP
Encryption basics
PDF
Linux Directory Structure
PDF
Hardware Discovery Commands
PDF
Introduction to linux
PDF
Help, my computer is sluggish
PDF
The ps Command
PDF
Installing Software, Part 3: Command Line
PDF
Installing Software, Part 2: Package Managers
PDF
Installing Software, Part 1 - Repositories
PDF
Installing Linux: Partitioning and File System Considerations
PDF
The ifconfig Command
PDF
Find and Locate: Two Commands
PDF
The Shell Game Part 4: Bash Shortcuts
PDF
The Shell Game Part 3: Introduction to Bash
PDF
The Shell Game Part 2: What are your shell choices?
PDF
The Shell Game Part 1: What is a shell?
American icon pmi
Tls 1.3
Diffie_Hellman-Merkle Key Exchange
Password best practices and the last pass hack
Encryption basics
Linux Directory Structure
Hardware Discovery Commands
Introduction to linux
Help, my computer is sluggish
The ps Command
Installing Software, Part 3: Command Line
Installing Software, Part 2: Package Managers
Installing Software, Part 1 - Repositories
Installing Linux: Partitioning and File System Considerations
The ifconfig Command
Find and Locate: Two Commands
The Shell Game Part 4: Bash Shortcuts
The Shell Game Part 3: Introduction to Bash
The Shell Game Part 2: What are your shell choices?
The Shell Game Part 1: What is a shell?
Ad

Recently uploaded (20)

PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Flame analysis and combustion estimation using large language and vision assi...
PPTX
Chapter 5: Probability Theory and Statistics
DOCX
search engine optimization ppt fir known well about this
PPTX
Build Your First AI Agent with UiPath.pptx
PDF
Developing a website for English-speaking practice to English as a foreign la...
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PPTX
Microsoft Excel 365/2024 Beginner's training
PDF
sbt 2.0: go big (Scala Days 2025 edition)
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PPT
What is a Computer? Input Devices /output devices
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
PPTX
The various Industrial Revolutions .pptx
A contest of sentiment analysis: k-nearest neighbor versus neural network
Flame analysis and combustion estimation using large language and vision assi...
Chapter 5: Probability Theory and Statistics
search engine optimization ppt fir known well about this
Build Your First AI Agent with UiPath.pptx
Developing a website for English-speaking practice to English as a foreign la...
Comparative analysis of machine learning models for fake news detection in so...
OpenACC and Open Hackathons Monthly Highlights July 2025
Custom Battery Pack Design Considerations for Performance and Safety
A review of recent deep learning applications in wood surface defect identifi...
Convolutional neural network based encoder-decoder for efficient real-time ob...
Microsoft Excel 365/2024 Beginner's training
sbt 2.0: go big (Scala Days 2025 edition)
A proposed approach for plagiarism detection in Myanmar Unicode text
What is a Computer? Input Devices /output devices
Zenith AI: Advanced Artificial Intelligence
Improvisation in detection of pomegranate leaf disease using transfer learni...
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Produktkatalog für HOBO Datenlogger, Wetterstationen, Sensoren, Software und ...
The various Industrial Revolutions .pptx

Forward Secrecy

  • 2. Encrypted Communication ● Most examples involve Alice and Bob trying to communicate securely ● This is not the actual most common use case ● Most of the time, we as individuals want to exchange messages with servers on the Internet ● This generally involves both Diffie-Hellman and a public key method such as RSA
  • 3. Example ● I want a secure connection to my bank, and my messages are traveling over the public Internet ● I cannot rule out someone eavesdropping on my messages ● If my connection is not secure, they could get my password to the bank site and steal all of my money
  • 4. Secure Connections ● Ideally, my bank offers a secure connection by default (if not, get a better bank!) ● This is usually seen as a URL the begins https, instead of the old standby http ● This should denote at the very least an ssl connection, though TLS is preferred these days ● I also have https everywhere installed, which I can get from the Electronic Frontier Foundation ● https://www.eff.org/https-everywhere
  • 5. Negotiation ● Whether the site offers a secure connection by default, or offers it because my browser plug-in asked for one, this is the beginning of a negotiation ● Which security protocols does the server have available? ● Which one does my browser have? ● What is the strongest protocol we have in common?
  • 6. The opening bid ● This is the start ● I initiate the connection ● Amazon has not, AFAIK, ever just logged me in and then asked if I need anything today (though if they figure out how to do that…) ● I do it with what is called the ClientHello Message
  • 7. The ClientHello Message ● This will look something like this: ● TLS_DHE_RSA_WITH_AES_256_CBC_SHA ● Every piece means something ● Again, this is something I am sending to the server
  • 8. Interpretation 1 ● TLS = establish a TLS (i.e. Transport Layer Security) connection ● DHE = using Diffie-Hellman Ephemeral (for the shared secret used for the session) ● RSA = combined with RSA (the public key protocol used to create the secure initial connection ● WITH_AES_256 = using Advanced Encryption Standard (AES) with 256 bits
  • 9. Interpretation 2 ● CBC = using Cipher Block Chaining (CBC) ● SHA = and using the Secure Hashing Algorithm (SHA)
  • 10. Negotiation ● This should represent the highest level of security my browser is capable of handling ● There have been security attacks that worked by forcing a connection at a very low level of security, such as the POODLE attack ● https://en.wikipedia.org/wiki/POODLE ● This is one reason why SSL has been deprecated in favor of TLS, which won’t allow downgrade attacks
  • 11. The ServerHello Message ● The server then responds with its own message, which will either accept my proposal, or fail and propose something different ● Once there is an agreed protocol, the server will send two things – A certificate containing the public key of the server, which serves to authenticate it – A random 32 byte number which will be used for the Diffie-Hellman Key Exchange – Note that these are sent publicly
  • 12. Key Exchange ● Now the client (me) creates its own random number, encrypts it using the public key of the server, and sends it to the server ● The server decrypts the message using its private key, and reads the number ● Each side now has a random secret number from the other side, and a Diffie-Hellman Key Exchange is done
  • 13. Negotiations Completed ● Now that there is a shared secret key, there is a Change Cipher Spec message that switches from the Public Key to the shared Diffie-Hellman key ● This is used for the rest of the communication
  • 14. How Secure? ● Diffie-Hellman is known to be secure against eavesdropping, particularly if a strong Elliptic Curve algorithm is employed ● The use of a certificate with a Public Key (perhaps using RSA) makes it more difficult to execute a man-in-the- middle attack ● That can happen, though, if someone can get in the middle at the right moment and set up communications with both sides using its own keys
  • 15. Man-in-the-middle ● I send a ClientHello message to my bank, but just my darn luck, Mallory intercepts my ClientHello ● She in turn sends a ClientHello to my bank, and get back the certificate ● She then creates her own certificate, and send it to me (I am expecting a certificate, after all) ● She can sit in the middle passing messages back and forth while decrypting and reading them ● In the US, companies have the right to do this on their networks (though we hope not to clean out your account)
  • 16. Securing this ● Number one, pay attention to the certificates. At least that way you’ll know if someone is getting in the middle. ● Measures like OCSP Stapling make this type of attack much harder to do ● TLS also provides improved authentication ● HTTP Public Key Pinning ● DNSSEC
  • 17. End Points? ● Man-in-the-middle attacks are aimed at data in transit ● What about the end points? ● I have some control over my own computer ● But what about the server?
  • 18. Server Control ● Servers can fall to malicious cracking ● Servers can be seized by law enforcement ● Possible keys can be taken from the server and used to decrypt communications ● There is a reason governments are starting to insist that companies keep e-mail servers for their citizens within the country, and it is not for your protection
  • 19. Lost Control ● I might not care if it is only my order of specialty teas from Amazon ● But it might be confidential e-mails ● And if messages are kept for future decryption… ● NSA has a facility that appears to be for that exact purpose ● So even if the data is secure for now, will it be secure in the future?
  • 20. Forward Secrecy ● Some call it Perfect Forward Secrecy, but it is not perfect ● Remember, this is an arms race ● And in security perfection is very hard to find ● Any encrypted message can be brute force decrypted given enough time and resources ● And with improvements in decryption (e.g. quantum computing) it will take less time and fewer resources
  • 21. What can you do? ● Forward Secrecy is essentially key protection ● This is done by using new keys for every session ● So even if someone cracked your e-mail written on January 9, it would not help with your e-mail written January 10 ● Nor would it help with your web browsing on January 9
  • 22. How It Can Fail ● This requires that keys are not stored, but discarded after use ● How can you be sure? ● Incompetence happens a lot with servers ● Remember those governments and the e-mail servers?
  • 23. O’Brien’s First Law Every government, by its very nature, regards the security and privacy of its citizens as a flaw which it seeks to remedy by all possible means.
  • 24. Still, A Step Forward ● Being used by more companies ● Google ● Twitter ● Apple ● And others
  • 25. Google Adam Langley from the Security Team posted a notice on their Security Blog on November 22, 2011 called Protecting data for the long term with forward secrecy. In this short blog post he mentions that Google “support(s) forward secrecy using elliptic curve Diffie-Hellman”. https://security.googleblog.com/2011/11/prot ecting-data-for-long-term-with.html
  • 26. Twitter On November 22, 2013, Twitter announced in its blog under the heading Forward Secrecy at Twitter that they would also be using forward secrecy, and similarly said the following: There are two main categories of Diffie-Hellman key exchange. Traditional Diffie- Hellman (DHE) depends on the hardness of the Discrete Logarithm Problem and uses significantly more CPU than RSA, the most common key exchange used in SSL. Elliptic Curve Diffie-Hellman (ECDHE) is only a little more expensive than RSA for an equivalent security level. Vincent Bernat (@vince2_) benchmarked ECDHE at a 15% overhead relative to RSA over 2048-bit keys. DHE, by comparison, used 310% more CPU than RSA. https://blog.twitter.com/engineering/en_us/a/ 2013/forward-secrecy-at-twitter.html
  • 27. Apple Apple published a specification called App Transport Security that is now mandatory for all apps. It has several provisions, but one of them involves forward security. In an article from the SSL store there is a good description of this provision: ATS also requires the use of TLS 1.2 and a cipher suite that provides forward secrecy. Developers will need to ensure their server is configured properly. TLS 1.2 is the most recent version of the SSL/TLS protocol, and most modern servers have it turned on by default. Forward secrecy refers to the way that connections are encrypted. An encryption cipher which supports forward secrecy, like ECDHE, is able to offer security to past sessions even if the private key is compromised. https://www.thesslstore.com/blog/apple-will-require-use-ats-2017/