Lets learn "How TLS (or SSL) verification works in HTTPS?"
In this tutorial, we'll learn about how tls (or SSL) works in case HTTPS. From the image above it is clear that HTTPS = HTTP + SSL. These days TLS (Transport Layer Security) term is used instead of SSL.
A bit of Cryptography
Lets learn brief details of different cryptographic algorithms
- Asymmetric algorithms: In these algorithms, two keys (private and public) are used. Private keys are never shared and kept by the servers and the public keys are shared with the clients.
- Symmetric algorithms: In these algorithms, same key used by servers and clients for encryption and decryption of data.
NOTE: In Assymetric algorithms, encryption and decryption process is costly as compared to Symmetric algorithms because of complex calculations. But those complex calculations are worth it as it provides a high security to prevent any kind of attacks. So in case of HTTPS initial handshaking uses assymetric algorithm, then symmetric algorithm is used for actual data transfer between the server and client.
How HTTPS Works
Lets try to learn this in steps in a very simplified manner with an example. Lets discuss how our browser connects to youtube using HTTPS.
Step 1. Browser will make a HTTPS call to www.youtube.com.
Step 2. YouTube will send its public key to the browser in the certificate which will be signed by the GOOGLE CA( Certificate Authority ). YouTube will keep the private key to itself only.
Step 3. Now since the public certificate provided by the YouTube is signed by the Google CA (Certificate Authority). And Google CA is trusted by default in the browsers, so browser will be able to extract the public key of youTube from the certificate.
Step 4. In the last step browser will send the shared secret to youTube. Now both have same secret and they can use that for further data transfer. So till step 3, it will be using the Assymetric algorithm to exchange a shared secret. And after the secret is shared, communication will be switched to use symmetric algorithm.
HOPE YOU LIKE THIS TUTORIAL. FEEL FREE TO COMMENT BELOW IF YOU HAVE ANY DOUBTS. AND STAY TUNED FOR MORE TUTORIALS :)
Comments
Post a Comment