Transport Layer Security (TLS) and
its predecessor, Secure Sockets Layer (SSL), are cryptographic protocols that provide security
for communications over networks such as the Internet.
TLS and SSL encrypt the segments of network connections at the Transport
Layer end-to-end.
TLS is an IETF
standards track protocol that was
based on the earlier SSL specifications developed by Netscape
Corporation.[1]
The TLS protocol allows client/server
applications to communicate across a network in a way designed to prevent eavesdropping
and tampering. TLS provides endpoint authentication
and communications confidentiality
over the Internet
using cryptography. TLS provides RSA security with
1024 and 2048 bit strengths.
In typical end-user/browser usage, TLS
authentication is unilateral: only the server is authenticated
(the client knows the server's identity), but not vice versa (the client
remains unauthenticated or anonymous).
TLS also supports the more secure bilateral
connection mode (typically used in enterprise applications), in which both ends
of the "conversation" can be assured with whom they are communicating
(provided they diligently scrutinize the identity information in the other
party's certificate). This is known as mutual authentication, or 2SSL.
Mutual authentication requires that the TLS client-side also hold a certificate
(which is not usually the case in the end-user/browser scenario).
The key exchange and authentication algorithms
are typically public key algorithms, or as in TLS-PSK
preshared keys could be used.
In applications design, TLS is usually
implemented on top of any of the Transport Layer
protocols, encapsulating the application-specific protocols such as HTTP, FTP, SMTP, NNTP,
and XMPP.
Historically it has been used primarily with reliable transport protocols such
as the Transmission Control Protocol
(TCP).
A prominent use of TLS is for securing World Wide Web traffic carried by HTTP to form HTTPS. Notable
applications are electronic commerce and asset management. Increasingly, the Simple Mail Transfer Protocol (SMTP) is
also protected by TLS (RFC 3207).
These applications use public key certificates to verify the
identity of endpoints.
TLS can also be used to tunnel an entire network
stack to create a VPN, as is the case with OpenVPN.
Many vendors now marry TLS's encryption and authentication capabilities with
authorization. There has also been substantial development since the late 1990s
in creating client technology outside of the browser to enable support for
client/server applications. When compared against traditional IPsec VPN technologies,
TLS has some inherent advantages in firewall and NAT traversal that make it easier to
administer for large remote-access populations.
How it works
A TLS client and server negotiate a stateful
connection by using a handshaking procedure. During this handshake, the client
and server agree on various parameters used to establish the connection's
security.
- The handshake begins when a client connects to a TLS-enabled server requesting a secure connection, and presents a list of supported CipherSuites (ciphers and hash functions).
- From this list, the server picks the strongest cipher and hash function that it also supports and notifies the client of the decision.
- The server sends back its identification in the form of a digital certificate. The certificate usually contains the server name, the trusted certificate authority (CA), and the server's public encryption key.
- The client may contact the server that issued the certificate (the trusted CA as above) and confirm that the certificate is authentic before proceeding.
- In order to generate the session keys used for the secure connection, the client encrypts a random number (RN) with the server's public key (PbK), and sends the result to the server. Only the server should be able to decrypt it (with its private key (PvK)): this is the one fact that makes the keys hidden from third parties, since only the server and the client have access to this data. The client knows PbK and RN, and the server knows PvK and (after decryption of the client's message) RN. A third party may only know RN if PvK has been compromised.
- From the random number, both parties generate key material for encryption and decryption.
This concludes the handshake and begins the secured
connection, which is encrypted and decrypted with the key material until the
connection closes.
Security Measures
TLS/SSL has a variety of security measures:
- The client may use the certificate authority's (CA's) public key to validate the CA's digital signature on the server certificate. If the digital signature can be verified, the client accepts the server certificate as a valid certificate issued by a trusted CA.
- The client verifies that the issuing CA is on its list of trusted CAs.
- The client checks the server's certificate validity period. The authentication process stops if the current date and time fall outside of the validity period.
- Protection against a downgrade of the protocol to a previous (less secure) version or a weaker cipher suite.
- Numbering all the Application records with a sequence number, and using this sequence number in the message authentication codes (MACs).
- Using a message digest enhanced with a key (so only a key-holder can check the MAC). The HMAC construction used by most TLS CipherSuites is specified in RFC 2104 (SSLv3 used a different hash-based MAC).
No comments:
Post a Comment