Challenge 1 - Convert hex to base64The
string: 49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d
Should produce: SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29tChallenge
Challenge 2Â - Fixed XOR
Write a function that takes two equal-length buffers and produces their XOR combination.
If your function works properly, then when you feed it the string: 1c0111001f010100061a024b53535009181c
after hex decoding, and when XOR'd against: 686974207468652062756c6c277320657965...
should produce: 746865206b696420646f6e277420706c6179Challenge
Challenge 3Â - Single-byte XOR cipher
The hex encoded string: 1b37373331363f78151b7f2b783431333d78397828372d363c78373e783a393b3736 ... has been XOR'd against a single character.
Find the key, decrypt the message.
Challenge 4Â - Detect single-character XOR
One of the 60-character strings in the file has been encrypted by single-character XOR. Find it.
Challenge 5Â - Implement repeating-key XOR
Here is the opening stanza of an important work of the English language:
Burning 'em, if you ain't quick and nimble I go crazy when I hear a cymbal
Encrypt it, under the key "ICE", using repeating-key XOR.In repeating-key XOR, you'll sequentially apply each byte of the key; the first byte of plaintext will be XOR'd against I, the next C, the next E, then I again for the 4th byte, and so on.
It should come out to:0b3637272a2b2e63622c2e69692a23693a2a3c6324202d623d63343c2a26226324272765272 a282b2f20430a652e2c652a3124333a653e2b2027630c692b20283165286326302e27282f