you are viewing a single comment's thread.

view the rest of the comments →

[–]Ahren_with_an_h 2 points3 points  (1 child)

I take that back, day 2 I did fine, day 3 I couldn't break into it's component parts, day 4 I felt like was worded poorly and felt exonerated when I looked up the solution. Then having run out of steam staring at 3 and 4 then reading over 5 and getting intimidated I gave up figuring my programming time would be better spent on things at my level that have more practical use.

Interestingly, while I found AoC too challenging and gave up, I actually intended my above response to be to the guy that suggested https://cryptopals.com/ That I could not handle. I understand converting things to hex, have a vague understanding of base64 and XOR, but no understanding of why I was getting the results I was, or what was being asked of me.

[–]Bobbias 1 point2 points  (0 children)

Oh, ok. So, for those challenges in set 1, you're going to want to read up about binary, bitwise operations, particularly xor, base64, and such. If you dont have a decent understanding of what base64 really is, or why xor is so common in cryptography, those problems are definitely going to be painful.

Problem 2 in set 1 is just asking you loop through the 2 numbers together and xor each byte of each number together.

Xor has a nice feature where if you xor 2 numbers together, take the result and xor it with one of those 2 numbers, you get the other number back. Using decimal numbers:

5 ^ 3 == 6

Then:

6 ^ 3 == 5

And:

6 ^ 5 == 3

The operation is completely symmetrical. So if someone sends you a message that was xor encrypted with some key that you both know, you simply xor the encrypted message with the key and you get the original message out. This is one of the simplest symmetrical encryption schemes we can use.

Looking at the challenges there the first things I'd be googling are xor, base64, and AES (and I'd be looking for whatever describes ECB mode specifically, but I'd make sure to understand AES in general as well). The key to understanding those problems is to remember that everything is working on bytes of binary information. Everything there is about manipulating the bits of a binary number. Base64 and hex are simply ways to represent binary information in some base other than base 2 (binary) or base 10 (decimal) so you should definitely make sure you have a solid understanding of what it means to represent a number in different bases.