abdulapopoola / matasanoChallenges

Solutions to the matasano challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Matasano Challenges

Solutions to the matasano challenge: http://cryptopals.com

Set 1 - Basics

  1. Convert hex to base64
  2. Fixed XOR
  3. Single-byte XOR cipher
  4. Detect single-character XO
  5. Implement repeating-key XOR
  6. Break repeating-key XOR
  7. AES in ECB mode
  8. Detect AES in ECB mode

Set 2 - Block crypto

  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

Set 3 - Block and stream crypto

  1. The CBC padding oracle
  2. Implement CTR, the stream cipher mode
  3. Break fixed-nonce CTR mode using substitions
  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

Set 4 - Stream crypto and randomness

  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

Set 5 - Diffie-Hellman and friends

  1. Implement Diffie-Hellman
  2. Implement a MITM key-fixing attack on Diffie-Hellman with parameter injection
  3. Implement DH with negotiated groups, and break with malicious "g" parameters
  4. Implement Secure Remote Password (SRP)
  5. Break SRP with a zero key
  6. Offline dictionary attack on simplified SRP
  7. Implement RSA
  8. Implement an E=3 RSA Broadcast attack

Set 6 - RSA and DSA

  1. Implement unpadded message recovery oracle
  2. Bleichenbacher's e=3 RSA Attack
  3. DSA key recovery from nonce
  4. DSA nonce recovery from repeated nonce
  5. DSA parameter tampering
  6. RSA parity oracle
  7. Bleichenbacher's PKCS 1.5 Padding Oracle (Simple Case)
  8. Bleichenbacher's PKCS 1.5 Padding Oracle (Complete Case)

Set 7 - Hashes

  1. CBC-MAC Message Forgery
  2. Hashing with CBC-MAC
  3. Compression Ratio Side-Channel Attacks
  4. Iterated Hash Function Multicollisions
  5. Kelsey and Schneier's Expandable Messages
  6. Kelsey and Kohno's Nostradamus Attack
  7. MD4 Collisions
  8. RC4 Single-Byte Biases

About

Solutions to the matasano challenge

License:MIT License


Languages

Language:JavaScript 74.5%Language:C# 24.7%Language:Shell 0.8%