Block Cipher
Jump to navigation
Jump to search
A block cipher is a deterministic algorithm operating on fixed-length groups of bits called blocks. Crypto++ includes the following block ciphers:
- AES
- ARIA
- Blowfish
- Camellia
- CAST
- DES
- TripleDES (2-key and 3-key)
- DESX (DES-XEX3)
- GOST
- HIGHT
- IDEA
- RC2
- RC5
- RC6
- SAFER
- 3-WAY
- SHARK
- Square
- Skipjack
- SHACAL-2
- TEA
- Threefish
Usage
For ECB and CBC mode, data must be processed in multiples of the block size.
Alternatively, the mode object can be wrapped StreamTransformationFilter for use as a Filter object. StreamTransformationFilter will take care of buffering data into blocks as required.
Sample Programs
BlockCipher.zip - Exercises Block Ciphers in Crypto++ - 8.0 kB
g++ command line to build the sample :
g++ -O2 SymmetricCipher.cpp -I/usr/include/cryptopp -L/usr/lib -lcryptopp -o SymmetricCipher