HomeFreeBSD

cryptodev: Permit explicit IV/nonce and MAC/tag lengths.

Description

cryptodev: Permit explicit IV/nonce and MAC/tag lengths.

Add 'ivlen' and 'maclen' fields to the structure used for CIOGSESSION2
to specify the explicit IV/nonce and MAC/tag lengths for crypto
sessions. If these fields are zero, the default lengths are used.

This permits selecting an alternate nonce length for AEAD ciphers such
as AES-CCM which support multiple nonce leengths. It also supports
truncated MACs as input to AEAD or ETA requests.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32107

Details

Provenance
jhbAuthored on Oct 6 2021, 9:08 PM
Reviewer
markj
Differential Revision
D32107: cryptodev: Permit explicit IV/nonce and MAC/tag lengths.
Parents
rG5ae5ed5b8fd2: cryptosoft, ccr: Use crp_iv directly for AES-CCM and AES-GCM.
Branches
Unknown
Tags
Unknown