Coder Social home page Coder Social logo

whitebox_crypto's Introduction

AES Whitebox encryption

This project implements the AES White Box encryption scheme as outlined in 2002 by Chow et al.

It requires the following dependencies:

  • Boost (program_options and serialization). Can be acquired on Debian-based Linux distributions via apt: 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

Whitebox cryptography implementations

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 tables Create a table for encryption in a given file, use later with --whitebox-table
  • --create encryption tables Create a table for decryption in a given file, use later with --whitebox-table
  • --create-c-file Create a C++ struct containing the whitebox, for embedding in other programs.
  • --key arg The key to use for creating the tables
  • --whitebox-table arg This is for encrypting/decrypting given an existing whitebox table
  • --set mode ARG Set block cipher mode, either CBC/CTR/ECB
  • --iv arg IV for CBC/CTR mode
  • --set-padding ARG Set padding mode, default PKCS/NONE for CTR
  • --encrypt Use table to encrypt
  • --decrypt Use table to decrypt
  • --input-file ARG input file to use, default stdin
  • --output-file ARG output file to use, default stdout
  • --encrypt-state ARG encrypt/decrypt hex AES state on commandline using whitebox table
  • --create-external-encoding arg Create external encodings in given file
  • --apply-input-encoding arg Apply input encoding to white box
  • --apply-output-encoding arg Apply output encoding to white box

It supports encryption and decryption with ECB, CBC and CTR modes.

License

This project uses the ISC license

whitebox_crypto's People

Contributors

chrku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

whitebox_crypto's Issues

License

Hello,

I could not find an email address, so I am abusing this to communicate with you.

I would like to use your implementation as a basis for a custom whitebox scheme. Would it be possible to adapt your license to make this possible?
For example the ISC license? https://en.wikipedia.org/wiki/ISC_license

You say that NTL forces you to go to GPL, but that is not longer the case, NTL is now licensed a LGPL, allowing you to choose any license you want.

I would greatly appreciate it!

Regards,
Stefaan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.