Chapter 5. Programming Interface

Table of Contents

Block Cipher Context Data Structures
Block Cipher Algorithm Definitions
Asynchronous Block Cipher API
Asynchronous Cipher Request Handle
Authenticated Encryption With Associated Data (AEAD) Cipher API
Asynchronous AEAD Request Handle
Synchronous Block Cipher API
Single Block Cipher API
Synchronous Message Digest API
Message Digest Algorithm Definitions
Asynchronous Message Digest API
Asynchronous Hash Request Handle
Synchronous Message Digest API
Crypto API Random Number API

Please note that the kernel crypto API contains the AEAD givcrypt API (crypto_aead_giv* and aead_givcrypt_* function calls in include/crypto/aead.h). This API is obsolete and will be removed in the future. To obtain the functionality of an AEAD cipher with internal IV generation, use the IV generator as a regular cipher. For example, rfc4106(gcm(aes)) is the AEAD cipher with external IV generation and seqniv(rfc4106(gcm(aes))) implies that the kernel crypto API generates the IV. Different IV generators are available.

Block Cipher Context Data Structures

struct aead_request — AEAD request

These data structures define the operating context for each block cipher type.