git clone [alcp-crypto git url here]
cd alcp-crypto
cmake -B build -DALCP_ENABLE_EXAMPLES=ON -DALCP_ENABLE_BENCH=ON -DCMAKE_BUILD_TYPE=Release
cmake --build build
Note: To include IPP, please define
-DENABLE_TESTS_IPP_API=ON -DIPP_INSTALL_DIR=/path/to/ipp_prefix
in step 3.
Note: To include OpenSSL, please define-DENABLE_TESTS_OPENSSL_API=ON -DOPENSSL_INSTALL_DIR=/path/to/openssl_prefix
in step 3.
After building ALCP, there should be binary files of each cryptographic algorithm with respective name in base_path = ./bench/{Respective cryptographic algorithm}
To run tests with verbose mode (prints also success)
$cd aocl-crypto/build
$./bench/cipher/bench_cipher
$./bench/digest/bench_digest
Example for selecting only "CBC" benchmarks
$./bench/cipher/bench_cipher --benchmark_filter="CBC"
Example for selecting only "SHA256" benchmarks
$./bench/digest/bench_digest --benchmark_filter="SHA2_256"
Always you can use --help
to know all the command line arguments which can be given to the executable.
- AES_CBC (128,192,256)
- AES_CTR (128,192,256)
- AES_CFB (128,192,256)
- AES_OFB (128,192,256)
- AES_GCM_MULTI_INIT (128,192,256)
- AES_XTS_MULTI_INIT (128,256)
- AES_CCM (128,192,256)
- AES_SIV (128,192,256)
- CHACHA20 (256)
- CHACHA20_POLY1305 (256)
- AES_GCM (128,192,256)
- AES_XTS (128,256)
- SHA2_224
- SHA2_256
- SHA2_384
- SHA2_512
- SHA2_512_224
- SHA2_512_256
- SHA3_224
- SHA3_256
- SHA3_384
- SHA3_512
- SHAKE_128
- SHAKE_256
- CMAC_AES_128
- CMAC_AES_192
- CMAC_AES_256
- HMAC_SHA2_224
- HMAC_SHA2_256
- HMAC_SHA2_384
- HMAC_SHA2_512
- HMAC_SHA3_224
- HMAC_SHA3_256
- HMAC_SHA3_384
- HMAC_SHA3_512
- POLY1305
- ECDH_x25519_GenPubKey
- ECDH_x25519_GenSecretKey
- RSA_EncryptPubKey
- RSA_DecryptPvtKey
- RSA_Sign_PSS
- RSA_Sign_PKCS
- RSA_Verify_PSS
- RSA_Verify_PKCS
- RSA_EncryptPubKey_NoPadding
- RSA_DecryptPvtKey_NoPadding
- RSA_EncryptPubKey_OAEP
- RSA_DecryptPvtKey_OAEP
For using IPP just specify -i
command line argument.
For using OpenSSL just specify -o
command line argument.