These are my solutions to the cryptopals crypto challenges, a collection of cryptography challenges aimed at demonstrating attacks on real-world crypto.
To quote the official website:
This is a different way to learn about crypto than taking a class or reading a book. We give you problems to solve. They're derived from weaknesses in real-world systems and modern cryptographic constructions. We give you enough info to learn about the underlying crypto concepts yourself. When you're finished, you'll not only have learned a good deal about how cryptosystems are built, but you'll also understand how they're attacked.
If you wish to run some of these solutions on your local machine, just clone this repository and issue the command pip install -r requirements.txt
.
To make sure that (most of) it is working, consider running python -m unittest discover -v
while at the root directory.
In case you haven't noticed by now, you will need to install a Python 3 interpreter.
All requirements for these solutions should be fulfilled by issuing the command pip install -r requirements
as previously stated.
Please use the issue tracker to report any bugs or discuss a solution.
- Set 1: Basics
- Set 2: Block crypto
- Set 3: Block & stream crypto
- Set 4: Stream crypto and randomness
- Set 5: Diffie-Hellman and friends
- Set 6: RSA and DSA
- Set 7: Hashes
- Set 8: Abstract Algebra
I will not accept any pull requests.
However, I welcome any bug reports or suggestions you might have.
This software is developed and maintained by Ricardo Lopes (@ricardoapl).
All the software you find here is available under the terms of the MIT License.
I do not own any rights over the challenges themselves.