CryptoGL is a C++ library containing classical ciphers, symmetric ciphers, asymmetric ciphers, hash functions, sponge functions, checksum functions and some other tools for strings, vectors, grids, manipulation of bits and mathematical purpuses. All the CPP and HPP files are found in the src
folder.
The UnitTests
folder contains the unit tests framework and all tests done for the cryptographic algorithms and some other tools. Each algorithm contains tests in a HPP file. A report is generated for all tests performed (have a look in main.cpp file).
CryptoGL has been compiled successfully with g++11 in VSCode.
CryptoGL can also be compiled using cmake
. Have a look at the last section of this readme file (Execution with CMake).
- ADFGVX
- Caesar
- Vigenere, Rozier, Beaufort, Beaufort (German variant) and Vigenere Multiplicative
- Chao
- Collon
- Delastelle
- Fleissner
- 2-square, 3-square and 4-square
- Hill
- Morse
- Monoalphabetic Substitution
- Nihiliste
- Playfair
- Polibius
- Railfence, Redefence and Redefence Zigzag
- Transpositions
- Wolseley
- Affine
- AES
- DES
- Blowfish
- IDEA
- Skipjack
- RC2, RC5 and RC6
- TripleDES
- XTEA
- Noekeon
- CAST-128 and CAST-256
- Twofish
- Camellia
- MYSTY1
For each block cipher, the ECB, CBC, CFB, OFB and CTR modes of operation are implemented following the specifications of NIST.
- Rabbit
- RC4
- SEAL
- ISAAC
- HC-256
- Salsa20
- Scream-S, Scream-0
- Snow3G
- Hellman-Merkle Knapsack cryptosystem, RSA (to come)
These algorithms are using a BigInteger library created by Matt McCutchen
- Blake (224, 256, 384, 512)
- SHA-1
- SHA-2 (224, 256, 384, 512, 512/224, 512/256)
- MD2, MD4, MD5
- RipeMD (128, 160, 256, 320)
- Whirlpool
- Tiger and tiger2 (128, 160, 192)
- HMAC is supported for all of them.
- Keccak (0, 224, 256, 384, 512)
- LRC (Longitudinal redundancy check)
- Adler-32
- CBC-MAC
- AES-XCBC-MAC
- CMAC
- PMAC
- OMAC
- TMAC
- HMAC
- Base64
- Square matrices over the modular integers
$\mathbb{Z}_n$ - Functions composition
- Big and little endian conversions
- Various mathematical tools
- Vectors extending the STL vectors
- Strings extending the STL strings
- Padding Schemes
- Bits manipulation tools
Here is the procedure to execute the tests in the terminal with cmake:
mkdir Build
cd Build
cmake ..
make CryptoGL
- (To get the result in a file):
./CryptoGL | perl -pe 's/\e\[?.*?[\@-~]//g' &> CryptoGL_TestsReport.txt
- (To get the result on terminal):
./CryptoGL