What are some good tests to test a crypto library?
Below are the answers in the context of Crypto ++. I'm not talking about other libraries like OpenSSL, Botan, BouncyCastle, etc.
The Crypto ++ library has a built-in test suite.
Which block (time, CPU cycles ...) should be used to compare different cryptographic libraries?
. Cycles-per-byte . , /. .
- , ...?
git clone https://github.com/weidai11/cryptopp.git
cd cryptopp
make static cryptest.exe
make bench CRYPTOPP_CPU_SPEED=1.8626
make bench benchmark.html.
, :
./cryptest.exe b <time in seconds> <cpu speed in GHz>
HTML- <HEAD> <BODY>. -.
Crypto ++ Crypto ++. TODO.
, . , SSE4.2 ARMv8 CRC32. Cycles-per-byte 3 5 cpb ( ) 1 1,5 cpb ( ). 300 500 / ( ) 1,5 / ( ) , 2 .
, SSE2 NEON, . , , , . , , . , BLAKE2, , ARMv7/ARMv8 NEON, , .
, GCC 4.6 ( ) -O3 . , GCC -O3, 2x 2.5x. , , 40 cpb -O2. -O3 15 19 cpb. SSE2 NEON , , . SSE2 NEON 8-13 cpb.
, OpenBenchmarking.org, .