world leader in high performance signal processing
Trace: » crypto

Crypto++® Library

Crypto++ Library is a free C++ class library of cryptographic schemes. Currently the library contains the following algorithms:

algorithm type name
authenticated encryption schemes GCM, CCM, EAX
high speed stream ciphers Panama, Sosemanuk, Salsa20, XSalsa20
AES and AES candidates AES (Rijndael), RC6, MARS, Twofish, Serpent, CAST-256
other block ciphers IDEA, Triple-DES (DES-EDE2 and DES-EDE3), Camellia, http://www.cryptolounge.org/wiki/SEED">SEED, RC5, Blowfish, TEA, XTEA, Skipjack, SHACAL-2
block cipher modes of operation ECB, CBC, CBC ciphertext stealing (CTS), CFB, OFB, counter mode (CTR)
message authentication codes VMAC, HMAC, CMAC, CBC-MAC, DMAC, Two-Track-MAC
hash functions SHA-1, SHA-2 (SHA-224, SHA-256, SHA-384, and SHA-512), Tiger, WHIRLPOOL, RIPEMD-128, RIPEMD-256, RIPEMD-160, RIPEMD-320
public-key cryptography RSA, DSA, ElGamal, Nyberg-Rueppel (NR), Rabin, Rabin-Williams (RW), LUC, LUCELG, DLIES (variants of DHAES), ESIGN
padding schemes for public-key systems PKCS#1 v2.0, OAEP, PSS, PSSR, IEEE P1363 EMSA2 and EMSA5
key agreement schemes Diffie-Hellman (DH), Unified Diffie-Hellman (DH2), Menezes-Qu-Vanstone (MQV), LUCDIF, XTR-DH
elliptic curve cryptography ECDSA, ECNR, ECIES, ECDH, ECMQV
insecure or obsolescent algorithms retained for backwards compatibility and historical value MD2, MD4, MD5, Panama Hash, DES, ARC4, SEAL 3.0, WAKE, WAKE-OFB, DESX (DES-XEX3), RC2, SAFER, 3-WAY, GOST, SHARK, CAST-128, Square

Other features include:

  • pseudo random number generators (PRNG): ANSI X9.17 appendix C, RandomPool
  • password based key derivation functions: PBKDF1 and PBKDF2 from PKCS #5, PBKDF from PKCS #12 appendix B
  • Shamir's secret sharing scheme and Rabin's information dispersal algorithm (IDA)
  • fast multi-precision integer (bignum) and polynomial operations
  • finite field arithmetics, including GF(p) and GF(2^n)
  • prime number generation and verification
  • useful non-cryptographic algorithms
    • DEFLATE (RFC 1951) compression/decompression with gzip (RFC 1952) and zlib (RFC 1950) format support
    • hex, base-32, and base-64 coding/decoding
    • 32-bit CRC and Adler32 checksum
  • A high level interface for most of the above, using a filter/pipeline metaphor
  • benchmarks and validation testing
  • FIPS 140-2 Validated 1)

Benchmark Results

root:/mnt/cryptopp-5.6.0> cat /proc/cpuinfo
processor       : 0
vendor_id       : Analog Devices
cpu family      : 0x27c8
model name      : ADSP-BF537 500(MHz CCLK) 100(MHz SCLK) (mpu off)
stepping        : 2
cpu MHz         : 500.000/100.000
bogomips        : 997.37
Calibration     : 498688000 loops
cache size      : 16 KB(L1 icache) 32 KB(L1 dcache-wb) 0 KB(L2 cache)
dbank-A/B       : cache/cache
icache setup    : 4 Sub-banks/4 Ways, 32 Lines/Way
dcache setup    : 2 Super-banks/4 Sub-banks/2 Ways, 64 Lines/Way
board name      : ADI BF537-STAMP
board memory    : 65536 kB (0x00000000 -> 0x04000000)
kernel memory   : 57336 kB (0x00001000 -> 0x037ff000)
root:/mnt/cryptopp-5.6.0> version
kernel:    Linux release 2.6.28.7-ADI-2009R1-pre-svn6180, build #89 Tue Mar 17 18:00:06 EDT 2009
toolchain: bfin-linux-uclibc-gcc release gcc version 4.3.3 (ADI-trunk/svn-3216)
user-dist: release svn-7890, build #240 Tue Mar 17 17:59:00 EDT 2009

Compiled with -O2

root:/mnt/cryptopp-5.6.0> ./cryptest.exe b 5 .5
CPU frequency of the test platform is 5e+08 Hz.

