Skip to content

drbig/matasano

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

matasano Build Status

Sharing my progress and solutions to the the matasano crypto challenges. Obviously, this is one big spoiler. You have been warned.

Current status: on hiatus

All of the code here is 100% genuine own code, done by me. No looksees, copy & paste (unless that was a part of the exercise) etc. I might have looked up the theory of some topics in proper literature though (you should too, probably).

The challenges are now run by Travis. Note that my code requires a modern Ruby - 2.1.5 should work, 1.9.3 and below probably won't.

There are also unit tests for the library (rake test:unit:all, but note that some are non-deterministic where a failure doesn't necessarily mean the code is wrong).

The general idea is to have the unit tests not depend on the challenges data inputs. This might not be exactly the case for now. (I've also noted that some of my assert_equals are backwards, oh well, conventions...)

Thoughts and notes

Ruby really kicks ass when it comes to hacking and learning new things. Go not so much, but I've learned that Unicode-centric approach is problematic for hacking ASCII-based crypto. I don't see any real speed difference between my Ruby code and my Go code.

I've deleted the Go sources as I'm not going to get back to them.

Having done the first four sets: this stuff is both amazingly eye-opening and scary at the same time. Are you seeding your PRNGs with current time (in NTP-synchronized world...)? Do you think SHA1(key || msg) is a secure way to do a MAC? Well, if so you're doing it very wrong, and that's just the tip of the proverbial iceberg.

High-level spoilers

Note: last update around end of Set 2.

Reading code is one thing, knowing the right output is another. If you believe knowing the right outputs is really the thing that will help you understand what's going on have a looksee here. There are also some spoilerific/sanity-ensuring notes.

Licensing

Licensed under CC BY-NC-SA, see LICENSE.txt for details.

Copyright (c) 2014 - 2015 Piotr S. Staszewski

About

The matasano crypto challenges, journey and solutions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages