This project implements the AES White Box encryption scheme as outlined in 2002 by Chow et al.
It requires the following dependencies:
-
Boost (
program_optionsandserialization). Can be acquired on Debian-based Linux distributions viaapt:sudo apt-get install libboost1.67-all-dev -
NTL (used for linear algebra on finite fields) Can be acquired on Debian-based Linux distributions via
apt:sudo apt-get install libntl-dev -
Crypto++ (used mainly for the platform-independent cryptographic random number generator, also for modes of operation) Can be acquired on Debian-based Linux distributions via
apt:sudo apt-get install libcrypto++-dev
All dependencies can be quickly acquired on Ubuntu using
sudo apt-get install libboost1.67-all-dev libntl-dev libcrypto++-dev
This is an implementation of a white-box cryptography scheme, in particular the one from 2002, by Chow et al. For more info on white-box cryptography, see http://www.whiteboxcrypto.com/
This implementation supports:
- Generating a table that can be used by the program to encrypt and decrypt data streams
- Generating a C++ header that can be used with the C++ source file in the /gen folder to automatically create a program that implements a WBC cipher
The implementation is written in C++. The build system is CMake. It is recommended to do out-of-source builds with CMake.
The actual program can then be accessed via a command line interface. The following options are available:
--help: Displays options--create encryption tablesCreate a table for encryption in a given file, use later with --whitebox-table--create encryption tablesCreate a table for decryption in a given file, use later with --whitebox-table--create-c-fileCreate a C++ struct containing the whitebox, for embedding in other programs.--key argThe key to use for creating the tables--whitebox-table argThis is for encrypting/decrypting given an existing whitebox table--set mode ARGSet block cipher mode, either CBC/CTR/ECB--iv argIV for CBC/CTR mode--set-padding ARGSet padding mode, default PKCS/NONE for CTR--encryptUse table to encrypt--decryptUse table to decrypt--input-file ARGinput file to use, default stdin--output-file ARGoutput file to use, default stdout--encrypt-state ARGencrypt/decrypt hex AES state on commandline using whitebox table--create-external-encodingarg Create external encodings in given file--apply-input-encodingarg Apply input encoding to white box--apply-output-encodingarg Apply output encoding to white box
It supports encryption and decryption with ECB, CBC and CTR modes.
This project uses the ISC license