Or I’m calling Star Platinum.
First things first, let’s talk about symmetric encryption and asymmetric encryption. Symmetric encryption is simple: you use the same key to encrypt and decrypt data, just like using the same key to lock and unlock your front door. Asymmetric encryption, on the other hand, uses two keys: a public key (which can be shared openly) and a private key (which you keep secret). These keys are a pair, and only the corresponding private key can decrypt data encrypted with the public key. Asymmetric encryption takes more time than symmetric encryption.
Because if you use symmetric encryption, the key needs to be transmitted somehow, and someone could intercept it during that initial exchange.
Yes, that’s called a man-in-the-middle attack. To prevent this, we have Certificate Authorities (CAs). Basically, a CA issues a certificate that you install on your server. This certificate contains information about your website and a digital signature. This signature is created by hashing your website information and then encrypting it with the CA’s private key. When a client verifies the certificate, they use the public key in the certificate to decrypt the hash and compare it to a hash they generate themselves. If they match, the certificate is valid.
To jog my goldfish memory in the future, of course! ・゚・(つд`゚)・゚・