6.2. Usage - 6.2. Usage - 5.3 English - 57404

AOCL User Guide (57404)

Document_ID
57404
Release_Date
2026-05-13
Version
5.3 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 supported OpenSSL versions are 3.1.3 through 3.5.0.

Note

To use a newer version of OpenSSL beyond 3.5.0, you can build from source. Refer to Building from Source on Linux and Building from Source on Windows for instructions. However, note that versions later than 3.5.0 are not guaranteed to work correctly and are not officially supported or tested.

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.3 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