Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Https actually use transport layer security

Tags:

https

ssl

I have a doubt on HTTPS. One of my seniors told me that Https does not actually use SSL/TLS, but only their the encryption algorithms. He says that the handshaking process with certificates are done in the transport layer, but the security key encryption for actual payload is done in the Application layer. And he also said that Https can actually be considered as a presentation layer protocol.

Is he correct?

like image 699
Prasad Weera Avatar asked Mar 08 '26 16:03

Prasad Weera


1 Answers

HTTPS is specified in RFC 2818: "HTTP Over TLS".

Although the specification is about TLS (because it's an IETF specification, and IETF only uses "TLS"), it's in fact about SSL or TLS, depending on the version of SSL/TLS used (see difference between SSL and TLS).

So yes, HTTPS does use SSL/TLS. As the RFC says:

Conceptually, HTTP/TLS is very simple. Simply use HTTP over TLS precisely as you would use HTTP over TCP.

Essentially, the encryption keys are negotiated during the SSL/TLS handshake, and the HTTP exchange isn't aware of those keys.

If you're not convinced, look at some browser traffic using Wireshark. All you'll see is some SSL/TLS traffic (the HTTP exchanged being encrypted by it).

If you want to analyse some traffic, you can set up your own server and use its private key to look at the normal HTTP exchange on top of SSL/TLS using Wireshark too, as described in the Wireshark SSL page. (You'll need to disable EDH cipher suites, because they provide perfect forward secrecy, which prevent you from deciphering sniffed traffic even if you have the server private key.) This page also has some example HTTPS data you can download and look at with Wireshark, without having to install your own server.

From the browser point of view, you can also look at the traffic as reported by the developer tools (Firebug and so on) when using HTTPS, you'll just see plain HTTP traffic, since the SSL/TLS layer is taken care of by the SSL/TLS library underneath.

I wouldn't stress too much about the OSI layers in general. They look good in theoretical networking classes, but are in fact difficult to apply to the TCP/IP stack (see comparison and "layering considered harmful"), especially when you throw SSL/TLS into it, which is precisely designed to be an invisible layer as far as the application layer is concerned (SSL/TLS usually sits on top of TCP, like any other application protocol on top of TCP, but it sits under any application protocol it protects).

like image 82
Bruno Avatar answered Mar 10 '26 13:03

Bruno