HomeFreeBSD

Support AEAD requests with non-GCM algorithms.

Description

Support AEAD requests with non-GCM algorithms.

In particular, support chaining an AES cipher with an HMAC for a request
including AAD. This permits submitting requests from userland to encrypt
objects like IPSec packets using these algorithms.

In the non-GCM case, the authentication crypto descriptor covers both the
AAD and the ciphertext. The GCM case remains unchanged. This matches
the requests created internally in IPSec. For the non-GCM case, the
COP_F_CIPHER_FIRST is also supported since the ordering matters.

Note that while this can be used to simulate IPSec requests from userland,
this ioctl cannot currently be used to perform TLS requests using AES-CBC
and MAC-before-encrypt.

Reviewed by: cem
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D11759

Details

Provenance
jhbAuthored on
Reviewer
cem
Differential Revision
D11759: Support AEAD requests with non-GCM algorithms.
Parents
rS323891: Add a new COP_F_CIPHER_FIRST flag for struct crypt_op.
Branches
Unknown
Tags
Unknown