Friday’s lecture (September 25th) is pre-recorded. Watch it before Monday:
- Video: Friday, September 25th lecture
- Notes: part 1 (the quadratic sieve, visually) and part 2 (signatures, RSA signatures, and cryptographic hash functions)
- These are also on the Notes/Videos page and the Archive.
Solutions: solutions to the daily posts due September 14th and 25th are now posted (Sep 14, Sep 25). All daily post solutions are collected on the Archive page.
Relevant Textbook Sections:
2.11 (Signature Schemes), 3.6.5 (RSA Signature).
To Do:
- Watch the Friday, September 25th lecture (notes: part 1, part 2).
- Fix integers and with , and suppose you have found integers with (for example, using the extended Euclidean algorithm). Explain why this single equation gives you both the inverse of modulo and the inverse of modulo at the same time. (Hint: reduce the equation modulo , and then modulo .)
- Alice’s RSA key has and . Find her private exponent , sign the message , and then verify the signature as Bob. (The RSA Tools and other Sage functions may help.)
- Using only Alice’s public key, pick any you like (say ) and produce a message for which verifies as “valid”. Why doesn’t this worry Alice much in practice?
- Alice has signed (signature ) and (signature ). Without knowing , produce a valid signature on . Can you think of a way this could be exploited by an attacker? How would signing instead of stop this attack?
- Visit the Hash Tools page and make sure you understand what a hash function is and how to use the tools on this page.
- Using the Hash Tools page, perform the SHA-256 hash on the string “friend” (try showing the digest both as hex and as bits). Then tick “Compare with a second message” and show the result in bits, change it to “fiend” (remove the r), and compare. Try some other pairs: united/untied, awesome/yuck, loooooooooong/short etc. How many of the 256 bits change? Is that what you’d expect?
- For the checksum “hash” from lecture, find a preimage of , and find a collision with .
- How about another toy hash which XORs together all the 8-bit blocks of to produce a single 8-bit digest? Break that one too (preimage and collision). Does this toy hash have the avalanche effect?
- Suppose you have a hash function that outputs -bit digests. Roughly how many random messages must you hash before you expect two with the same digest (a collision)? (See the Birthday Paradox Demonstration.) What does this give for MD5 (outputs 128 bits) and for SHA-256 (outputs 256 bits)? Does the birthday trick help you find a preimage?