.github/workflows | ||
data | ||
src | ||
subprojects | ||
tests | ||
.gitignore | ||
.gitmodules | ||
meson.build | ||
README.org |
Cryptopals
Here are my solutions to the cryptopals crypto challenges, implemented in C.
Build
You will need Meson and Ninja, and CMake for the mbedtls dependency, which is a CMake subproject.
meson build
cd build
ninja
Use e.g. CC=clang meson build
if you want to use a different
compiler.
The build will generate one executable for each challenge, and an
additional executable tests
.
Building will automatically pull and compile the dependencies: Mbed TLS and µnit.
Test
After building, there is a tests
executable in the build
directory, that will run the unit tests. You can also run them with
the built-in ninja test
command.
To test the challenges outputs, run the tests/challenges.py
Python
script, which will run the executable for each challenge and test it
against the expected output.
Development
For editor integration, you might want to link
compile_commands.json
, which is automatically generated by the build
system, at the root of the project:
ln -s build/compile_commands.json