AOCL-Cryptography - 5.2 English - 68552

AOCL API Guide (68552)

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

3. AOCL-Cryptography

AOCL-Cryptography is a library consisting of basic cryptographic functions optimized and tuned for AMD Zen™ based microarchitecture. This library provides a unified solution for Cryptographic routines such as AES (Advanced Encryption Standard) encryption/decryption routines (CFB, CTR, CBC, CCM, GCM, OFB, SIV, XTS), Chacha20 Stream Cipher routines, Chacha20-Poly1305, SHA (Secure Hash Algorithms) routines (SHA2, SHA3, SHAKE), Message Authentication Code (CMAC, HMAC, Poly1305 MAC), RNG, ECDH (Elliptic-curve Diffie-Hellman), RSA (Encrypt/Decrypt and Sign/Verify Functions).

Supported APIs:

Supported features of each APIs are listed below:

Cipher

Encrypt/Decrypt routines for the following cipher schemes:

  1. AES

  • AEAD : GCM, CCM, SIV

  • Non AEAD : CBC, CFB, OFB, XTS, CTR

  1. Chacha20 Stream Cipher Algorithm

  2. Chacha20-Poly1305 AEAD

Digest

  1. SHA2

  • SHA2_224, SHA2_256, SHA2_384, SHA2_512

  • SHA2_512_224, SHA2_512_256

  1. SHA3

  • SHA3_224, SHA3_256, SHA3_384, SHA3_512

  • SHAKE_128, SHAKE_256

Message Authentication Code

  1. HMAC

  • HMAC_SHA2_224, HMAC_SHA2_256, HMAC_SHA2_384, HMAC_SHA2_512

  • HMAC_SHA3_224, HMAC_SHA3_256, HMAC_SHA3_384, HMAC_SHA3_512

  • HMAC_SHA2_512_224, HMAC_SHA2_512_256

  1. CMAC

  • CMAC - AES (for key size 128, 192 and 256)

  1. Poly1305

RSA

  • Encrypt text with public key (Non Padded, OAEP, PKCS)

  • Decrypt text with private Key (Non Padded,OAEP, PKCS)

  • Sign with private key and verify with public key (PKCS,PSS)

Elliptic Curve

EC key generation routines for the following schemes:

  1. X25519

  2. NIST-P256

Random Number Generator (RNG)

  • Generate random number

  • Seed random number generator with random data