This section explains how to use AOCL-Cryptography in applications.
Using AOCL-Cryptography in an Application
A few pointers for using AOCL-Cryptography in an application:
For using the encrypt/decrypt routines, use the header file in the test application:
aocl-crypto/include/alcp/alcp.h
For using the cipher routines, use the header file:
aocl-crypto/include/alcp/cipher.h
An example to use the cipher routines can be found in:
aocl-crypto/examples/cipher
For using the digest routines, use the header file:
aocl-crypto/include/alcp/digest.h
An example to use the digest routines can be found in:
aocl-crypto/examples/digest
Please refer to the API usage using API guide AOCL-Cryptography API Guide and examples under aocl-crypto/examples/ for more details.
AOCL-Cryptography Library Provider for OpenSSL
For AOCL-Cryptography OpenSSL Provider, the fully supported maximum OpenSSL version is 3.3.0. But experimental support for OpenSSL 3.5.0 is available.
For more information on usage instructions, refer to the following URL:
Integrating AOCL-Crypto Library with Applications that Use IPP
For detailed instructions on using the IPP-CP Compat library, refer to the following URL:
(Note: IPP Compat library is in experimental state in 5.2 release)
For more information on how to port and integrate AOCL-Cryptography, please refer to Porting and Integration.
Running Examples on Linux
Complete the following steps to compile and run the AOCL-Cryptography examples from the downloaded packages:
Download and untar the aocl-crypto package.
cd amd-cryptoexport LIBRARY_PATH=<path to aocl crypto lib>:<path to aocl utils lib>:<path to openssl lib>:$LIBRARY_PATH;makeTo run example applications (for digest):
LD_LIBRARY_PATH=<path to aocl crypto lib>:<path to aocl utils
lib>:<path to openssl lib> ./bin/digest/sha2_384_example;
Running Examples on Windows
Navigate to the build directory.
Ensure that the
lib\Releasedirectory is added to PATH environment variables.If not set already, add
openssl\binpath to thePATHenvironment variables.Run the executables generated in
.\examples\<module>\Release\*.exe. Example:.\examples\cipher\Release\aes-ccm.exe