Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 19 lines (13 sloc) 813 Bytes

Crypto challenges

The cryptopals crypto challenges site is here. I have finished the first set of challenges.

Set 1

  • Number 1. Convert a hex string to base 64.
  • Discussion of base64
  • Number 2. XOR two hex-encoded strings.
  • Number 3. Check all 256 possible repeated one-byte keys against a ciphertext. This is called single-character XOR.

For number 3 and 4, I developed three tests of English:

  • Number of characters on a whitelist.
  • A scoring function that uses letter frequencies
  • Look up "words" in a dictionary of English words

The last one works really well, but is slow.

  • Number 4. Find the string encrypted by single-character XOR