The lib folder contains my solutions to the Introduction to Cryptohacks course and some of the Modular Arithmatic lessons. I won't include any challenges outside of those "starter problems so as not to spoil the challenge for anyone else.
Crytpohacks uses (and recommends) python as the language of choice for the content but as you'll quickly find out, I used Ocaml.
I definitely think Python is better suited for cryptography and there are alot of libraries that make solving the challenges here a breeze. I mostly wanted to use Ocaml beause i thought it would be a fun way to learn the language and really understand what is going on when I solve a challenge.
Ocaml's syntax really grew on me as I wrote more code and I find it has more of a flow than Python so I encourage anyone who is interested to give Ocaml a try and see if you can solve some Cryptography puzzles with it! Happy coding!
In modular arithmetic the negative of a number, a mod n can be found as:
- Str - https://ocaml.org/manual/5.1/api/Str.html
- Zarith
- Hex
- Base_64