CryptoTools is a portable c++14 library containing a collection of tools for building cryptographic protocols. This include asynchronous networking (Boost Asio), several fast primitives such as AES (AES-NI), SHA1 (assembly), and eliptic curve crypto (miracl). There are also several other utilities tailered for implementing protocols.
The library is cross platform and has been tested on both Windows and Linux. The library has worked on Mac but is not regularly tested. There are two library dependencies including Boost (networking), and Miracl (PK crypto). For each, we provide a script that automates the download and build steps. The version of Miracl used by this library requires specific configuration and therefore we advise using the cloned repository that we provide.
In Powershell
, this will set up the project
git clone --recursive https://github.com/ladnir/cryptoTools
cd cryptoTools/thirdparty/win
./getBoost.ps1; ./getMiracl.ps1
cd ../..
cmake . -G "Visual Studio 15 2017 Win64"
cryptoTools.sln
Requirements: Powershell
, Powershell Set-ExecutionPolicy Unrestricted
, CMake
, Visual Studio 2015
or Visual Studio 2017
, CPU supporting PCLMUL
, AES-NI
, and SSE4.1
.
Optional: nasm
for improved SHA1 performance.
Build the solution within visual studio or with MSBuild
. To see all the command line options, execute the program
frontend.exe
IMPORTANT: The build system needs the NASM compiler to be included in the command PATH
. In the event that it isn't, there are two options, install it, or enable the pure c++ implementation. The pure c++ implementation will be enabled automatically if CMake is unable to find NASM.
In short, this will build the project
git clone --recursive https://github.com/ladnir/cryptoTools
cd cryptoTools/thirdparty/linux
bash all.get
cd ../..
cmake .
make
Requirements: CMake
, Make
, g++
or similar, CPU supporting PCLMUL
, AES-NI
, and SSE4.1
. Optional: nasm
for improved SHA1 performance.
The libraries will be placed in ./lib
and the binary will be found at
./bin/frontend_cryptoTools
Note: In the case that miracl or boost is already installed, the steps cd cryptoTools/thirdparty/linux; bash all.get
can be skipped and CMake will attempt to find them instead. Boost is found with the CMake findBoost package and miracl is found with the find_library(miracl)
command.
This project has been placed in the public domain. As such, you are unrestricted in how you use it, commercial or otherwise. However, no warranty of fitness is provided. If you found this project helpful, feel free to spread the word and cite us.
Contact Peter Rindal [email protected] for any assistance on building or running the library.