]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/rxrpc: Add local FCrypt-PCBC implementation
authorEric Biggers <ebiggers@kernel.org>
Fri, 22 May 2026 05:07:32 +0000 (00:07 -0500)
committerJakub Kicinski <kuba@kernel.org>
Wed, 10 Jun 2026 00:03:03 +0000 (17:03 -0700)
commitf10e73dffd2abf51c5ba6f5dc724a0df690cd783
treedd3597ca170b3dc7c5a17b1f6a50d9e159743138
parent3abbe30231441f1fbb3305e9854c56a34650af53
net/rxrpc: Add local FCrypt-PCBC implementation

Add a local implementation of FCrypt-PCBC encryption and decryption.
This will be used instead of the crypto API one, allowing the crypto API
one to be removed.  It will also simplify rxkad.c quite a bit.

A KUnit test is included.  The FCrypt-PCBC test vectors are borrowed
from the existing ones in crypto/testmgr.h.  Note that this adds the
first KUnit test for net/rxrpc/, which previously had no KUnit tests.

The FCrypt code is based on crypto/fcrypt.c, but I simplified it a bit.
The PCBC part is straightforward and I just wrote it from scratch.

Tested with:

    kunit.py run --kunitconfig net/rxrpc/

Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Tested-by: Marc Dionne <marc.dionne@auristor.com>
Link: https://patch.msgid.link/20260522050740.84561-2-ebiggers@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/rxrpc/.kunitconfig [new file with mode: 0644]
net/rxrpc/Kconfig
net/rxrpc/Makefile
net/rxrpc/ar-internal.h
net/rxrpc/fcrypt.c [new file with mode: 0644]
net/rxrpc/tests/Makefile [new file with mode: 0644]
net/rxrpc/tests/rxrpc_kunit.c [new file with mode: 0644]