I read this:

"Public-key cryptography uses key pairs, a public and a private one, that can be generated by a user at any time. As the name implies, the public key gets distributed, while the private one remains in the possession of a single person or entity. The private key is meant to be kept safe and secure by the owner. The private key can be used to sign messages such that anybody with the key pair's corresponding public key can verify with certainty that only the holder of the private key could have signed the message."

Here's what I don't understand: someone signs a public key and gives it to me. How do I verify that it was signed? All I get is the public key that everyone has?

  • 2
    Off topic, belongs on crypto.stackexchange.com – ripper234 Dec 7 '11 at 8:45
  • After speaking with one of the mods from crypto.SE it seems that since this question deals more with high-level implementation than low-level internal functionality it would be more appropriate for security.SE. Since migration from beta sites is discouraged, however, and theymos has given a perfectly valid answer, we're simply closing this one. If theymos' answer is not adequate, the asker is encouraged to take their question to security.SE or flag for moderator attention at which point migration will be reconsidered if sufficient reason can be found. – David Perry Dec 7 '11 at 20:15

The original data isn't changed by signing (not with DSA/ECDSA, anyway). The signature function takes the original data as input and produces some additional, separate data known as the signature. The verification function then takes the signature and the original data as input.

So determining whether something is signed is a job for whatever protocol you're dealing with. In PGP there are signature packets in the message format. In Bitcoin, signatures are given as input to OP_CHECKSIG in transaction scripts.

| improve this answer | |

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