How amd/aocl-crypto works
AOCL-Cryptography is a Zen-optimized cryptographic library exposing C APIs for symmetric encryption, hashes, MACs, random generation, ECDH, and RSA. Callers configure and invoke those APIs; the library provides algorithm implementations and, for some algorithms, architecture-specific kernels. The tree also includes an optional OpenSSL provider integration. Edges are limited to README-documented capabilities and relationships visible in sampled files or the source index; unsampled subsystem wiring is left out or marked unverified.
Main entry points: sha3.cc Digest implementations · alcp.h C API surface · builder.cc RSA dispatch builder · rsa.cc RSA operations
Components 20
Public APIs
- C API surface
include/alcp/alcp.h - Cipher API
include/alcp/cipher.h - Digest API
include/alcp/digest.h - MAC API
include/alcp/mac.h - RSA API
include/alcp/rsa.h - Cipher C bindings
lib/capi/c_cipher.cc - Digest C bindings
lib/capi/c_digest.cc - RSA C bindings
lib/capi/c_rsa.cc
Symmetric Cryptography
- AES implementation
lib/cipher/aes_generic.cc - AEAD ciphers
lib/cipher/aes_gcm.cc
Hashes and MACs
- Digest implementations
lib/digest/sha3.cc - MAC implementations
lib/mac/cmac.cc - Multibuffer HMAC
lib/mac/hmac_mb.cc - Random generation
lib/rng/builder.cc
Public-Key Cryptography
- ECDH
lib/ec/ecdh_x25519.cc - RSA dispatch builder
lib/rsa/builder.cc - RSA operations
lib/rsa/rsa.cc - Zen 4 RSA kernel
lib/arch/zen4/rsa.cc
Compatibility Integrations
- OpenSSL provider
lib/compat/openssl/provider/alcp_provider.c
Other components
- Library caller
Connections 16
- Library caller → C API surface: uses
README.md - C API surface → Cipher API: exposes
- Library caller → Cipher API: configures ciphers
README.md - Library caller → Digest API: requests hashes
README.md - Library caller → MAC API: requests MACs
README.md - Library caller → RSA API: requests RSA
README.md - Cipher C bindings → AES implementation: uses
lib/capi/c_cipher.cc - Digest C bindings → Digest implementations: dispatches
- Digest implementations → Digest implementations: selects kernels
lib/digest/sha3.cc - Multibuffer HMAC → Digest implementations: uses digest
- Library caller → Random generation: requests random bytes
README.md - Library caller → ECDH: derives shared keys
README.md - RSA C bindings → RSA dispatch builder: uses builder
lib/capi/c_rsa.cc - RSA dispatch builder → RSA operations: dispatches to
- RSA operations → Zen 4 RSA kernel: selects kernel
- OpenSSL provider → RSA API: uses RSA API