0
votes

Wouldn't anyone else be able to decrypt it too using the public key? Or is it saying that it will be decrypted with a private key. If that's the case how could something be encrypted with one key and decrypted with another?

This is in reference to this wikipedia article.

Specifically - "In order to generate the session keys used for the secure connection, the client encrypts a random number with the server's public key and sends the result to the server. Only the server should be able to decrypt it, with its private key."

Sorry if this was a silly question.

1
It's not a silly question. It's simply too broad. Analogy: Why do you have to push/rotate the door handle to open the door, but don't need to do anything with the handle to close the door? It's just how the mechanism works. Take some example numbers and calculate it through.Artjom B.

1 Answers

0
votes

Because it's public-private key encryption, not symmetric encryption. The plaintext is encrypted to cipher text with the public key and decrypted back to the plaintext with the private key. Trying to decrypt that ciphertext with the public key doesn't work.