-
Notifications
You must be signed in to change notification settings - Fork 0
TLS
SSL protocol was implemented at the application layer, directly on top of TCP.
When SSL is used correctly, a third-party observer can only infer the connection endpoints, type of encryption, as well as the frequency and an approximate amount of data sent, but cannot read or modify any of the actual data.
The TLS protocol is designed to provide three essential services to all applications running above it: encryption, authentication, and data integrity.
- Encryption A mechanism to obfuscate what is sent from one host to another.
- Authentication A mechanism to verify the validity of provided identification material.
- Integrity A mechanism to detect message tampering and forgery.
In order to establish a cryptographically secure data channel, the connection peers must agree on which ciphersuites will be used and the keys used to encrypt the data. The TLS protocol specifies a well-defined handshake sequence to perform this exchange. The reason TLS works in practice, is due to its use of public key cryptography (also known as asymmetric key cryptography), which allows the peers to negotiate a shared secret key without having to establish any prior knowledge of each other, and to do so over an unencrypted channel.
As part of the TLS handshake, the protocol also allows both peers to authenticate their identity. When used in the browser, this authentication mechanism allows the client to verify that the server is who it claims to be and not someone simply pretending to be the destination by spoofing its name or IP address. In addition, the server can also optionally verify the identity of the client.
TLS protocol also provides its own message framing mechanism and signs each message with a message authentication code (MAC). The MAC algorithm is a one-way cryptographic hash function (effectively a checksum), the keys to which are negotiated by both connection peers. Whenever a TLS record is sent, a MAC value is generated and appended for that message, and the receiver is then able to compute and verify the sent MAC value to ensure message integrity and authenticity.