Git hosting

cryptopals: Solutions to the cryptopals crypto challenges in Ruby

Files

Size Path
..
2642 17.md
1681 17.rb
1888 18.md
290 18.rb
2986 19.md
5191 19.rb
723 20.md
941 20.rb
6940 20.txt
260 21.md
317 21.rb
629 22.md
741 22.rb
1430 23.md
1113 23.rb
850 24.md
1579 24.rb
1161 README.md

README.md

Crypto Challenge Set 3

This is the next set of block cipher cryptography challenges (even the randomness stuff here plays into block cipher crypto).

This set is moderately difficult. It includes a famous attack against CBC mode, and a "cloning" attack on a popular RNG that can be annoying to get right.

We've also reached a point in the crypto challenges where all the challenges, with one possible exception, are valuable in breaking real-world crypto.

  1. The CBC padding oracle
  2. Implement CTR, the stream cipher mode
  3. Break fixed-nonce CTR mode using substitutions
  4. Break fixed-nonce CTR statistically
  5. Implement the MT19937 Mersenne Twister RNG
  6. Crack an MT19937 seed
  7. Clone an MT19937 RNG from its output
  8. Create the MT19937 stream cipher and break it