]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC 323889: Place the AAD before the plaintext/ciphertext for CIOCRYPTAEAD.
authorjhb <jhb@FreeBSD.org>
Thu, 22 Feb 2018 00:53:05 +0000 (00:53 +0000)
committerjhb <jhb@FreeBSD.org>
Thu, 22 Feb 2018 00:53:05 +0000 (00:53 +0000)
commitbe4ca441bb7db0a4322932afa6e82af52cdd5b5b
treebfa78b6f2caf11e5cde3c24c868b6ea6da78fbd3
parent2314d2b163a6783ecb1c55d744025054a79319d3
MFC 323889: Place the AAD before the plaintext/ciphertext for CIOCRYPTAEAD.

Software crypto implementations don't care how the buffer is laid out,
but hardware implementations may assume that the AAD is always before
the plain/cipher text and that the hash/tag is immediately after the end
of the plain/cipher text.

In particular, this arrangement matches the layout of both IPSec packets
and TLS frames.  Linux's crypto framework also assumes this layout for
AEAD requests.

Sponsored by: Chelsio Communications
sys/opencrypto/cryptodev.c