Source: blog.boot.dev

How does HTTPS encryption work?
Hypertext Transfer Protocol Secure or https://developer.mozilla.org/en-US/docs/Glossary/https is an extension of the http://boot.dev/learn/learn-http. HTTPS secures the data transfer between client and server by https://developer.mozilla.org/en-US/docs/Glossary/Encryption all of the information communicated. HTTPS allows a client to safely share sensitive information with a server through an HTTP request. HTTPS is critically important when it comes to sending sensitive data such as credit card information, passwords, or bank account numbers.

In short, HTTPS works like this: The client contacts the server and requests a secure connection The server sends the client its https://en.wikipedia.org/wiki/Public-key_cryptography The client and the server use asymmetric encryption (like https://en.wikipedia.org/wiki/RSA_%28cryptosystem%29) to negotiate a shared private key The shared private key is used by the client to encrypt the HTTP request (using https://en.wikipedia.org/wiki/Symmetric-key_algorithm like https://blog.boot.dev/cryptography/aes-256-cipher/) The server uses the shared private key to decrypt the HTTP request The server uses the shared private key to send the client an encrypted response The client uses the shared private key to decrypt the response

Related Articles