cryptographyprivate-keypublic-keysigningencryption-asymmetric

public key signing - why this is not advisable


Generally for signing a message, its recommended to sign the hash of the message payload using sender's private key and the recipient should decrypt using sender's public key and validate if hash is correct.

I would like to know what will go wrong if i sign using recipients public key and recipient can decrypt using his private key ( like how payload encryption happens ).

I am new to signing & encryption.I could not find a convincing answer.


Solution

  • If you want to sign a message, you have to use your private key, as this key is obviously private and no one else can sign a message with this key. So everybody can prove with your public key, that you have signed the message, cause no one else can have your private key to sign the message.

    On the other hand, 'signing' a message with the public key of the receiver is senseless. The key is public, everyone could have 'sign' this message, so the receiver has no way to prove that you were actually sending this message.

    What you can do with a public key of a sender is to encrypt a message. No one else than the receiver will be able to decrypt it, as this will require the private key of the receiver. But signing a message makes no sense.