6.2. Usage - 5.2 English - 57404

AOCL User Guide (57404)

Document ID
57404
Release Date
2025-12-29
Version
5.2 English

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:

OpenSSL Provider README

Integrating AOCL-Crypto Library with Applications that Use IPP

For detailed instructions on using the IPP-CP Compat library, refer to the following URL:

IPP Compatibility README

(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:

  1. Download and untar the aocl-crypto package.

  2. cd amd-crypto

  3. export LIBRARY_PATH=<path to aocl crypto lib>:<path to aocl utils lib>:<path to openssl lib>:$LIBRARY_PATH;

  4. make

  5. To 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

  1. Navigate to the build directory.

  2. Ensure that the lib\Release directory is added to PATH environment variables.

  3. If not set already, add openssl\bin path to the PATH environment variables.

  4. Run the executables generated in .\examples\<module>\Release\*.exe. Example: .\examples\cipher\Release\aes-ccm.exe