SUNRPC: Refactor CBC with CTS into helpers
authorChuck Lever <chuck.lever@oracle.com>
Sun, 15 Jan 2023 17:22:36 +0000 (12:22 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 20 Feb 2023 14:20:42 +0000 (09:20 -0500)
commitdfb632432a9b2548b5a4429598bb19edf58122f0
tree7c80dbc30dd4dee483ff87980701623a6904f3c5
parentaf664fc9023e69d1a90800c0f815c296bf727e18
SUNRPC: Refactor CBC with CTS into helpers

Cryptosystem profile enctypes all use cipher block chaining
with ciphertext steal (CBC-with-CTS). However enctypes that are
currently supported in the Linux kernel SunRPC implementation
use only the encrypt-&-MAC approach. The RFC 8009 enctypes use
encrypt-then-MAC, which performs encryption and checksumming in
a different order.

Refactor to make it possible to share the CBC with CTS encryption
and decryption mechanisms between e&M and etM enctypes.

Tested-by: Scott Mayhew <smayhew@redhat.com>
Reviewed-by: Simo Sorce <simo@redhat.com>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/auth_gss/gss_krb5_crypto.c