Git hosting

cryptopals: Solutions to the cryptopals crypto challenges in Ruby

Files

Size Path
..
995 25.md
2302 25.rb
3904 25.txt
315 26.md
700 26.rb
1247 27.md
1053 27.rb
634 28.md
759 28.rb
2177 29.md
1109 29.rb
523 30.md
1201 30.rb
1693 31.md
1152 31.rb
826 31_server.rb
185 32.md
1380 32.rb
827 32_server.rb
1133 README.md

README.md

Crypto Challenge Set 4

This is the last set of block cipher cryptography challenges, and also our coverage of message authentication.

This set is much easier than the last set. We introduce some new concepts, but the attacks themselves involve less code than, say, the CBC padding oracle.

Things get significantly trickier in the next two sets. A lot of people drop off after set 4.

  1. Break "random access read/write" AES CTR
  2. CTR bitflipping
  3. Recover the key from CBC with IV=Key
  4. Implement a SHA-1 keyed MAC
  5. Break a SHA-1 keyed MAC using length extension
  6. Break an MD4 keyed MAC using length extension
  7. Implement and break HMAC-SHA1 with an artificial timing leak
  8. Break HMAC-SHA1 with a slightly less artificial timing leak