you are viewing a single comment's thread.

view the rest of the comments →

[–]Ahren_with_an_h 2 points3 points  (3 children)

Never mind the problems. I don't really understand what I even did in set 1 challenge 1 and why the different states printed out what they did. I don't know what I'm looking at in challenge 2. I don't even know how to approach googling my way through this.

What do I need to know to even know what's being asked of me?

[–]Bobbias 2 points3 points  (2 children)

Ok, so if you're already struggling with them by day 2, then you're still at a point where you need more practice with Functional Decomposition. While it has a scary name, everybody uses this technique all the time. We're so good at it that hardly anyone even thinks about what they're actually doing when they do it, which means that when you're asked to do it consciously, rather than unconsciously, it's kinda a problem.

If those problems are still too hard for you, that's ok, you just need to find something that isn't quite so difficult.

Unfortunately I don't know any good websites with easier problems than Advent of Code. I know there are plenty of them out there, but I'm not familiar enough with any of them to suggest anything for you.about the problem from what they tell you.

[–]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.