A fast and portable C++ library for Format Preserving Encryption which currently implements:
- FF3: http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-38G.pdf
- DTP (Data-type Preserving Encryption): https://eprint.iacr.org/2009/257
C++ compiler with C++14 support. There are several library dependencies including Boost
, Miracl
, cryptoTools
. Our code has been tested on both Windows (Microsoft Visual Studio) and Linux. To install the required libraries:
- windows: open PowerShell,
cd ./cryptoTools/thirdparty/win
, and.\getBoost.ps1
.\getMiracl.ps1
- linux:
cd ./thirdparty/linux
, andbash all.get
.
After cloning project from git,
-
build cryptoTools and libFPE in order (cd
libFPE/thirdparty/linux/
,bash all.get
,cd ../.. && cmake . && make
,cd .. && cmake . && make
-
main project is
frontend
-
run
frontend
project
- make (requirements:
CMake
,Make
,g++
or similar) - for test: ./bin/frontend.exe
FF3 ff3(userKey); //assign encryption key for AES-NI
u8* cipherText = ff3.encrypt(plainText, tweak, len, radix);
u8* decryptText = ff3.decrypt(cipherText, tweak, len, radix);
For any questions on building or running the library, please contact Ni Trieu
at trieun at oregonstate dot edu