Day 3: Hashing and Integrity
Note: today’s Replit includes solutions for the previous two days required problems.
Lecture Topics
- notes
- hash functions
- padding
- the daisy-chain hash
- formal definition: collision resistance
- MACs (message authentication codes)
Problems
Reminders:
- You can run tests for a function by running
python main.py FUNCTION_NAME
from the shell.
We’ll be working in the main.py
file. The cryptoy.py
library contains
the PRG function, cryptoy.compression(seed, n_bytes)
that you’ll use for the
daisy-chain hash.
The required functions from previous days can also be imported and used.
-
required:
pad_with_length
daisy_chain_hash
mac
-
bonus:
merkle_root
write_merkle_proof