Hacker News new | ask | show | jobs
by hcs 1287 days ago
A public key signature works by encrypting the hash with the private key, to verify you decrypt the hash with the pubic key and check it against your own hash of the payload.

Edit: No argument with your second point, just pointing out the mechanism does involve the signature being an encrypted form of a plaintext hash/message digest.

2 comments

This is indeed how RSA works, and is seen as a weakness of RSA, among other things it can lead to accidental oracles if you use the same key to both sign and decrypt things.

To my knowledge, this is not how ECDSA works. ECDSA is "just" a signature algorithm, e.g. provides integrity and cannot encrypt or decrypt anything - in EC-land you would use a technique like ECDH to arrive at a symmetric key that you then use to do encryption.

Oops, yeah I was thinking of RSA, thanks for the correction.
Thanks for the clarification! I didn’t explain myself well at all, but what I was getting at was that Shkreli claims the sig “decrypts to” the message given, when it does nothing of the sort.