LuxSci

What is really protected by SSL and TLS?

Published: April 8th, 2017

This question came in via Ask Erik:

Hi Erik,

I stumbled upon your blog while trying to learn a little about SSL/TLS in the context of client/server e-mail sessions, i.e. not web mail which I understand to be an HTTP session.  I am just an ordinary user with no special security needs but I find all this news about corporate and government surveillance to be troubling for both philosophical and practical reasons.  In any case my questions is quite simple.

My e-mail client, apple mail, and my e-mail service provider both support SSL so my e-mail exchanges between my computer and the server are encrypted.  I understand that I can’t control what happens with other e-mail servers.  What I am trying to understand is what does it mean to be encrypted?  When an e-mail leaves my computer how much of the message is encrypted?   Are the e-mail headers encrypted including the sender and recipient e-mail addresses.  I would assume so but nobody talks about the details.  What metadata trail does a user leave when using SSL/TLS.  Is it is as simple as the destination and sending IP address with everything else encrypted?  Reading Data and Goliath right now by Bruce Schneider which talks about a lot of this stuff but again doesn’t give quite enough detail.  At the end of the day I am trying to understand how much protection SSL really provides.

SSL (now TLS) protects data as it travels across the Internet. To understand in detail how SSL works, we recommend reading: How does Secure Socket Layer (SSL andTLS) work?  However, looking at how the protocol works can leave answers to some of these fundamental questions a little unclear.  Lets address them one by one.

SSL and TLS Security

What does it mean (for a connection) to be encrypted (with SSL or TLS)?

This means that the the server’s identify was verified using an SSL certificate that was signed by a trusted third party (how does that work?) and thus that you are (hopefully) communicating with the desired server and not a phishing or attacking server.  Second, it means that your data is being encrypted on your computer (e.g. using AES), send to this server, and then decrypted once it arrives there.

As long as you really are communicating with the intended server and a strong cipher and key exchange algorithm are used, then your data will be safe … or as safe as people commonly consider OK for important communications (e.g. banking, shopping, etc.) over the Internet.

When an e-mail leaves my computer how much of the message is encrypted?

When using SSL or TLS and sending an email (through WebMail, SMTP, ActiveSync, or some other protocol), the entire messages is encrypted.  This means everything:

  • The header
  • The body
  • The attachments
  • The “envelope” — the sender and recipients

Are the e-mail headers encrypted including the sender and recipient e-mail addresses?

Yes.

What metadata trail does a user leave when using SSL/TLS?

This is an excellent question.

While all of your data is encrypted and protected, some things are not and can not be.  This includes:

  • Your IP Address: The IP address from which your connection is originating.  Unless you are using a VPN to hide your location, there is a record of where you are when you make your SSL/TLS connection.  E.g. “Oh — he is using comcast cable and he is located approximately here on the map.”
  • The Server IP Address:  Anyone eavesdropping on your connection can determine what server you are connecting to (unless you are using TOR and the people interested do not have the resources of a nation state like the US government).  In many cases, knowing the IP address that you are connecting to definitively indicates which specific company you are connecting to.
  • The Domain You Are Connecting To: Many SSL/TLS connections include the actual name of the server you are connecting to as part of the unencrypted request (see Server Name Indication).  There are many reasons why this happens.  But it does mean that if eavesdroppers can’t tell you destination from your destination IP address, they may be able to tell from the included server name itself.
  • The Server Port:  One server can have different services (e.g. WebMail, IMAP, SMTP, SMTP, etc.).  These all run on the same IP address, but are differentiated by their “port number.”  I.e., if you connect to “port 443,” then you are usually connecting to a web server over SSL/TLS.  If you are connecting to port 25, then you are connecting to an outbound email (SMTP) service, etc.  The ports used for various services are standardized, so most providers use the same ports for the same services.  Knowing the port number gives a good indication of what your secure connection is for.

The metadata that is left behind by your connection includes:

  • Where you are coming from
  • Where you are connecting to (including the hostname).
  • What service/port you are interacting with.  E.g. are you sending email, accessing a web site, etc.

So, the message data itself is secured.  However, your activity is plainly visible.  As a case in point: if you were visiting a pornography site or a dating site or a terrorist propaganda site — that information is known and tracked.  Which particular webpage you visited and what you did would not be known; however, the number of requests you made of the site and how long you browsed it would be known.

Similarly, if you were trying to access your personal email from work, then your work network can identify what you are doing and choose to block non-work email activity from the work network …. or it may alert your manager to this activity.

What can you do about this?

There is no way to be completely anonymous on the Internet.  No matter what you do, an organization with enough resources can track you. If your level of concern does not rise to the level of hiding from nation state organizations, then there are steps you can take which provide some pretty effective protections.  These include:

  1. Use a VPN. This will encrypt ALL of your Internet traffic from your computer until it emerges from your VPN provider’s network.  This hides your location and also hides your traffic from those how might be eavesdropping on your connection near you (e.g. in your home or office network, in the coffee shop hot spot you are using, in your ISP, etc.)
  2. Use The Onion Router (TOR). TOR encrypts your traffic and obfuscates the route it takes over the Internet.  This makes it harder to see what your traffic was and very difficult to match up your activity to where you are actually connecting to.  Use of TOR makes your connections very much slower, but it is very effective at obfuscating your Internet activities against non-nation-state adversaries.  I.e. against common hacking groups and techniques.

Of course, if all you are concerned about is the protection of your data and not obfuscating your activities, then SSL and TLS should be sufficient in most cases.  It is certainly sufficient to meet US government compliance laws such as HIPAA and PCI.

Leave a Comment


You must be connected or logged in to post a comment. This is to reduce spam comments.

If you have not previously commented, you can connect using existing social media account, or register with a new username and password.