Curriculum
Thursday · Four worked examples
Each guide writes and runs the example on screen. You can follow without a laptop. The sessions last 75 minutes, with the last 15 set aside for questions.
- Verifpal
- Bob wants to send Alice a message only she can read. We’ll draw how they agree on a secret key, then write those steps in Verifpal. In the first model neither knows for sure whose public key has arrived. In the second, both keys are known to be genuine. We’ll see what difference that makes to the privacy of Bob’s message.
- ProVerif
- What if Bob has several conversations going at once? ProVerif lets us check the same exchange for any number of conversations. We’ll read two kinds of output together. In one case the tool shows, message by message, how a secret got out. In the other it simply can’t tell us whether the secret is safe.
- hax and F*
- The sender puts a number at the front of each message so the receiver knows how many bytes to expect. Our Rust program reads that number backwards and expects 16,777,216 bytes when only one is coming. Its first check passes because it only asks whether the program reads past the end of the message. We’ll write a check that catches the wrong length, then fix the code.
- Lean
- We want to put a limit on how well an attacker can do. But our first attempt lets us choose the limit after we know the attacker’s score. Even a score of a million passes if we set the limit at a million. Lean accepts the proof. We’ll set the limit beforehand and try the same proof again.
Friday · At the tables
Pick one exercise for the morning. A mentor will sit with you while you work through it.
- Protocol models
- Bob thinks he’s just spoken to Alice. Alice thinks she’s been talking to someone else. You’ll follow the three messages of the Needham–Schroeder protocol to see how they came away with different stories. Then you’ll use Verifpal or ProVerif to check Gavin Lowe’s proposed fix.
- Rust code
- Take Thursday’s reader one step further. The message says ten bytes should follow, but it ends after nine. Make the reader reject it. Then check whether your rule catches any message that ends too soon.
- Security proofs
- One player guesses heads every time. A second player gets to see the coin land before guessing. Work out on paper how often each wins with a fair coin. A mentor will help you turn the game into a few definitions in Lean and write a proof for each player.
After lunch, another pair will try your example and you’ll try theirs. Swap the files, the tool version and settings, and a sentence about what you think you’ve shown. See if you agree after you’ve both run the checks. You can spend the rest of the afternoon on a revision or a second tool. If you’re still stuck, bring the troublesome bit to the closing discussion.
Materials
The sample files are available now. If you’d like to read about the protocol exercise, start with Lowe’s paper on Needham–Schroeder.
After the workshop we’ll release the exercises, solutions, slides and container image under a free license.