The cryptopals crypto challenges
cryptopals.com
cryptopals.com
This set is huge. There's as much content as in any two or three other sets.
This set is tough. It's easily the toughest set so far. And there is some math. But it's fascinating stuff and (I hope) pretty approachable.
This set is OG cryptopals. That means we're (for now) distributing it via email. If you want to check it out, send a mail to set8.cryptopals@gmail.com with subject "Crazy Flamboyant for the Rap Enjoyment".
Secondly, Sean suggested I should speed run set 8 (which I have been saving to run through in a single go) live on Twitch.
People seem to like the idea, so I'll have to figure out a schedule, but this is happening. Check Twitter if you are interested or have advice.
https://twitter.com/FiloSottile/status/787777267313303553
(For context, I think I was the first to finish set 7, which I sped run while at Recurse Center in 30 hours.)
I assume most people don't know, so: Filippo was one of our earliest adopters of cryptopals. He is a monster. He demolished everything we put in front of him.
You should watch Filippo run set 8. I've read a bunch of his code via cryptopals, and I'm a better programmer because of it. I'm very excited to watch him work in realtime.
It's been really fascinating to learn how to use hyperelliptic.org/EFD and turn the pure optimized voodoo of DJB's C implementations into minimalist C++ code.
Here is my current progress: http://hastebin.com/raw/vohusotobe
After separating the math operations on the prime field (2^255-19) into its own type, I was able to reduce Curve25519 to a 30-line class, that's still (hopefully) safe from side-channel leaks and ~90% as fast as the original C version was. Ed's about three times that size on account of all the hashing that's involved, and building a table for scalar multiply over the constant B.
However, there's still a very clear gap in my knowledge of how it all actually works. The math is so far beyond my current knowledge that I don't really have any understanding of its potential weaknesses. The best I can do so far is compare and confirm test vectors against the official implementation, and rely on the work of others in verifying the strength and security of the curve itself.
I'll definitely try and go through this set the next time I have downtime.
"1. Set 7 is out and, if you finished Set 6, you'll be getting Set 8 (Elliptic Curve) sometime in the next few weeks."
Oh well, 2 years later I can still do them :)
Forget project Euler or babby's first web server. This is an _excellent_ way to learn a new language, to learn a huge amount about crypto, and it's a huge amount of fun to boot. I cannot recommend them enough.
Thus, the project being discussed is a toy attempt at building a web server. This is a fairly common mid-sized project for learning a new language, as it implicates lots of the stdlib (file I/O, networking, etc), has a defined scope with lots of opportunity for flourishes, and is immediately showable.
Matasano Cryptopals challenges is amazing, back off
;-)
[0] Honestly ... Say 'pandigital prime' again, I dare you, I double dare you motherfucker, say 'pandigital prime' one more goddamn time! Ahem
>> Forget project Euler
I found Sphere Online Judge (http://www.spoj.com/problems/classical/) problems to be much more challenging than project Euler.And I already have two projects I haven't finished...
For those of you who have finished this, I'd reccomend checking out The Synacor Challenge, and The Advent of Code, both the work of the excellent Eric Wastl.
Bonus: I just discovered that we're getting a new Advent of Code this December. So even if you've already done last year's (if you haven't, there's still time!), stretch your fingers, because there's more coming down the pipe.
The only problem with a new huge set is I have a day job and a wife and kids, so I guess I will be working through these on the train and very late at night
# This one took the longest, and it was just a shell command!
# I learned that openssl's documentation is TERRIBLE!!Check the internship challenges here: cryptoservices.github.io/challenges
But: it doesn't yet. If we waited to hit "publish" until
everything was here, we might be writing this in 2015.
Ho ho.> People "know" this already, but they don't really know it in their gut, and we think the reason for that is that very few people actually know how to implement the best-known attacks.
I agree with them when they say it's important to teach implementations alongside theory. Despite knowing some theory behind cryptography seeing implementations come together is still an eye-opener. I guess it's like the difference between knowing orbital mechanics which is basically high school math and then playing kerbal space program and crashing rockets because while you could derive the functions every time it still takes some practical feel before things "click".
Only in this case you also get to break it all down again which is another level of satisfaction.
I blogged about my run through the early sets a while back:
https://lolware.net/2014/09/15/cryptochallenge.html
Set eight however, is much more brutal (while still being fun). I've completed the first three and had to take a break. Looking forward to getting back at it.
The new programming language thing, I mean. Not doing it all in Excel spreadsheet math.
You should absolutely do the challenges in the order we give them, but the learning curve is a bit more gradual if you defer #6 until after Set 2.
Any pointers?
That said, if you want to get value out of these, don't look at someone else's solutions until you've worked through them yourself. They're challenging, but very doable and very rewarding.