yle=
AlgorithmMiB/SecondCycles Per ByteMicroseconds to
Setup Key and IV
Cycles to
Setup Key and IV
AES/GCM (2K tables)2.74173.743.08921544
AES/GCM (64K tables)1.89252.1990.234495117
AES/CCM1.91249.117.1938597
AES/EAX1.92248.638.37619188
GMAC(AES) (2K tables)9.3651.047.69023845
GMAC(AES) (64K tables)4.22113.0990.234495117
VMAC(AES)-6420.123.763.54031770
VMAC(AES)-12810.346.476.75238376
HMAC(SHA-1)12.737.613.9516975
Two-Track-MAC7.5563.20.540270
CMAC(AES)3.79125.89.3184659
DMAC(AES)3.78126.124.41412207
CRC3248.69.8
Adler3285.65.6
MD532.214.8
SHA-112.737.6
SHA-2564.68101.9
SHA-5122.57185.4
Tiger6.6871.4
Whirlpool1.54310.5
RIPEMD-16011.740.7
RIPEMD-3208.4756.3
RIPEMD-12821.722.0
RIPEMD-25619.224.9
Panama-LE31.115.333.97616988
Panama-BE29.216.434.21417107
Salsa209.9547.94.1382069
Salsa20/1213.934.24.7542377
Salsa20/817.527.24.7592380
Sosemanuk16.928.213.1616581
MARC415.830.229.71114856
SEAL-3.0-LE15.830.2825.195412598
WAKE-OFB-LE36.013.322.34111170
AES/CTR (128-bit key)3.91121.97.4783739
AES/CTR (192-bit key)3.34142.87.3763688
AES/CTR (256-bit key)2.92163.37.8133906
AES/CBC (128-bit key)3.78126.16.3333167
AES/CBC (192-bit key)3.25146.96.2363118
AES/CBC (256-bit key)2.85167.26.6713335
AES/OFB (128-bit key)3.76127.07.8383919
AES/CFB (128-bit key)3.95120.712.7166358
AES/ECB (128-bit key)4.05117.73.2421621
Camellia/CTR (128-bit key)3.96120.47.4783739
Camellia/CTR (256-bit key)3.09154.110.2585129
Twofish/CTR3.72128.1127.70463852
Serpent/CTR3.80125.513.6396820
CAST-256/CTR3.08154.732.04116021
RC6/CTR5.7682.9134.60767304
MARS/CTR4.47106.728.66914334
SHACAL-2/CTR (128-bit key)4.35109.78.9614480
SHACAL-2/CTR (512-bit key)4.35109.79.2834641
DES/CTR2.23213.4434.570217285
DES-XEX3/CTR1.94245.6434.570217285
DES-EDE3/CTR0.82579.41389.160694580
IDEA/CTR3.70129.07.4553727
RC5 (r=16)6.1977.0105.96752984
Blowfish/CTR3.64130.8922.852461426
TEA/CTR3.62131.76.8203410
XTEA/CTR3.08154.76.2443122
CAST-128/CTR4.8398.615.1177559
SKIPJACK/CTR2.50191.052.15326076
SEED/CTR (1/2 K table)2.41197.910.5225261
OperationMilliseconds/OperationMegacycles/Operation
RSA 1024 Encryption3.401.70
RSA 1024 Decryption169.0084.50
LUC 1024 Encryption4.302.15
LUC 1024 Decryption308.24154.12
DLIES 1024 Encryption137.0368.51
DLIES 1024 Encryption with precomputation103.4751.73
DLIES 1024 Decryption78.7539.38
LUCELG 512 Encryption96.1548.08
LUCELG 512 Encryption with precomputation95.8547.92
LUCELG 512 Decryption51.5525.77
RSA 2048 Encryption8.624.31
RSA 2048 Decryption835.00417.50
LUC 2048 Encryption11.265.63
LUC 2048 Decryption1330.00665.00
DLIES 2048 Encryption533.00266.50
DLIES 2048 Encryption with precomputation445.83222.92
DLIES 2048 Decryption291.11145.56
LUCELG 1024 Encryption290.00145.00
LUCELG 1024 Encryption with precomputation289.44144.72
LUCELG 1024 Decryption153.6476.82
RSA 1024 Signature169.0084.50
RSA 1024 Verification3.401.70
RW 1024 Signature169.6784.83
RW 1024 Verification1.050.53
LUC 1024 Signature307.65153.82
LUC 1024 Verification4.292.15
NR 1024 Signature69.3234.66
NR 1024 Signature with precomputation23.7911.90
NR 1024 Verification79.6839.84
NR 1024 Verification with precomputation40.0820.04
DSA 1024 Signature67.0733.53
DSA 1024 Signature with precomputation23.1511.57
DSA 1024 Verification77.3838.69
DSA 1024 Verification with precomputation39.2219.61
LUC-HMP 512 Signature95.8547.92
LUC-HMP 512 Signature with precomputation95.6647.83
LUC-HMP 512 Verification96.7348.37
LUC-HMP 512 Verification with precomputation96.1548.08
ESIGN 1023 Signature7.863.93
ESIGN 1023 Verification3.341.67
ESIGN 1536 Signature18.129.06
ESIGN 1536 Verification8.384.19
RSA 2048 Signature836.67418.33
RSA 2048 Verification8.594.30
RW 2048 Signature841.67420.83
RW 2048 Verification2.271.13
LUC 2048 Signature1330.00665.00
LUC 2048 Verification11.265.63
NR 2048 Signature268.95134.47
NR 2048 Signature with precomputation75.3737.69
NR 2048 Verification302.94151.47
NR 2048 Verification with precomputation126.7563.38
LUC-HMP 1024 Signature289.44144.72
LUC-HMP 1024 Signature with precomputation288.33144.17
LUC-HMP 1024 Verification290.56145.28
LUC-HMP 1024 Verification with precomputation290.00145.00
ESIGN 2046 Signature18.129.06
ESIGN 2046 Verification8.534.27
XTR-DH 171 Key-Pair Generation29.5314.76
XTR-DH 171 Key Agreement59.3029.65
XTR-DH 342 Key-Pair Generation301.76150.88
XTR-DH 342 Key Agreement609.00304.50
DH 1024 Key-Pair Generation69.0434.52
DH 1024 Key-Pair Generation with precomputation52.5026.25
DH 1024 Key Agreement78.2839.14
DH 2048 Key-Pair Generation267.89133.95
DH 2048 Key-Pair Generation with precomputation223.48111.74
DH 2048 Key Agreement286.67143.33
LUCDIF 512 Key-Pair Generation48.2724.13
LUCDIF 512 Key-Pair Generation with precomputation48.2724.13
LUCDIF 512 Key Agreement52.1926.09
LUCDIF 1024 Key-Pair Generation144.8672.43
LUCDIF 1024 Key-Pair Generation with precomputation144.8672.43
LUCDIF 1024 Key Agreement153.2476.62
MQV 1024 Key-Pair Generation68.6334.32
MQV 1024 Key-Pair Generation with precomputation23.5711.78
MQV 1024 Key Agreement123.8161.90
MQV 2048 Key-Pair Generation266.32133.16
MQV 2048 Key-Pair Generation with precomputation73.9736.99
MQV 2048 Key Agreement470.83235.42
ECIES over GF(p) 256 Encryption162.9081.45
ECIES over GF(p) 256 Encryption with precomputation63.5431.77
ECIES over GF(p) 256 Decryption97.1248.56
ECDSA over GF(p) 256 Signature81.9740.98
ECDSA over GF(p) 256 Signature with precomputation32.3916.19
ECDSA over GF(p) 256 Verification140.8370.42
ECDSA over GF(p) 256 Verification with precomputation55.0527.53
ECDHC over GF(p) 256 Key-Pair Generation81.6140.81
ECDHC over GF(p) 256 Key-Pair Generation with precomputation31.7115.85
ECDHC over GF(p) 256 Key Agreement83.5041.75
ECMQVC over GF(p) 256 Key-Pair Generation82.3041.15
ECMQVC over GF(p) 256 Key-Pair Generation with precomputation32.0516.03
ECMQVC over GF(p) 256 Key Agreement140.5670.28
ECIES over GF(2^n) 233 Encryption232.73116.36
ECIES over GF(2^n) 233 Encryption with precomputation68.3834.19
ECIES over GF(2^n) 233 Decryption132.1166.05
ECNR over GF(2^n) 233 Signature117.4458.72
ECNR over GF(2^n) 233 Signature with precomputation34.8617.43
ECNR over GF(2^n) 233 Verification145.1472.57
ECNR over GF(2^n) 233 Verification with precomputation59.1829.59
ECDHC over GF(2^n) 233 Key-Pair Generation117.2158.60
ECDHC over GF(2^n) 233 Key-Pair Generation with precomputation34.1517.07
ECDHC over GF(2^n) 233 Key Agreement117.7358.86
ECMQVC over GF(2^n) 233 Key-Pair Generation116.9858.49
ECMQVC over GF(2^n) 233 Key-Pair Generation with precomputation34.1517.07
ECMQVC over GF(2^n) 233 Key Agreement146.3973.19
Throughput Geometric Average: 9.68

1) only compiled executable code can receive FIPS validation. You cannot compile Crypto++ yourself and claim FIPS 140-2 conformance on the resulting module, unless the it goes through the validation process. At this time, there are no FIPS validated binaries for the Blackfin.