]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: Add 'krb5enc' hash and cipher AEAD algorithm
authorDavid Howells <dhowells@redhat.com>
Fri, 17 Jan 2025 11:46:23 +0000 (11:46 +0000)
committerDavid Howells <dhowells@redhat.com>
Sun, 2 Mar 2025 21:39:34 +0000 (21:39 +0000)
commitd1775a177f7f38156d541c8a3e3c91eaa6e69699
treee97f42b3784c31fb6eb071837fc160c9342f136d
parent2ac92fedb6369a1a17ff995198b8e84ec0cf7a4e
crypto: Add 'krb5enc' hash and cipher AEAD algorithm

Add an AEAD template that does hash-then-cipher (unlike authenc that does
cipher-then-hash).  This is required for a number of Kerberos 5 encoding
types.

[!] Note that the net/sunrpc/auth_gss/ implementation gets a pair of
ciphers, one non-CTS and one CTS, using the former to do all the aligned
blocks and the latter to do the last two blocks if they aren't also
aligned.  It may be necessary to do this here too for performance reasons -
but there are considerations both ways:

 (1) firstly, there is an optimised assembly version of cts(cbc(aes)) on
     x86_64 that should be used instead of having two ciphers;

 (2) secondly, none of the hardware offload drivers seem to offer CTS
     support (Intel QAT does not, for instance).

However, I don't know if it's possible to query the crypto API to find out
whether there's an optimised CTS algorithm available.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Herbert Xu <herbert@gondor.apana.org.au>
cc: "David S. Miller" <davem@davemloft.net>
cc: Chuck Lever <chuck.lever@oracle.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Eric Dumazet <edumazet@google.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: linux-nfs@vger.kernel.org
cc: linux-crypto@vger.kernel.org
cc: netdev@vger.kernel.org
crypto/Kconfig
crypto/Makefile
crypto/krb5enc.c [new file with mode: 0644]
include/crypto/authenc.h