cryptopals/README.org
2020-06-12 11:51:09 +02:00

1.4 KiB

Cryptopals

https://github.com/dlozeve/cryptopals/workflows/CI/badge.svg

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