Appendix A: SSL/TLS Overview

A.1 General Architecture

The wolfSSL embedded SSL library implements SSL 3.0, TLS 1.0, TLS 1.1 and TLS 1.2 protocols. TLS 1.2 is currently the most secure and up to date version of the standard. wolfSSL does not support SSL 2.0 due to the fact that it has been insecure for several years.

The TLS protocol in wolfSSL is implemented as defined in RFC 5246 ( Two record layer protocols exist within SSL - the message layer and the handshake layer. Handshake messages are used to negotiate a common cipher suite, create secrets, and enable a secure connection. The message layer encapsulates the handshake layer while also supporting alert processing and application data transfer.

A general diagram of how the SSL protocol fits into existing protocols can be seen in Figure 1. SSL sits in between the Transport and Application layers of the OSI model, where any number of protocols (including TCP/IP, Bluetooth, etc.) may act as the transport medium.  Application protocols are layered on top of SSL (such as HTTP, FTP, and SMTP).

(Figure 1: SSL Protocol Diagram)

A.2 SSL Handshake

The SSL handshake involves several steps, some of which are optional depending on what options the SSL client and server have been configured with.  Below, in Figure 2, you will find a simplified diagram of the SSL handshake process.

(Figure 2: SSL Handshake Diagram)

A.3 Differences between SSL and TLS Protocol Versions

SSL (Secure Socket Layer) and TLS (Transport Security Layer) are both cryptographic protocols which provide secure communication over networks. These two protocols (and the several version of each) are in widespread use today in applications ranging from web browsing to e-mail to instant messaging and VoIP. Each protocol, and the underlying versions of each, are slightly different from the other.  

Below you will find both an explanation of and the major differences between the different SSL and TLS protocol versions. For specific details about each protocol, please reference the RFC specification mentioned.

SSL 3.0

This protocol was released in 1996 but began with the creation of SSL 1.0 developed by Netscape. Version 1.0 wasn't released, and version 2.0 had a number of security flaws, thus leading to the release of SSL 3.0. Some major improvements of SSL 3.0 over SSL 2.0 are:

  1. Separation of the transport of data from the message layer

  2. Use of a full 128 bits of keying material even when using the Export cipher

  3. Ability of the client and server to send chains of certificates, thus allowing organizations to use certificate hierarchy which is more than two certificates deep.

  4. Implementing a generalized key exchange protocol, allowing Diffie-Hellman and Fortezza key exchanges as well as non-RSA certificates.

  5. Allowing for record compression and decompression

  6. Ability to fall back to SSL 2.0 when a 2.0 client is encountered

TLS 1.0

This protocol was first defined in RFC 2246 in January of 1999. This was an upgrade from SSL 3.0 and the differences were not dramatic, but they are significant enough that SSL 3.0 and TLS 1.0 don't inter-operate. Some of the major differences between SSL 3.0 and TLS 1.0 are:

  1. Key derivation functions are different

  2. MACs are different - SSL 3.0 uses a modification of an early HMAC while TLS 1.0 uses HMAC.

  3. The Finished messages are different

  4. TLS has more alerts

  5. TLS requires DSS/DH support

TLS 1.1

This protocol was defined in RFC 4346 in April of 2006, and is an update to TLS 1.0.  The major changes are:

  1. The Implicit Initialization Vector (IV) is replaced with an explicit IV to protect against Cipher block chaining (CBC) attacks.

  2. Handling of padded errors is changed to use the bad_record_mac alert rather than the decryption_failed alert to protect against CBC attacks.

  3. IANA registries are defined for protocol parameters

  4. Premature closes no longer cause a session to be non-resumable.

TLS 1.2

This protocol was defined in RFC 5246 in August of 2008.  Based on TLS 1.1, TLS 1.2 contains improved flexibility. The major differences include:

  1. The MD5/SHA-1 combination in the pseudorandom function (PRF) was replaced with cipher-suite-specified PRFs.

  2. The MD5/SHA-1 combination in the digitally-signed element was replaced with a single hash.  Signed elements include a field explicitly specifying the hash algorithm used.

  3. There was substantial cleanup to the client's and server's ability to specify which hash and signature algorithms they will accept.

  4. Addition of support for authenticated encryption with additional data modes.

  5. TLS Extensions definition and AES Cipher Suites were merged in.

  6. Tighter checking of EncryptedPreMasterSecret version numbers.

  7. Many of the requirements were tightened

  8. Verify_data length depends on the cipher suite

  9. Description of Bleichenbacher/Dlima attack defenses cleaned up.


wolfSSL Manual

Docs -> wolfSSL Manual

Questions? +1 (425) 245-8247