BLOCKCHAIN & WEB3 FUNDAMENTALS - Chapter 2, Exercise 2 Solution ========================================================== Correcting "A Signature Is Just Encrypting With Your Private Key" PROBLEM ------- A colleague says: "A digital signature works like encrypting the message with your private key so only you could have sent it." Identify exactly what's wrong with this description and correct it using this chapter's own actual sign/verify process. SOLUTION -------- The colleague has the right general instinct - the private key really is what proves you sent something - but the specific mechanism described is backwards and, for a real scheme like ECDSA, not technically accurate. What's wrong: 1. Digital signing is not simply "encrypting the message." A signature is produced by running the message (or, more precisely, its hash) together with the private key through a signing algorithm - the output is a signature value, not an encrypted, unreadable version of the original message. Anyone can still read the original message in plain form; the signature is a separate, attached piece of proof. 2. "Only you could have sent it" also skips a step: it's not the act of signing alone that proves this, it's the fact that anyone can then take your public key and independently check the signature against the message. If that check passes, it's mathematically infeasible for anyone who doesn't know your private key to have produced a signature that would pass. Corrected process, per this chapter: - The signer uses their PRIVATE key together with the message to produce a signature. - Anyone holding the signer's PUBLIC key can verify that signature against the message, without ever needing the private key themselves. - Nobody lacking the private key can forge a signature that will pass verification. ANSWER: A digital signature isn't the message encrypted with the private key - it's a separate value computed from the message and the private key together, which anyone can then verify against the signer's public key. The message itself stays fully readable throughout; only the ability to produce a passing signature is restricted to whoever holds the private key. ---- WHY THIS WORKS AS AN ANSWER This catches a genuinely common informal misconception about how signatures work (conflating "signing" with "encrypting") and replaces it with the chapter's own precise three-step sign/verify/forge-resistant description.