If you’re planning to take the SY0-501 version of the Security+ exam, you should have a good understanding of basic cryptography concepts. This includes transport encryption methods used with HTTPS.
For example, can you answer this question?
Q. Network administrators in your organization need to administer firewalls, security appliances, and other network devices. These devices are protected with strong passwords, and the passwords are stored in a file listing these passwords. Which of the following is the BEST choice to protect this password list?
A. File encryption
B. Database field encryption
C. Full database encryption
D. Whole disk encryption
More, do you know why the correct answer is correct and the incorrect answers are incorrect? The answer and explanation are available at the end of this post.
Transport Encryption
Transport encryption methods encrypt data-in-transit to ensure transmitted data remains confidential. This includes data transmitted over the Internet and on internal networks. An example is the use of Secure Shell (SSH) to encrypt traffic, such as Secure File Transfer Protocol (SFTP). This blog post focuses on transport encryption methods used with HTTPS.
SSL Versus TLS
Secure Sockets Layer (SSL) and Transport Layer Security (TLS) are encryption protocols that have been commonly used to encrypt data-in-transit. For example, it is common to encrypt HTTPS with either SSL or TLS to ensure confidentiality of data transmitted over the Internet. They can also be used to encrypt other transmissions such as File Transfer Protocol Secure (FTPS).
Netscape created SSL for its web browser and updated it to version SSL 3.0. This was before organizations such as the Internet Engineering Task Force (IETF) created and maintained standards. Netscape’s success waned and there wasn’t a standardization process to update SSL, even though all web browsers were using it. The IETF created TLS to standardize improvements with SSL.
Both SSL and TLS provide certificate-based authentication and they encrypt data with a combination of both symmetric and asymmetric encryption during a session. They use asymmetric encryption for the key exchange (to privately share a session key) and symmetric encryption to encrypt data displayed on the web page and transmitted during the session. The next section shows this process.
Transport Layer Security
Transport Layer Security (TLS) is a replacement for SSL and is widely used in many different applications. The IETF has updated and published several TLS documents specifying the standard. TLS 1.0 is based on SSL 3.0 and is referred to as SSL 3.1. Similarly, each update to TLS indicates it is an update to SSL. For example, TLS 1.1 is called SSL 3.2 and TLS 1.2 is called SSL 3.3. SSL has been deprecated by most organizations in favor of TLS. However, many people commonly refer to TLS as SSL/TLS as if they are the same. Even the CompTIA Security+ objectives list many topics as SSL or SSL/TLS. In this context, you can consider any reference to SSL on the exam as a reference to TLS.
It’s important to remember that TLS and SSL require certificates. Certificate Authorities (CAs) issue and manage certificates, so a CA is required to support TLS and SSL. These CAs can be internal or external third-party CAs.
Encrypting HTTPS Traffic with TLS
HTTP Secure (HTTPS) is commonly used on the Internet to secure web traffic. HTTPS commonly uses TLS to encrypt the traffic, with both asymmetric and symmetric encryption. If you’re able to grasp the basics of how HTTPS combines both asymmetric and symmetric encryption, you’ll have what you need to know for most protocols that use both encryptions.
Because asymmetric encryption isn’t efficient to encrypt large amounts of data, symmetric encryption is used to encrypt the session data. However, both the client and the server must know what this symmetric key is before they can use it. They can’t whisper it to each other over the Internet. That’s like an actor on TV using a loud whisper, or stage whisper, to share a secret. Millions of TV viewers can also hear the secret.
Instead, HTTPS uses asymmetric encryption to transmit a symmetric key using a secure key exchange method. It then uses the symmetric key with symmetric encryption to encrypt all the data in the HTTPS session.
Establishing an HTTPS Session
The following figure and steps show the overall process of establishing and using an HTTPS session. As you read these steps, try to keep these two important concepts in mind:
• TLS uses asymmetric encryption to securely share the symmetric key.
• TLS uses symmetric encryption to encrypt the session data.
Simplified TLS handshake process used with HTTPS
1. The client begins the process by requesting an HTTPS session. This could be by entering an HTTPS address in the URL or by clicking on an HTTPS link.
2. The server responds by sending the server’s certificate. The certificate includes the server’s public key. The matching private key is on the server and only accessible by the server.
3. The client creates a symmetric key and encrypts it with the server’s public key. As an example, imagine that the symmetric key is 53 (though it would be much more complex in a live session). The client encrypts the symmetric key of 53 using the web server’s public key creating ciphertext of UcaNP@$$. This symmetric key will be used to encrypt data in the HTTPS session, so it is sometimes called a session key.
4. The client sends the encrypted session key (UcaNP@$$) to the web server. Only the server’s private key can decrypt this. If attackers intercept the encrypted key, they won’t be able to decrypt it because they don’t have access to the server’s private key.
5. The server receives the encrypted session key and decrypts it with the server’s private key. At this point, both the client and the server know the session key.
6. All the session data is encrypted with this symmetric key using symmetric encryption.
The amazing thing to me is that this happens so quickly. If a web server takes as long as five seconds, many of us wonder why it’s taking so long. However, a lot is happening to establish this session.
Q. Network administrators in your organization need to administer firewalls, security appliances, and other network devices. These devices are protected with strong passwords, and the passwords are stored in a file listing these passwords. Which of the following is the BEST choice to protect this password list?
A. File encryption
B. Database field encryption
C. Full database encryption
D. Whole disk encryption
Answer is A. The best choice is file encryption to protect the passwords in this list.
If the passwords were stored in a database, it would be appropriate to encrypt the fields in the database holding the passwords.
It’s rarely desirable to encrypt an entire database.
Whole disk encryption is appropriate for mobile devices.
See Chapter 10 of the CompTIA Security+: Get Certified Get Ahead: SY0-501 Study Guide for more information on using cryptographic protocols.