1
$\begingroup$

Is Public key used directly to encrypt a message or it is used to derive other keys ? Can we decrypt a message with same public key using which it was encrypted ?

So far I understand, as PKI is based on mathematical functions which are hard to solve in opposite direction, an encrypted message should not be decrypted using same Public key, but article https://blog.cloudflare.com/encrypted-sni/ mentiones that Public key is used to derive some other keys which are actually used for encryption, thus need clarification.

$\endgroup$
  • $\begingroup$ Which system are we talking about here? $\endgroup$ – fkraiem May 6 at 9:54
  • $\begingroup$ I have updated the question, I am talking about PKI system. $\endgroup$ – Aghori May 6 at 9:55
  • $\begingroup$ Within PKI itself, we don't actually do encryption - instead, we generate signatures; that is, we 'sign' regions of the certificate (and place that signature in another region) $\endgroup$ – poncho May 6 at 11:45
2
$\begingroup$

Is Public key used directly to encrypt a message or it is used to derive other keys?

A public key is used to encrypt a message.

Example:

If Alice wants to send a message to Bob she would take Bob's public key and encrypt the message and send the encrypted message to Bob.

A key to derive other keys is done with a Key derivation function and this key is commonly called a "master key", so it has nothing to do with public-private-key-encryption.


Can we decrypt a message with same public key using which it was encrypted?

No, you can only decrypt the encrypted message with it's corresponding private key (you always create a private & public key pair together).

$\endgroup$
0
$\begingroup$

This is standard key sharing mechanism taking place in various applications. For encrypted two way communication, the client and server need to have a shared secret key. So a key has to be first shared before the secure communication can take place. Now how can the key be shared?

Here the PKI helps. The SNI server has released its public key which can be used by any client for secure communication. Any client which wants to start two way communication first generates a secret key, then encrypt it using public key of SNI server and sends to the server. Now server decrypts the secret key and the communication can take place. Thats why its mentioned as the secret key is derived using public-private key mechanism.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.