Learning TLS (aka SSL)

To understand the modern HTTP with security layer including encryption algorithm and key exchange rituals, I decided to learn TLS (Transport Layer Security) protocol in the lowest level. The implementation should be done without using any TLS libraries out there – maybe I’ll use them as a reference but not in my code.
Back in days before SSL/TLS era, talking to a web server was very simple – you only need some HTTP methods such as GET and POST with a URI, and some HTTP headers after that, and the end marker of double CRLF, to be sent over a TCP socket on port 80. This is so easy that I am using this topic to train the new engineers on how to use TCP sockets.

In TLS, all you can do as a client is to say “Hello” to the server and then the server will send you a challenge to which you must respond with a right response. At this stage you need to understand how key exchange works, different hash algorithms and authentication authorities, etc., which I don’t know much about.

The first thing I did was to set up the development environment on my mac including
– Install CMake (I need to learn this too because I don’t want to learn Makefile)
– Install boost (I’ll use it as a reference TLS implementation)
– Install OpenSSL (boost asio depends on this.)

While trying a minimum SSL app, I had an error when linking as below. This happens even I had boost ssl header file included. I guess I am missing some dependent libraries for OpenSSL.

Leave a Reply

Your email address will not be published. Required fields are marked *