Track 2 · Keys & identity · lesson 4

Signatures

9 min


A signature proves two things at once: that a specific key approved a specific message, and that the message has not changed since.

Sign something below, then break it.

Sign lab

private key
generating…
address

What just happened

Signing combines your private key with a hash of the message to produce a signature. Verification runs the process in reverse: given the message and the signature, it recovers the address that must have produced it.

Nobody supplies a public key to verify a signature. It falls out of the recovery.

That is why an Ethereum transaction has no "from" field. The sender is not declared — it is computed from the signature. There is nothing to forge, because there is nothing to claim.

The failure mode is quiet

Notice what tampering did not do. Nothing threw an error. The signature still decoded perfectly.

It just recovered a different address.

Predict

A tampered message recovers a valid-looking address that isn't yours. Why does that matter?

Choose one answer

Where signatures show up

Check

Verifying a signature requires which pieces?

Choose one answer

Worth remembering

  • A signature proves a specific key approved a specific message, and that the message is unchanged.
  • Verification recovers the signer's address — the public key is never supplied.
  • Ethereum transactions have no `from` field because the sender is computed from the signature.
  • Tampering does not error; it recovers a different address, so you must compare.
  • In Solidity, `ecrecover` can return the zero address — always reject it.