Hashing and Signing
- keccak256. keccak256 is the EVM’s hash: ids, commitments and mapping keys built from it.
- Digital signatures. A signature proves a key holder approved a message: verified on-chain with ecrecover.
- Commit-reveal. Commit-reveal hides choices until everyone commits: hashes now, values later.
Message Verification
- EIP-712. EIP-712 signs structured data: wallets show humans what they sign, contracts verify exactly that.
- Replay protection. Signed messages carry nonces and domains: one approval, one use, one contract.
- Malleability care. Signature checks use vetted libraries: malleability and recovery quirks handled once, correctly.
Authorisation Patterns
- Permit. permit approves tokens by signature: gasless approvals, one signed message replacing a transaction.
- Meta-transactions. Meta-transactions let relayers pay gas: the signer proven by signature, not by msg.sender.
- Merkle proofs. A Merkle root commits to a huge set: airdrop eligibility proven with a short path.
Before and after this level
- Before: Level 11: Testing: Unit and Integration Tests, Fuzz and Invariant Testing, Testing Adversarial Conditions.
- Next: Level 13: Upgradeability: Proxy Concepts, Storage Layout, Upgrade Risk and Governance.
In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.
Frequently asked questions
What does Solidity Level 12: Cryptography & Signatures cover?
Hashing and Signing, Message Verification, Authorisation Patterns: 3 lessons and 9 ideas.
What should I know before this level?
The level before it, Level 11: Testing, which covers Unit and Integration Tests, Fuzz and Invariant Testing, Testing Adversarial Conditions.