Git hosting

cryptopals: Solutions to the cryptopals crypto challenges in Ruby

Files

Size Path
..
629 09.md
301 09.rb
1081 10.md
299 10.rb
3904 10.txt
896 11.md
645 11.rb
2326 12.md
1380 12.rb
1157 13.md
945 13.rb
611 14.md
1939 14.rb
571 15.md
217 15.rb
1408 16.md
952 16.rb
1304 README.md

README.md

Crypto Challenge Set 2

This is the first of several sets on block cipher cryptography. This is bread-and-butter crypto, the kind you'll see implemented in most web software that does crypto.

This set is relatively easy. People that clear set 1 tend to clear set 2 somewhat quickly.

Three of the challenges in this set are extremely valuable in breaking real-world crypto; one allows you to decrypt messages encrypted in the default mode of AES, and the other two allow you to rewrite messages encrypted in the most popular modes of AES.

  1. Implement PKCS#7 padding
  2. Implement CBC mode
  3. An ECB/CBC detection oracle
  4. Byte-at-a-time ECB decryption (Simple)
  5. ECB cut-and-paste
  6. Byte-at-a-time ECB decryption (Harder)
  7. PKCS#7 padding validation
  8. CBC bitflipping attacks