From nobody Sun May 24 20:33:22 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A81C0299959; Fri, 22 May 2026 05:07:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779426473; cv=none; b=ih8KZHl7aSAjqwFndP4vyJ8JNJeeuxF9mROm7Ckqz8kiD/T0VDMw1zDDctAzqFHHrzhMRSyYvFMlk3jt5mE14W+FsQdF0f29LzaaMuyiL28uqwJXPFTdCjMzIzLESpIW7fVtwHJumKxtkNkDMGoP+hPJG40YoH+xa3LsQdIzB28= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779426473; c=relaxed/simple; bh=hVRxru1x16s70uUS0wxX6YWW4QKlp4gCkIQBZIgHuio=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=cRPs71NkIKxW9Ban4YMehl6CcHNGEsaVLDRmtN11RxP7spsFW8ULXaIcElUVtRmKwRY5+Y1TMZoPfax5aWtGSM4sUa7Fd3KMo5yHstJfrG6+ZjtH+R5fxnEgBu66Dw53MqRYqUUn1hWhM779KNDoeyq+iMXukVK81ybvsfFBnIE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Hx00hQOI; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Hx00hQOI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4785C1F00A3D; Fri, 22 May 2026 05:07:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779426469; bh=+1XgihtlNsmil2Qp26RG1tt4t704hNEdgcn9fDFYmHo=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Hx00hQOI6CKrRnDkw472hkyk8s+aF0hD660ARiBS4KruKjcBUV/D24DVSeTCOyfYS 1SJ7VTqSAYxuKqlIQ3RqJqmRAb++TxkZLsRXlgi2o/kfgUBxxOpVTLy433bh8Q1ubi C33i5I8B1p4Uyl9t/Zvc0iMuTJVc+cj6P1gNwmoVnZLr7fg0cX2Gw3lwcSzTAZ0Z6y cyllaH8hAKXDdVYGXJan+Mhvhb/ZW44nMa+PCWJR423oCLMq5Kqtb+Ijxhin6qESnN YI+rq93Jyq9Xq2VVCVmWAUAAxUs+dvPhIN4+Aer0Shwq/N9V0MVZ3fKn2SxKguTZUu +RlEMtrZW999A== From: Eric Biggers To: netdev@vger.kernel.org, linux-afs@lists.infradead.org Cc: David Howells , Marc Dionne , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Eric Biggers Subject: [PATCH net-next v2 1/5] net/rxrpc: Add local FCrypt-PCBC implementation Date: Fri, 22 May 2026 00:07:32 -0500 Message-ID: <20260522050740.84561-2-ebiggers@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260522050740.84561-1-ebiggers@kernel.org> References: <20260522050740.84561-1-ebiggers@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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 Signed-off-by: Eric Biggers Tested-by: Marc Dionne --- net/rxrpc/.kunitconfig | 6 + net/rxrpc/Kconfig | 7 + net/rxrpc/Makefile | 3 +- net/rxrpc/ar-internal.h | 14 ++ net/rxrpc/fcrypt.c | 352 ++++++++++++++++++++++++++++++++++ net/rxrpc/tests/Makefile | 3 + net/rxrpc/tests/rxrpc_kunit.c | 109 +++++++++++ 7 files changed, 493 insertions(+), 1 deletion(-) create mode 100644 net/rxrpc/.kunitconfig create mode 100644 net/rxrpc/fcrypt.c create mode 100644 net/rxrpc/tests/Makefile create mode 100644 net/rxrpc/tests/rxrpc_kunit.c diff --git a/net/rxrpc/.kunitconfig b/net/rxrpc/.kunitconfig new file mode 100644 index 000000000000..44e4a909ff07 --- /dev/null +++ b/net/rxrpc/.kunitconfig @@ -0,0 +1,6 @@ +CONFIG_KUNIT=3Dy +CONFIG_NET=3Dy +CONFIG_INET=3Dy +CONFIG_AF_RXRPC=3Dy +CONFIG_RXKAD=3Dy +CONFIG_AF_RXRPC_KUNIT_TEST=3Dy diff --git a/net/rxrpc/Kconfig b/net/rxrpc/Kconfig index 43416b3026fb..e2bb795cdf0c 100644 --- a/net/rxrpc/Kconfig +++ b/net/rxrpc/Kconfig @@ -95,6 +95,13 @@ config RXPERF help Provide an rxperf service tester. This listens on UDP port 7009 for incoming calls from the rxperf program (an example of which can be found in OpenAFS). =20 +config AF_RXRPC_KUNIT_TEST + tristate "RxRPC crypto KUnit test" if !KUNIT_ALL_TESTS + depends on KUNIT && RXKAD + default KUNIT_ALL_TESTS + help + Enable the KUnit test suite for RxRPC's crypto routines. + endif diff --git a/net/rxrpc/Makefile b/net/rxrpc/Makefile index c0542bae719e..f994f9f30a29 100644 --- a/net/rxrpc/Makefile +++ b/net/rxrpc/Makefile @@ -36,13 +36,14 @@ rxrpc-y :=3D \ skbuff.o \ txbuf.o \ utils.o =20 rxrpc-$(CONFIG_PROC_FS) +=3D proc.o -rxrpc-$(CONFIG_RXKAD) +=3D rxkad.o +rxrpc-$(CONFIG_RXKAD) +=3D rxkad.o fcrypt.o rxrpc-$(CONFIG_SYSCTL) +=3D sysctl.o rxrpc-$(CONFIG_RXGK) +=3D \ rxgk.o \ rxgk_app.o \ rxgk_kdf.o =20 obj-$(CONFIG_RXPERF) +=3D rxperf.o +obj-$(CONFIG_KUNIT) +=3D tests/ diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index 98f2165159d7..30aaf69b4c7c 100644 --- a/net/rxrpc/ar-internal.h +++ b/net/rxrpc/ar-internal.h @@ -13,18 +13,32 @@ #include #include #include #include "protocol.h" =20 +#define FCRYPT_ROUNDS 16 + +struct fcrypt_key { + __be32 sched[FCRYPT_ROUNDS]; +}; + #define FCRYPT_BSIZE 8 struct rxrpc_crypt { union { u8 x[FCRYPT_BSIZE]; __be32 n[2]; }; } __attribute__((aligned(8))); =20 +void fcrypt_preparekey(struct fcrypt_key *key, const u8 raw_key[FCRYPT_BSI= ZE]); +void fcrypt_pcbc_encrypt(const struct fcrypt_key *key, + const u8 iv[FCRYPT_BSIZE], const void *src, void *dst, + size_t nblocks); +void fcrypt_pcbc_decrypt(const struct fcrypt_key *key, + const u8 iv[FCRYPT_BSIZE], const void *src, void *dst, + size_t nblocks); + #define rxrpc_queue_work(WS) queue_work(rxrpc_workqueue, (WS)) #define rxrpc_queue_delayed_work(WS,D) \ queue_delayed_work(rxrpc_workqueue, (WS), (D)) =20 struct key_preparsed_payload; diff --git a/net/rxrpc/fcrypt.c b/net/rxrpc/fcrypt.c new file mode 100644 index 000000000000..a919e7598765 --- /dev/null +++ b/net/rxrpc/fcrypt.c @@ -0,0 +1,352 @@ +/* FCrypt encryption algorithm + * + * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. + * Written by David Howells (dhowells@redhat.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * Based on code: + * + * Copyright (c) 1995 - 2000 Kungliga Tekniska H=C3=B6gskolan + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' A= ND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURP= OSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIA= BLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENT= IAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STR= ICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY W= AY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include "ar-internal.h" + +/* + * Sboxes for Feistel network derived from + * /afs/transarc.com/public/afsps/afs.rel31b.export-src/rxkad/sboxes.h + */ +#undef Z +#define Z(x) cpu_to_be32(x << 3) +static const __be32 sbox0[256] =3D { + Z(0xea), Z(0x7f), Z(0xb2), Z(0x64), Z(0x9d), Z(0xb0), Z(0xd9), Z(0x11), + Z(0xcd), Z(0x86), Z(0x86), Z(0x91), Z(0x0a), Z(0xb2), Z(0x93), Z(0x06), + Z(0x0e), Z(0x06), Z(0xd2), Z(0x65), Z(0x73), Z(0xc5), Z(0x28), Z(0x60), + Z(0xf2), Z(0x20), Z(0xb5), Z(0x38), Z(0x7e), Z(0xda), Z(0x9f), Z(0xe3), + Z(0xd2), Z(0xcf), Z(0xc4), Z(0x3c), Z(0x61), Z(0xff), Z(0x4a), Z(0x4a), + Z(0x35), Z(0xac), Z(0xaa), Z(0x5f), Z(0x2b), Z(0xbb), Z(0xbc), Z(0x53), + Z(0x4e), Z(0x9d), Z(0x78), Z(0xa3), Z(0xdc), Z(0x09), Z(0x32), Z(0x10), + Z(0xc6), Z(0x6f), Z(0x66), Z(0xd6), Z(0xab), Z(0xa9), Z(0xaf), Z(0xfd), + Z(0x3b), Z(0x95), Z(0xe8), Z(0x34), Z(0x9a), Z(0x81), Z(0x72), Z(0x80), + Z(0x9c), Z(0xf3), Z(0xec), Z(0xda), Z(0x9f), Z(0x26), Z(0x76), Z(0x15), + Z(0x3e), Z(0x55), Z(0x4d), Z(0xde), Z(0x84), Z(0xee), Z(0xad), Z(0xc7), + Z(0xf1), Z(0x6b), Z(0x3d), Z(0xd3), Z(0x04), Z(0x49), Z(0xaa), Z(0x24), + Z(0x0b), Z(0x8a), Z(0x83), Z(0xba), Z(0xfa), Z(0x85), Z(0xa0), Z(0xa8), + Z(0xb1), Z(0xd4), Z(0x01), Z(0xd8), Z(0x70), Z(0x64), Z(0xf0), Z(0x51), + Z(0xd2), Z(0xc3), Z(0xa7), Z(0x75), Z(0x8c), Z(0xa5), Z(0x64), Z(0xef), + Z(0x10), Z(0x4e), Z(0xb7), Z(0xc6), Z(0x61), Z(0x03), Z(0xeb), Z(0x44), + Z(0x3d), Z(0xe5), Z(0xb3), Z(0x5b), Z(0xae), Z(0xd5), Z(0xad), Z(0x1d), + Z(0xfa), Z(0x5a), Z(0x1e), Z(0x33), Z(0xab), Z(0x93), Z(0xa2), Z(0xb7), + Z(0xe7), Z(0xa8), Z(0x45), Z(0xa4), Z(0xcd), Z(0x29), Z(0x63), Z(0x44), + Z(0xb6), Z(0x69), Z(0x7e), Z(0x2e), Z(0x62), Z(0x03), Z(0xc8), Z(0xe0), + Z(0x17), Z(0xbb), Z(0xc7), Z(0xf3), Z(0x3f), Z(0x36), Z(0xba), Z(0x71), + Z(0x8e), Z(0x97), Z(0x65), Z(0x60), Z(0x69), Z(0xb6), Z(0xf6), Z(0xe6), + Z(0x6e), Z(0xe0), Z(0x81), Z(0x59), Z(0xe8), Z(0xaf), Z(0xdd), Z(0x95), + Z(0x22), Z(0x99), Z(0xfd), Z(0x63), Z(0x19), Z(0x74), Z(0x61), Z(0xb1), + Z(0xb6), Z(0x5b), Z(0xae), Z(0x54), Z(0xb3), Z(0x70), Z(0xff), Z(0xc6), + Z(0x3b), Z(0x3e), Z(0xc1), Z(0xd7), Z(0xe1), Z(0x0e), Z(0x76), Z(0xe5), + Z(0x36), Z(0x4f), Z(0x59), Z(0xc7), Z(0x08), Z(0x6e), Z(0x82), Z(0xa6), + Z(0x93), Z(0xc4), Z(0xaa), Z(0x26), Z(0x49), Z(0xe0), Z(0x21), Z(0x64), + Z(0x07), Z(0x9f), Z(0x64), Z(0x81), Z(0x9c), Z(0xbf), Z(0xf9), Z(0xd1), + Z(0x43), Z(0xf8), Z(0xb6), Z(0xb9), Z(0xf1), Z(0x24), Z(0x75), Z(0x03), + Z(0xe4), Z(0xb0), Z(0x99), Z(0x46), Z(0x3d), Z(0xf5), Z(0xd1), Z(0x39), + Z(0x72), Z(0x12), Z(0xf6), Z(0xba), Z(0x0c), Z(0x0d), Z(0x42), Z(0x2e) +}; + +#undef Z +#define Z(x) cpu_to_be32(((x & 0x1f) << 27) | (x >> 5)) +static const __be32 sbox1[256] =3D { + Z(0x77), Z(0x14), Z(0xa6), Z(0xfe), Z(0xb2), Z(0x5e), Z(0x8c), Z(0x3e), + Z(0x67), Z(0x6c), Z(0xa1), Z(0x0d), Z(0xc2), Z(0xa2), Z(0xc1), Z(0x85), + Z(0x6c), Z(0x7b), Z(0x67), Z(0xc6), Z(0x23), Z(0xe3), Z(0xf2), Z(0x89), + Z(0x50), Z(0x9c), Z(0x03), Z(0xb7), Z(0x73), Z(0xe6), Z(0xe1), Z(0x39), + Z(0x31), Z(0x2c), Z(0x27), Z(0x9f), Z(0xa5), Z(0x69), Z(0x44), Z(0xd6), + Z(0x23), Z(0x83), Z(0x98), Z(0x7d), Z(0x3c), Z(0xb4), Z(0x2d), Z(0x99), + Z(0x1c), Z(0x1f), Z(0x8c), Z(0x20), Z(0x03), Z(0x7c), Z(0x5f), Z(0xad), + Z(0xf4), Z(0xfa), Z(0x95), Z(0xca), Z(0x76), Z(0x44), Z(0xcd), Z(0xb6), + Z(0xb8), Z(0xa1), Z(0xa1), Z(0xbe), Z(0x9e), Z(0x54), Z(0x8f), Z(0x0b), + Z(0x16), Z(0x74), Z(0x31), Z(0x8a), Z(0x23), Z(0x17), Z(0x04), Z(0xfa), + Z(0x79), Z(0x84), Z(0xb1), Z(0xf5), Z(0x13), Z(0xab), Z(0xb5), Z(0x2e), + Z(0xaa), Z(0x0c), Z(0x60), Z(0x6b), Z(0x5b), Z(0xc4), Z(0x4b), Z(0xbc), + Z(0xe2), Z(0xaf), Z(0x45), Z(0x73), Z(0xfa), Z(0xc9), Z(0x49), Z(0xcd), + Z(0x00), Z(0x92), Z(0x7d), Z(0x97), Z(0x7a), Z(0x18), Z(0x60), Z(0x3d), + Z(0xcf), Z(0x5b), Z(0xde), Z(0xc6), Z(0xe2), Z(0xe6), Z(0xbb), Z(0x8b), + Z(0x06), Z(0xda), Z(0x08), Z(0x15), Z(0x1b), Z(0x88), Z(0x6a), Z(0x17), + Z(0x89), Z(0xd0), Z(0xa9), Z(0xc1), Z(0xc9), Z(0x70), Z(0x6b), Z(0xe5), + Z(0x43), Z(0xf4), Z(0x68), Z(0xc8), Z(0xd3), Z(0x84), Z(0x28), Z(0x0a), + Z(0x52), Z(0x66), Z(0xa3), Z(0xca), Z(0xf2), Z(0xe3), Z(0x7f), Z(0x7a), + Z(0x31), Z(0xf7), Z(0x88), Z(0x94), Z(0x5e), Z(0x9c), Z(0x63), Z(0xd5), + Z(0x24), Z(0x66), Z(0xfc), Z(0xb3), Z(0x57), Z(0x25), Z(0xbe), Z(0x89), + Z(0x44), Z(0xc4), Z(0xe0), Z(0x8f), Z(0x23), Z(0x3c), Z(0x12), Z(0x52), + Z(0xf5), Z(0x1e), Z(0xf4), Z(0xcb), Z(0x18), Z(0x33), Z(0x1f), Z(0xf8), + Z(0x69), Z(0x10), Z(0x9d), Z(0xd3), Z(0xf7), Z(0x28), Z(0xf8), Z(0x30), + Z(0x05), Z(0x5e), Z(0x32), Z(0xc0), Z(0xd5), Z(0x19), Z(0xbd), Z(0x45), + Z(0x8b), Z(0x5b), Z(0xfd), Z(0xbc), Z(0xe2), Z(0x5c), Z(0xa9), Z(0x96), + Z(0xef), Z(0x70), Z(0xcf), Z(0xc2), Z(0x2a), Z(0xb3), Z(0x61), Z(0xad), + Z(0x80), Z(0x48), Z(0x81), Z(0xb7), Z(0x1d), Z(0x43), Z(0xd9), Z(0xd7), + Z(0x45), Z(0xf0), Z(0xd8), Z(0x8a), Z(0x59), Z(0x7c), Z(0x57), Z(0xc1), + Z(0x79), Z(0xc7), Z(0x34), Z(0xd6), Z(0x43), Z(0xdf), Z(0xe4), Z(0x78), + Z(0x16), Z(0x06), Z(0xda), Z(0x92), Z(0x76), Z(0x51), Z(0xe1), Z(0xd4), + Z(0x70), Z(0x03), Z(0xe0), Z(0x2f), Z(0x96), Z(0x91), Z(0x82), Z(0x80) +}; + +#undef Z +#define Z(x) cpu_to_be32(x << 11) +static const __be32 sbox2[256] =3D { + Z(0xf0), Z(0x37), Z(0x24), Z(0x53), Z(0x2a), Z(0x03), Z(0x83), Z(0x86), + Z(0xd1), Z(0xec), Z(0x50), Z(0xf0), Z(0x42), Z(0x78), Z(0x2f), Z(0x6d), + Z(0xbf), Z(0x80), Z(0x87), Z(0x27), Z(0x95), Z(0xe2), Z(0xc5), Z(0x5d), + Z(0xf9), Z(0x6f), Z(0xdb), Z(0xb4), Z(0x65), Z(0x6e), Z(0xe7), Z(0x24), + Z(0xc8), Z(0x1a), Z(0xbb), Z(0x49), Z(0xb5), Z(0x0a), Z(0x7d), Z(0xb9), + Z(0xe8), Z(0xdc), Z(0xb7), Z(0xd9), Z(0x45), Z(0x20), Z(0x1b), Z(0xce), + Z(0x59), Z(0x9d), Z(0x6b), Z(0xbd), Z(0x0e), Z(0x8f), Z(0xa3), Z(0xa9), + Z(0xbc), Z(0x74), Z(0xa6), Z(0xf6), Z(0x7f), Z(0x5f), Z(0xb1), Z(0x68), + Z(0x84), Z(0xbc), Z(0xa9), Z(0xfd), Z(0x55), Z(0x50), Z(0xe9), Z(0xb6), + Z(0x13), Z(0x5e), Z(0x07), Z(0xb8), Z(0x95), Z(0x02), Z(0xc0), Z(0xd0), + Z(0x6a), Z(0x1a), Z(0x85), Z(0xbd), Z(0xb6), Z(0xfd), Z(0xfe), Z(0x17), + Z(0x3f), Z(0x09), Z(0xa3), Z(0x8d), Z(0xfb), Z(0xed), Z(0xda), Z(0x1d), + Z(0x6d), Z(0x1c), Z(0x6c), Z(0x01), Z(0x5a), Z(0xe5), Z(0x71), Z(0x3e), + Z(0x8b), Z(0x6b), Z(0xbe), Z(0x29), Z(0xeb), Z(0x12), Z(0x19), Z(0x34), + Z(0xcd), Z(0xb3), Z(0xbd), Z(0x35), Z(0xea), Z(0x4b), Z(0xd5), Z(0xae), + Z(0x2a), Z(0x79), Z(0x5a), Z(0xa5), Z(0x32), Z(0x12), Z(0x7b), Z(0xdc), + Z(0x2c), Z(0xd0), Z(0x22), Z(0x4b), Z(0xb1), Z(0x85), Z(0x59), Z(0x80), + Z(0xc0), Z(0x30), Z(0x9f), Z(0x73), Z(0xd3), Z(0x14), Z(0x48), Z(0x40), + Z(0x07), Z(0x2d), Z(0x8f), Z(0x80), Z(0x0f), Z(0xce), Z(0x0b), Z(0x5e), + Z(0xb7), Z(0x5e), Z(0xac), Z(0x24), Z(0x94), Z(0x4a), Z(0x18), Z(0x15), + Z(0x05), Z(0xe8), Z(0x02), Z(0x77), Z(0xa9), Z(0xc7), Z(0x40), Z(0x45), + Z(0x89), Z(0xd1), Z(0xea), Z(0xde), Z(0x0c), Z(0x79), Z(0x2a), Z(0x99), + Z(0x6c), Z(0x3e), Z(0x95), Z(0xdd), Z(0x8c), Z(0x7d), Z(0xad), Z(0x6f), + Z(0xdc), Z(0xff), Z(0xfd), Z(0x62), Z(0x47), Z(0xb3), Z(0x21), Z(0x8a), + Z(0xec), Z(0x8e), Z(0x19), Z(0x18), Z(0xb4), Z(0x6e), Z(0x3d), Z(0xfd), + Z(0x74), Z(0x54), Z(0x1e), Z(0x04), Z(0x85), Z(0xd8), Z(0xbc), Z(0x1f), + Z(0x56), Z(0xe7), Z(0x3a), Z(0x56), Z(0x67), Z(0xd6), Z(0xc8), Z(0xa5), + Z(0xf3), Z(0x8e), Z(0xde), Z(0xae), Z(0x37), Z(0x49), Z(0xb7), Z(0xfa), + Z(0xc8), Z(0xf4), Z(0x1f), Z(0xe0), Z(0x2a), Z(0x9b), Z(0x15), Z(0xd1), + Z(0x34), Z(0x0e), Z(0xb5), Z(0xe0), Z(0x44), Z(0x78), Z(0x84), Z(0x59), + Z(0x56), Z(0x68), Z(0x77), Z(0xa5), Z(0x14), Z(0x06), Z(0xf5), Z(0x2f), + Z(0x8c), Z(0x8a), Z(0x73), Z(0x80), Z(0x76), Z(0xb4), Z(0x10), Z(0x86) +}; + +#undef Z +#define Z(x) cpu_to_be32(x << 19) +static const __be32 sbox3[256] =3D { + Z(0xa9), Z(0x2a), Z(0x48), Z(0x51), Z(0x84), Z(0x7e), Z(0x49), Z(0xe2), + Z(0xb5), Z(0xb7), Z(0x42), Z(0x33), Z(0x7d), Z(0x5d), Z(0xa6), Z(0x12), + Z(0x44), Z(0x48), Z(0x6d), Z(0x28), Z(0xaa), Z(0x20), Z(0x6d), Z(0x57), + Z(0xd6), Z(0x6b), Z(0x5d), Z(0x72), Z(0xf0), Z(0x92), Z(0x5a), Z(0x1b), + Z(0x53), Z(0x80), Z(0x24), Z(0x70), Z(0x9a), Z(0xcc), Z(0xa7), Z(0x66), + Z(0xa1), Z(0x01), Z(0xa5), Z(0x41), Z(0x97), Z(0x41), Z(0x31), Z(0x82), + Z(0xf1), Z(0x14), Z(0xcf), Z(0x53), Z(0x0d), Z(0xa0), Z(0x10), Z(0xcc), + Z(0x2a), Z(0x7d), Z(0xd2), Z(0xbf), Z(0x4b), Z(0x1a), Z(0xdb), Z(0x16), + Z(0x47), Z(0xf6), Z(0x51), Z(0x36), Z(0xed), Z(0xf3), Z(0xb9), Z(0x1a), + Z(0xa7), Z(0xdf), Z(0x29), Z(0x43), Z(0x01), Z(0x54), Z(0x70), Z(0xa4), + Z(0xbf), Z(0xd4), Z(0x0b), Z(0x53), Z(0x44), Z(0x60), Z(0x9e), Z(0x23), + Z(0xa1), Z(0x18), Z(0x68), Z(0x4f), Z(0xf0), Z(0x2f), Z(0x82), Z(0xc2), + Z(0x2a), Z(0x41), Z(0xb2), Z(0x42), Z(0x0c), Z(0xed), Z(0x0c), Z(0x1d), + Z(0x13), Z(0x3a), Z(0x3c), Z(0x6e), Z(0x35), Z(0xdc), Z(0x60), Z(0x65), + Z(0x85), Z(0xe9), Z(0x64), Z(0x02), Z(0x9a), Z(0x3f), Z(0x9f), Z(0x87), + Z(0x96), Z(0xdf), Z(0xbe), Z(0xf2), Z(0xcb), Z(0xe5), Z(0x6c), Z(0xd4), + Z(0x5a), Z(0x83), Z(0xbf), Z(0x92), Z(0x1b), Z(0x94), Z(0x00), Z(0x42), + Z(0xcf), Z(0x4b), Z(0x00), Z(0x75), Z(0xba), Z(0x8f), Z(0x76), Z(0x5f), + Z(0x5d), Z(0x3a), Z(0x4d), Z(0x09), Z(0x12), Z(0x08), Z(0x38), Z(0x95), + Z(0x17), Z(0xe4), Z(0x01), Z(0x1d), Z(0x4c), Z(0xa9), Z(0xcc), Z(0x85), + Z(0x82), Z(0x4c), Z(0x9d), Z(0x2f), Z(0x3b), Z(0x66), Z(0xa1), Z(0x34), + Z(0x10), Z(0xcd), Z(0x59), Z(0x89), Z(0xa5), Z(0x31), Z(0xcf), Z(0x05), + Z(0xc8), Z(0x84), Z(0xfa), Z(0xc7), Z(0xba), Z(0x4e), Z(0x8b), Z(0x1a), + Z(0x19), Z(0xf1), Z(0xa1), Z(0x3b), Z(0x18), Z(0x12), Z(0x17), Z(0xb0), + Z(0x98), Z(0x8d), Z(0x0b), Z(0x23), Z(0xc3), Z(0x3a), Z(0x2d), Z(0x20), + Z(0xdf), Z(0x13), Z(0xa0), Z(0xa8), Z(0x4c), Z(0x0d), Z(0x6c), Z(0x2f), + Z(0x47), Z(0x13), Z(0x13), Z(0x52), Z(0x1f), Z(0x2d), Z(0xf5), Z(0x79), + Z(0x3d), Z(0xa2), Z(0x54), Z(0xbd), Z(0x69), Z(0xc8), Z(0x6b), Z(0xf3), + Z(0x05), Z(0x28), Z(0xf1), Z(0x16), Z(0x46), Z(0x40), Z(0xb0), Z(0x11), + Z(0xd3), Z(0xb7), Z(0x95), Z(0x49), Z(0xcf), Z(0xc3), Z(0x1d), Z(0x8f), + Z(0xd8), Z(0xe1), Z(0x73), Z(0xdb), Z(0xad), Z(0xc8), Z(0xc9), Z(0xa9), + Z(0xa1), Z(0xc2), Z(0xc5), Z(0xe3), Z(0xba), Z(0xfc), Z(0x0e), Z(0x25) +}; + +union fcrypt_block { + __be64 a; + struct { + __be32 l, r; + }; +}; + +#define F_ENCRYPT(R, L, sched) \ + do { \ + union lc4 { \ + __be32 l; \ + u8 c[4]; \ + } u; \ + u.l =3D sched ^ R; \ + L ^=3D sbox0[u.c[0]] ^ sbox1[u.c[1]] ^ sbox2[u.c[2]] ^ \ + sbox3[u.c[3]]; \ + } while (0) + +/* Encrypt one block using FCrypt. */ +static __be64 fcrypt_encrypt(const struct fcrypt_key *key, __be64 ptext) +{ + union fcrypt_block X =3D { .a =3D ptext }; + + /* This is a 16 round Feistel network with permutation F_ENCRYPT. */ + F_ENCRYPT(X.r, X.l, key->sched[0x0]); + F_ENCRYPT(X.l, X.r, key->sched[0x1]); + F_ENCRYPT(X.r, X.l, key->sched[0x2]); + F_ENCRYPT(X.l, X.r, key->sched[0x3]); + F_ENCRYPT(X.r, X.l, key->sched[0x4]); + F_ENCRYPT(X.l, X.r, key->sched[0x5]); + F_ENCRYPT(X.r, X.l, key->sched[0x6]); + F_ENCRYPT(X.l, X.r, key->sched[0x7]); + F_ENCRYPT(X.r, X.l, key->sched[0x8]); + F_ENCRYPT(X.l, X.r, key->sched[0x9]); + F_ENCRYPT(X.r, X.l, key->sched[0xa]); + F_ENCRYPT(X.l, X.r, key->sched[0xb]); + F_ENCRYPT(X.r, X.l, key->sched[0xc]); + F_ENCRYPT(X.l, X.r, key->sched[0xd]); + F_ENCRYPT(X.r, X.l, key->sched[0xe]); + F_ENCRYPT(X.l, X.r, key->sched[0xf]); + return X.a; +} + +/* Decrypt one block using FCrypt. */ +static __be64 fcrypt_decrypt(const struct fcrypt_key *key, __be64 ctext) +{ + union fcrypt_block X =3D { .a =3D ctext }; + + /* This is a 16 round Feistel network with permutation F_ENCRYPT. */ + F_ENCRYPT(X.l, X.r, key->sched[0xf]); + F_ENCRYPT(X.r, X.l, key->sched[0xe]); + F_ENCRYPT(X.l, X.r, key->sched[0xd]); + F_ENCRYPT(X.r, X.l, key->sched[0xc]); + F_ENCRYPT(X.l, X.r, key->sched[0xb]); + F_ENCRYPT(X.r, X.l, key->sched[0xa]); + F_ENCRYPT(X.l, X.r, key->sched[0x9]); + F_ENCRYPT(X.r, X.l, key->sched[0x8]); + F_ENCRYPT(X.l, X.r, key->sched[0x7]); + F_ENCRYPT(X.r, X.l, key->sched[0x6]); + F_ENCRYPT(X.l, X.r, key->sched[0x5]); + F_ENCRYPT(X.r, X.l, key->sched[0x4]); + F_ENCRYPT(X.l, X.r, key->sched[0x3]); + F_ENCRYPT(X.r, X.l, key->sched[0x2]); + F_ENCRYPT(X.l, X.r, key->sched[0x1]); + F_ENCRYPT(X.r, X.l, key->sched[0x0]); + return X.a; +} + +/** + * fcrypt_preparekey - Prepare a key for FCrypt encryption and decryption + * @key: (out) The prepared key + * @raw_key: The raw key as an 8-byte array + * + * This computes the FCrypt key schedule. + */ +void fcrypt_preparekey(struct fcrypt_key *key, const u8 raw_key[FCRYPT_BSI= ZE]) +{ + u64 k =3D 0; + + /* Load the 56 non-parity bits of the key. Discard the parity bits. */ + for (int i =3D 0; i < 8; i++) + k =3D (k << 7) | (raw_key[i] >> 1); + + /* Generate the key schedule word for each round. */ + for (int i =3D 0; i < FCRYPT_ROUNDS; i++) { + key->sched[i] =3D cpu_to_be32(k); + /* Rotate the low 56 bits of 'k' right by 11 bits. */ + k =3D (k >> 11) | ((k & ((1 << 11) - 1)) << (56 - 11)); + } +} +EXPORT_SYMBOL_IF_KUNIT(fcrypt_preparekey); + +/** + * fcrypt_pcbc_encrypt - Encrypt data using FCrypt cipher in PCBC mode + * @key: The key + * @iv: The 8-byte initialization vector + * @src: The source data + * @dst: The destination data. Both in-place and out-of-place are support= ed. + * @nblocks: The number of 8-byte blocks to encrypt + * + * WARNING: This cipher is insecure. Not only is the 56-bit key easily + * brute-forced, the cipher itself is cryptographically weak and doesn't e= ven + * provide the intended 56-bit security level. It effectively just acts a= s an + * obfuscation algorithm. It is supported only for backwards compatibilit= y. + */ +void fcrypt_pcbc_encrypt(const struct fcrypt_key *key, + const u8 iv[FCRYPT_BSIZE], const void *src, void *dst, + size_t nblocks) +{ + __be64 prev =3D get_unaligned((const __be64 *)iv); + const __be64 *src_blocks =3D src; + __be64 *dst_blocks =3D dst; + + while (nblocks--) { + __be64 ptext, ctext; + + ptext =3D get_unaligned(src_blocks++); + ctext =3D fcrypt_encrypt(key, prev ^ ptext); + put_unaligned(ctext, dst_blocks++); + prev =3D ptext ^ ctext; + } +} +EXPORT_SYMBOL_IF_KUNIT(fcrypt_pcbc_encrypt); + +/** + * fcrypt_pcbc_decrypt - Decrypt data using FCrypt cipher in PCBC mode + * @key: The key + * @iv: The 8-byte initialization vector + * @src: The source data + * @dst: The destination data. Both in-place and out-of-place are support= ed. + * @nblocks: The number of 8-byte blocks to decrypt + */ +void fcrypt_pcbc_decrypt(const struct fcrypt_key *key, + const u8 iv[FCRYPT_BSIZE], const void *src, void *dst, + size_t nblocks) +{ + __be64 prev =3D get_unaligned((const __be64 *)iv); + const __be64 *src_blocks =3D src; + __be64 *dst_blocks =3D dst; + + while (nblocks--) { + __be64 ptext, ctext; + + ctext =3D get_unaligned(src_blocks++); + ptext =3D prev ^ fcrypt_decrypt(key, ctext); + put_unaligned(ptext, dst_blocks++); + prev =3D ptext ^ ctext; + } +} +EXPORT_SYMBOL_IF_KUNIT(fcrypt_pcbc_decrypt); diff --git a/net/rxrpc/tests/Makefile b/net/rxrpc/tests/Makefile new file mode 100644 index 000000000000..4f51008800b4 --- /dev/null +++ b/net/rxrpc/tests/Makefile @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +obj-$(CONFIG_AF_RXRPC_KUNIT_TEST) +=3D rxrpc_kunit.o diff --git a/net/rxrpc/tests/rxrpc_kunit.c b/net/rxrpc/tests/rxrpc_kunit.c new file mode 100644 index 000000000000..85a9859fae44 --- /dev/null +++ b/net/rxrpc/tests/rxrpc_kunit.c @@ -0,0 +1,109 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Unit tests for RxRPC crypto functions + * + * Copyright 2026 Google LLC + */ +#include "../ar-internal.h" +#include + +struct fcrypt_pcbc_testvec { + u8 key[FCRYPT_BSIZE]; + u8 iv[FCRYPT_BSIZE]; + const u8 *ptext; /* plaintext */ + const u8 *ctext; /* ciphertext */ + size_t nblocks; /* length of ptext and ctext in blocks */ +}; + +/* FCrypt-PCBC test vectors */ +static const struct fcrypt_pcbc_testvec fcrypt_pcbc_testvecs[] =3D { + { + /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.h= tml */ + .key =3D "\x00\x00\x00\x00\x00\x00\x00\x00", + .iv =3D "\x00\x00\x00\x00\x00\x00\x00\x00", + .ptext =3D "\x00\x00\x00\x00\x00\x00\x00\x00", + .ctext =3D "\x0E\x09\x00\xC7\x3E\xF7\xED\x41", + .nblocks =3D 1, + }, + { + .key =3D "\x11\x44\x77\xAA\xDD\x00\x33\x66", + .iv =3D "\x00\x00\x00\x00\x00\x00\x00\x00", + .ptext =3D "\x12\x34\x56\x78\x9A\xBC\xDE\xF0", + .ctext =3D "\xD8\xED\x78\x74\x77\xEC\x06\x80", + .nblocks =3D 1, + }, + { + /* From Arla */ + .key =3D "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87", + .iv =3D "\xfe\xdc\xba\x98\x76\x54\x32\x10", + .ptext =3D "The quick brown fox jumps over the lazy dogs.\0\0", + .ctext =3D "\x00\xf0\x0e\x11\x75\xe6\x23\x82" + "\xee\xac\x98\x62\x44\x51\xe4\x84" + "\xc3\x59\xd8\xaa\x64\x60\xae\xf7" + "\xd2\xd9\x13\x79\x72\xa3\x45\x03" + "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1" + "\xf8\x91\x3c\xac\x44\x22\x92\xef", + .nblocks =3D 6, + }, + { + .key =3D "\xfe\xdc\xba\x98\x76\x54\x32\x10", + .iv =3D "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87", + .ptext =3D "The quick brown fox jumps over the lazy dogs.\0\0", + .ctext =3D "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c" + "\x01\x88\x7f\x3e\x31\x6e\x62\x9d" + "\xd8\xe0\x57\xa3\x06\x3a\x42\x58" + "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0" + "\x19\x89\x09\x1c\x2a\x8e\x8c\x94" + "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f", + .nblocks =3D 6, + } +}; + +static void test_fcrypt_pcbc(struct kunit *test) +{ + u8 data[48]; + + for (size_t i =3D 0; i < ARRAY_SIZE(fcrypt_pcbc_testvecs); i++) { + const struct fcrypt_pcbc_testvec *tv =3D &fcrypt_pcbc_testvecs[i]; + const size_t nblocks =3D tv->nblocks; + const size_t len =3D nblocks * FCRYPT_BSIZE; + struct fcrypt_key key; + + KUNIT_ASSERT_GE(test, sizeof(data), len); + + fcrypt_preparekey(&key, tv->key); + + /* out-of-place encryption */ + fcrypt_pcbc_encrypt(&key, tv->iv, tv->ptext, data, nblocks); + KUNIT_ASSERT_MEMEQ(test, tv->ctext, data, len); + + /* in-place encryption */ + memcpy(data, tv->ptext, len); + fcrypt_pcbc_encrypt(&key, tv->iv, data, data, nblocks); + KUNIT_ASSERT_MEMEQ(test, tv->ctext, data, len); + + /* out-of-place decryption */ + fcrypt_pcbc_decrypt(&key, tv->iv, tv->ctext, data, nblocks); + KUNIT_ASSERT_MEMEQ(test, tv->ptext, data, len); + + /* in-place decryption */ + memcpy(data, tv->ctext, len); + fcrypt_pcbc_decrypt(&key, tv->iv, data, data, nblocks); + KUNIT_ASSERT_MEMEQ(test, tv->ptext, data, len); + } +} + +static struct kunit_case rxrpc_test_cases[] =3D { + KUNIT_CASE(test_fcrypt_pcbc), + {}, +}; + +static struct kunit_suite rxrpc_test_suite =3D { + .name =3D "rxrpc", + .test_cases =3D rxrpc_test_cases, +}; +kunit_test_suite(rxrpc_test_suite); + +MODULE_DESCRIPTION("Unit tests for RxRPC crypto functions"); +MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING"); +MODULE_LICENSE("GPL"); --=20 2.54.0 From nobody Sun May 24 20:33:22 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 60EC73624AB; Fri, 22 May 2026 05:07:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779426473; cv=none; b=If1iA5YSGp6bS2Lc63RpJlim0z/taJMPaoBlnqESiX4KS/BITT5QhANjyEyWNkuikpcSentQcyFvBqOUuXcY8OEfb6KvRQ5rWinbt/mQsFXXRtgLcZ+rvdqfR1n8+htG4lHgU+GXUGDHVFTa/TsE2tYd6x5W6tUd1RH3cezqI0w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779426473; c=relaxed/simple; bh=SuRu5z8lhK3oYz7xQfuIcJRRcKm4R6NLvqduksCiOtA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iAgkXRQ1lQRA9jVcwd8jh8rgAe1RLEQZU8Roz4vQALSfIqNR7IMlscalZNuWOVylTa3M9aep1YdY3Hck1qyfGMawzSMetidyjt2vEmI4tYeU/w8hbvOYFXxDkeZYjkls3q3EVI4qwAb6e/1CEgLGMTUPW2/tw27rl1lk0mSQXPA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YUmOKmrP; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YUmOKmrP" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 392FC1F00A3E; Fri, 22 May 2026 05:07:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779426470; bh=rR3DeR1uSJhThSMlR8lxO+hM3CrE/ZFTTbFCLgN0AQg=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=YUmOKmrPwlVzZi+VrsjX0dmpIRUVkBu36GWkt8D2hBDY/S1mXeRoiIZe18ESc9dVS WudD3bMi3bKvPNA2L6doU1UL2ZYrq/p31Ekq39nFfTpyOWFq3YrD7W5rXi1XBZ8jO3 R7OXONW97pGepy0nD+hg9qSpfpCIuIv+gUTYbPAXYoTifWx05d0cRLkrwEzJRFwVb3 u1TcFfUTQ22R036cCQeyrfzkmeJvB/nsZYxbO62cBRSsuMN9SzVcMrxo84rQMXOrnq zYrEQWLUBqIw11nEz6/RUdtTrEGMgNbw7iIfbw233zhLOIUDTqyUbiSPZMh6+CN54q UDfxOEjES3t6g== From: Eric Biggers To: netdev@vger.kernel.org, linux-afs@lists.infradead.org Cc: David Howells , Marc Dionne , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Eric Biggers Subject: [PATCH net-next v2 2/5] net/rxrpc: Use local FCrypt-PCBC implementation Date: Fri, 22 May 2026 00:07:33 -0500 Message-ID: <20260522050740.84561-3-ebiggers@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260522050740.84561-1-ebiggers@kernel.org> References: <20260522050740.84561-1-ebiggers@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use the local implementation of FCrypt-PCBC instead of the crypto API one. This will allow the crypto API one to be removed. It also simplifies the code quite a bit. The local FCrypt-PCBC implementation is also significantly faster than the crypto API one, since the crypto API one had a lot of overhead. For example, benchmarking on an x86_64 CPU, I see that FCrypt-PCBC decryption throughput improved from 83 MB/s to 157 MB/s. (Meanwhile, AES-256-GCM decryption is 8064 MB/s on the same CPU. Clearly, anyone looking for good performance, or anything that is actually secure for that matter, needs to look elsewhere anyway.) Acked-by: David Howells Signed-off-by: Eric Biggers Tested-by: Marc Dionne --- net/rxrpc/Kconfig | 1 - net/rxrpc/ar-internal.h | 2 +- net/rxrpc/rxkad.c | 353 +++++++++------------------------------- 3 files changed, 76 insertions(+), 280 deletions(-) diff --git a/net/rxrpc/Kconfig b/net/rxrpc/Kconfig index e2bb795cdf0c..de19c67dc965 100644 --- a/net/rxrpc/Kconfig +++ b/net/rxrpc/Kconfig @@ -58,11 +58,10 @@ config RXKAD bool "RxRPC Kerberos security" select CRYPTO select CRYPTO_MANAGER select CRYPTO_SKCIPHER select CRYPTO_PCBC - select CRYPTO_FCRYPT help Provide kerberos 4 and AFS kaserver security handling for AF_RXRPC through the use of the key retention service. =20 See Documentation/networking/rxrpc.rst. diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index 30aaf69b4c7c..29d32aa4ecc7 100644 --- a/net/rxrpc/ar-internal.h +++ b/net/rxrpc/ar-internal.h @@ -575,11 +575,11 @@ struct rxrpc_connection { =20 struct mutex security_lock; /* Lock for security management */ const struct rxrpc_security *security; /* applied security module */ union { struct { - struct crypto_sync_skcipher *cipher; /* encryption handle */ + struct fcrypt_key *cipher; /* encryption key */ struct rxrpc_crypt csum_iv; /* packet checksum base */ u32 nonce; /* response re-use preventer */ } rxkad; struct { struct rxgk_context *keys[4]; /* (Re-)keying buffer */ diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c index 6fbd883401ac..d8bc5ecbfc3d 100644 --- a/net/rxrpc/rxkad.c +++ b/net/rxrpc/rxkad.c @@ -6,10 +6,11 @@ */ =20 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt =20 #include +#include #include #include #include #include #include @@ -28,30 +29,23 @@ #define INST_SZ 40 /* size of principal's instance */ #define REALM_SZ 40 /* size of principal's auth domain */ #define SNAME_SZ 40 /* size of service name */ #define RXKAD_ALIGN 8 =20 +static const u8 zero_iv[FCRYPT_BSIZE]; + struct rxkad_level1_hdr { __be32 data_size; /* true data size (excluding padding) */ }; =20 struct rxkad_level2_hdr { __be32 data_size; /* true data size (excluding padding) */ __be32 checksum; /* decrypted data checksum */ }; =20 -static int rxkad_prime_packet_security(struct rxrpc_connection *conn, - struct crypto_sync_skcipher *ci); - -/* - * this holds a pinned cipher so that keventd doesn't get called by the ci= pher - * alloc routine, but since we have it to hand, we use it to decrypt RESPO= NSE - * packets - */ -static struct crypto_sync_skcipher *rxkad_ci; -static struct skcipher_request *rxkad_ci_req; -static DEFINE_MUTEX(rxkad_ci_mutex); +static void rxkad_prime_packet_security(struct rxrpc_connection *conn, + const struct fcrypt_key *cipher); =20 /* * Parse the information from a server key * * The data should be the 8-byte secret key. @@ -98,47 +92,41 @@ static void rxkad_destroy_server_key(struct key *key) * initialise connection security */ static int rxkad_init_connection_security(struct rxrpc_connection *conn, struct rxrpc_key_token *token) { - struct crypto_sync_skcipher *ci; + struct fcrypt_key *ci; int ret; =20 _enter("{%d},{%x}", conn->debug_id, key_serial(conn->key)); =20 conn->security_ix =3D token->security_index; =20 - ci =3D crypto_alloc_sync_skcipher("pcbc(fcrypt)", 0, 0); - if (IS_ERR(ci)) { - _debug("no cipher"); - ret =3D PTR_ERR(ci); + ci =3D kmalloc_obj(*ci); + if (!ci) { + ret =3D -ENOMEM; goto error; } - - if (crypto_sync_skcipher_setkey(ci, token->kad->session_key, - sizeof(token->kad->session_key)) < 0) - BUG(); + fcrypt_preparekey(ci, token->kad->session_key); =20 switch (conn->security_level) { case RXRPC_SECURITY_PLAIN: case RXRPC_SECURITY_AUTH: case RXRPC_SECURITY_ENCRYPT: break; default: ret =3D -EKEYREJECTED; - goto error; + goto error_ci; } =20 - ret =3D rxkad_prime_packet_security(conn, ci); - if (ret < 0) - goto error_ci; + rxkad_prime_packet_security(conn, ci); =20 conn->rxkad.cipher =3D ci; return 0; =20 error_ci: - crypto_free_sync_skcipher(ci); + kfree_sensitive(ci); error: _leave(" =3D %d", ret); return ret; } =20 @@ -186,66 +174,32 @@ static struct rxrpc_txbuf *rxkad_alloc_txbuf(struct r= xrpc_call *call, size_t rem =20 /* * prime the encryption state with the invariant parts of a connection's * description */ -static int rxkad_prime_packet_security(struct rxrpc_connection *conn, - struct crypto_sync_skcipher *ci) +static void rxkad_prime_packet_security(struct rxrpc_connection *conn, + const struct fcrypt_key *cipher) { - struct skcipher_request *req; struct rxrpc_key_token *token; - struct scatterlist sg; - struct rxrpc_crypt iv; - __be32 *tmpbuf; - size_t tmpsize =3D 4 * sizeof(__be32); - int ret; + __be32 tmpbuf[4]; =20 _enter(""); =20 if (!conn->key) - return 0; - - tmpbuf =3D kmalloc(tmpsize, GFP_KERNEL); - if (!tmpbuf) - return -ENOMEM; - - req =3D skcipher_request_alloc(&ci->base, GFP_NOFS); - if (!req) { - kfree(tmpbuf); - return -ENOMEM; - } - + return; token =3D conn->key->payload.data[0]; - memcpy(&iv, token->kad->session_key, sizeof(iv)); =20 tmpbuf[0] =3D htonl(conn->proto.epoch); tmpbuf[1] =3D htonl(conn->proto.cid); tmpbuf[2] =3D 0; tmpbuf[3] =3D htonl(conn->security_ix); =20 - sg_init_one(&sg, tmpbuf, tmpsize); - skcipher_request_set_sync_tfm(req, ci); - skcipher_request_set_callback(req, 0, NULL, NULL); - skcipher_request_set_crypt(req, &sg, &sg, tmpsize, iv.x); - ret =3D crypto_skcipher_encrypt(req); - skcipher_request_free(req); - - memcpy(&conn->rxkad.csum_iv, tmpbuf + 2, sizeof(conn->rxkad.csum_iv)); - kfree(tmpbuf); - _leave(" =3D %d", ret); - return ret; -} - -/* - * Allocate and prepare the crypto request on a call. For any particular = call, - * this is called serially for the packets, so no lock should be necessary. - */ -static struct skcipher_request *rxkad_get_call_crypto(struct rxrpc_call *c= all) -{ - struct crypto_skcipher *tfm =3D &call->conn->rxkad.cipher->base; - - return skcipher_request_alloc(tfm, GFP_NOFS); + static_assert(sizeof(tmpbuf) % FCRYPT_BSIZE =3D=3D 0); + fcrypt_pcbc_encrypt(cipher, /* iv=3D */ token->kad->session_key, tmpbuf, + tmpbuf, sizeof(tmpbuf) / FCRYPT_BSIZE); + memcpy(&conn->rxkad.csum_iv, &tmpbuf[2], sizeof(conn->rxkad.csum_iv)); + _leave(""); } =20 /* * Clean up the crypto on a call. */ @@ -254,20 +208,16 @@ static void rxkad_free_call_crypto(struct rxrpc_call = *call) } =20 /* * partially encrypt a packet (level 1 security) */ -static int rxkad_secure_packet_auth(const struct rxrpc_call *call, - struct rxrpc_txbuf *txb, - struct skcipher_request *req) +static void rxkad_secure_packet_auth(const struct rxrpc_call *call, + struct rxrpc_txbuf *txb) { struct rxkad_level1_hdr *hdr =3D txb->data; - struct rxrpc_crypt iv; - struct scatterlist sg; size_t pad; u16 check; - int ret; =20 _enter(""); =20 check =3D txb->seq ^ call->call_id; hdr->data_size =3D htonl((u32)check << 16 | txb->len); @@ -280,72 +230,52 @@ static int rxkad_secure_packet_auth(const struct rxrp= c_call *call, memset(txb->data + txb->offset, 0, pad); txb->pkt_len +=3D pad; } =20 /* start the encryption afresh */ - memset(&iv, 0, sizeof(iv)); - - sg_init_one(&sg, hdr, 8); - skcipher_request_set_sync_tfm(req, call->conn->rxkad.cipher); - skcipher_request_set_callback(req, 0, NULL, NULL); - skcipher_request_set_crypt(req, &sg, &sg, 8, iv.x); - ret =3D crypto_skcipher_encrypt(req); - skcipher_request_zero(req); - - _leave(" =3D %d", ret); - return ret; + fcrypt_pcbc_encrypt(call->conn->rxkad.cipher, zero_iv, hdr, hdr, 1); + _leave(""); } =20 /* * wholly encrypt a packet (level 2 security) */ -static int rxkad_secure_packet_encrypt(const struct rxrpc_call *call, - struct rxrpc_txbuf *txb, - struct skcipher_request *req) +static void rxkad_secure_packet_encrypt(const struct rxrpc_call *call, + struct rxrpc_txbuf *txb) { const struct rxrpc_key_token *token; struct rxkad_level2_hdr *rxkhdr =3D txb->data; - struct rxrpc_crypt iv; - struct scatterlist sg; size_t content, pad; u16 check; - int ret; =20 _enter(""); =20 check =3D txb->seq ^ call->call_id; =20 rxkhdr->data_size =3D htonl(txb->len | (u32)check << 16); rxkhdr->checksum =3D 0; =20 content =3D sizeof(struct rxkad_level2_hdr) + txb->len; + static_assert(RXKAD_ALIGN =3D=3D FCRYPT_BSIZE); txb->pkt_len =3D round_up(content, RXKAD_ALIGN); pad =3D txb->pkt_len - content; if (pad) memset(txb->data + txb->offset, 0, pad); + /* Now txb->pkt_len % FCRYPT_BSIZE =3D=3D 0. */ =20 /* encrypt from the session key */ token =3D call->conn->key->payload.data[0]; - memcpy(&iv, token->kad->session_key, sizeof(iv)); - - sg_init_one(&sg, rxkhdr, txb->pkt_len); - skcipher_request_set_sync_tfm(req, call->conn->rxkad.cipher); - skcipher_request_set_callback(req, 0, NULL, NULL); - skcipher_request_set_crypt(req, &sg, &sg, txb->pkt_len, iv.x); - ret =3D crypto_skcipher_encrypt(req); - skcipher_request_zero(req); - return ret; + fcrypt_pcbc_encrypt(call->conn->rxkad.cipher, token->kad->session_key, + rxkhdr, rxkhdr, txb->pkt_len / FCRYPT_BSIZE); + _leave(""); } =20 /* * checksum an RxRPC packet header */ static int rxkad_secure_packet(struct rxrpc_call *call, struct rxrpc_txbuf= *txb) { - struct skcipher_request *req; - struct rxrpc_crypt iv; - struct scatterlist sg; union { __be32 buf[2]; } crypto __aligned(8); u32 x, y =3D 0; int ret; @@ -359,31 +289,20 @@ static int rxkad_secure_packet(struct rxrpc_call *cal= l, struct rxrpc_txbuf *txb) =20 ret =3D key_validate(call->conn->key); if (ret < 0) return ret; =20 - req =3D rxkad_get_call_crypto(call); - if (!req) - return -ENOMEM; - - /* continue encrypting from where we left off */ - memcpy(&iv, call->conn->rxkad.csum_iv.x, sizeof(iv)); - /* calculate the security checksum */ x =3D (call->cid & RXRPC_CHANNELMASK) << (32 - RXRPC_CIDSHIFT); x |=3D txb->seq & 0x3fffffff; crypto.buf[0] =3D htonl(call->call_id); crypto.buf[1] =3D htonl(x); =20 - sg_init_one(&sg, crypto.buf, 8); - skcipher_request_set_sync_tfm(req, call->conn->rxkad.cipher); - skcipher_request_set_callback(req, 0, NULL, NULL); - skcipher_request_set_crypt(req, &sg, &sg, 8, iv.x); - ret =3D crypto_skcipher_encrypt(req); - skcipher_request_zero(req); - if (ret < 0) - goto out; + /* continue encrypting from where we left off */ + fcrypt_pcbc_encrypt(call->conn->rxkad.cipher, + call->conn->rxkad.csum_iv.x, crypto.buf, crypto.buf, + 1); =20 y =3D ntohl(crypto.buf[1]); y =3D (y >> 16) & 0xffff; if (y =3D=3D 0) y =3D 1; /* zero checksums are not permitted */ @@ -393,18 +312,20 @@ static int rxkad_secure_packet(struct rxrpc_call *cal= l, struct rxrpc_txbuf *txb) case RXRPC_SECURITY_PLAIN: txb->pkt_len =3D txb->len; ret =3D 0; break; case RXRPC_SECURITY_AUTH: - ret =3D rxkad_secure_packet_auth(call, txb, req); + rxkad_secure_packet_auth(call, txb); if (txb->alloc_size =3D=3D RXRPC_JUMBO_DATALEN) txb->jumboable =3D true; + ret =3D 0; break; case RXRPC_SECURITY_ENCRYPT: - ret =3D rxkad_secure_packet_encrypt(call, txb, req); + rxkad_secure_packet_encrypt(call, txb); if (txb->alloc_size =3D=3D RXRPC_JUMBO_DATALEN) txb->jumboable =3D true; + ret =3D 0; break; default: ret =3D -EPERM; break; } @@ -415,53 +336,34 @@ static int rxkad_secure_packet(struct rxrpc_call *cal= l, struct rxrpc_txbuf *txb) void *p =3D txb->data; =20 memset(p + txb->pkt_len, 0, gap); } =20 -out: - skcipher_request_free(req); _leave(" =3D %d [set %x]", ret, y); return ret; } =20 /* * decrypt partial encryption on a packet (level 1 security) */ static int rxkad_verify_packet_1(struct rxrpc_call *call, struct sk_buff *= skb, - rxrpc_seq_t seq, - struct skcipher_request *req) + rxrpc_seq_t seq) { struct rxkad_level1_hdr *sechdr; struct rxrpc_skb_priv *sp =3D rxrpc_skb(skb); - struct rxrpc_crypt iv; - struct scatterlist sg[1]; void *data =3D call->rx_dec_buffer; u32 len =3D sp->len, data_size, buf; u16 check; - int ret; =20 _enter(""); =20 if (len < 8) return rxrpc_abort_eproto(call, skb, RXKADSEALEDINCON, rxkad_abort_1_short_header); =20 - /* Decrypt the skbuff in-place. TODO: We really want to decrypt - * directly into the target buffer. - */ - sg_init_one(sg, data, len); - - /* start the decryption afresh */ - memset(&iv, 0, sizeof(iv)); - - skcipher_request_set_sync_tfm(req, call->conn->rxkad.cipher); - skcipher_request_set_callback(req, 0, NULL, NULL); - skcipher_request_set_crypt(req, sg, sg, 8, iv.x); - ret =3D crypto_skcipher_decrypt(req); - skcipher_request_zero(req); - if (ret < 0) - return ret; + /* Decrypt the first 8-byte block of the packet, using the zero IV. */ + fcrypt_pcbc_decrypt(call->conn->rxkad.cipher, zero_iv, data, data, 1); =20 /* Extract the decrypted packet length */ sechdr =3D data; call->rx_dec_offset =3D sizeof(*sechdr); len -=3D sizeof(*sechdr); @@ -486,52 +388,32 @@ static int rxkad_verify_packet_1(struct rxrpc_call *c= all, struct sk_buff *skb, =20 /* * wholly decrypt a packet (level 2 security) */ static int rxkad_verify_packet_2(struct rxrpc_call *call, struct sk_buff *= skb, - rxrpc_seq_t seq, - struct skcipher_request *req) + rxrpc_seq_t seq) { const struct rxrpc_key_token *token; struct rxkad_level2_hdr *sechdr; struct rxrpc_skb_priv *sp =3D rxrpc_skb(skb); - struct rxrpc_crypt iv; - struct scatterlist sg[1]; void *data =3D call->rx_dec_buffer; u32 len =3D sp->len, data_size, buf; u16 check; - int ret; =20 _enter(",{%d}", len); =20 if (len < 8) return rxrpc_abort_eproto(call, skb, RXKADSEALEDINCON, rxkad_abort_2_short_header); =20 /* Don't let the crypto algo see a misaligned length. */ len =3D round_down(len, 8); =20 - /* Decrypt in place in the call's decryption buffer. TODO: We really - * want to decrypt directly into the target buffer. - */ - sg_init_one(sg, data, len); - /* decrypt from the session key */ token =3D call->conn->key->payload.data[0]; - memcpy(&iv, token->kad->session_key, sizeof(iv)); - - skcipher_request_set_sync_tfm(req, call->conn->rxkad.cipher); - skcipher_request_set_callback(req, 0, NULL, NULL); - skcipher_request_set_crypt(req, sg, sg, len, iv.x); - ret =3D crypto_skcipher_decrypt(req); - skcipher_request_zero(req); - if (ret < 0) { - if (ret =3D=3D -ENOMEM) - return ret; - return rxrpc_abort_eproto(call, skb, RXKADSEALEDINCON, - rxkad_abort_2_crypto_unaligned); - } + fcrypt_pcbc_decrypt(call->conn->rxkad.cipher, token->kad->session_key, + data, data, len / FCRYPT_BSIZE); =20 /* Extract the decrypted packet length */ sechdr =3D data; call->rx_dec_offset =3D sizeof(*sechdr); len -=3D sizeof(*sechdr); @@ -560,13 +442,10 @@ static int rxkad_verify_packet_2(struct rxrpc_call *c= all, struct sk_buff *skb, * modifying (e.g. decrypting), it must be copied. */ static int rxkad_verify_packet(struct rxrpc_call *call, struct sk_buff *sk= b) { struct rxrpc_skb_priv *sp =3D rxrpc_skb(skb); - struct skcipher_request *req; - struct rxrpc_crypt iv; - struct scatterlist sg; union { __be32 buf[2]; } crypto __aligned(8); rxrpc_seq_t seq =3D sp->hdr.seq; int ret; @@ -577,31 +456,20 @@ static int rxkad_verify_packet(struct rxrpc_call *cal= l, struct sk_buff *skb) call->debug_id, key_serial(call->conn->key), seq); =20 if (!call->conn->rxkad.cipher) return 0; =20 - req =3D rxkad_get_call_crypto(call); - if (!req) - return -ENOMEM; - - /* continue encrypting from where we left off */ - memcpy(&iv, call->conn->rxkad.csum_iv.x, sizeof(iv)); - /* validate the security checksum */ x =3D (call->cid & RXRPC_CHANNELMASK) << (32 - RXRPC_CIDSHIFT); x |=3D seq & 0x3fffffff; crypto.buf[0] =3D htonl(call->call_id); crypto.buf[1] =3D htonl(x); =20 - sg_init_one(&sg, crypto.buf, 8); - skcipher_request_set_sync_tfm(req, call->conn->rxkad.cipher); - skcipher_request_set_callback(req, 0, NULL, NULL); - skcipher_request_set_crypt(req, &sg, &sg, 8, iv.x); - ret =3D crypto_skcipher_encrypt(req); - skcipher_request_zero(req); - if (ret < 0) - goto out; + /* continue encrypting from where we left off */ + fcrypt_pcbc_encrypt(call->conn->rxkad.cipher, + call->conn->rxkad.csum_iv.x, crypto.buf, crypto.buf, + 1); =20 y =3D ntohl(crypto.buf[1]); cksum =3D (y >> 16) & 0xffff; if (cksum =3D=3D 0) cksum =3D 1; /* zero checksums are not permitted */ @@ -615,22 +483,20 @@ static int rxkad_verify_packet(struct rxrpc_call *cal= l, struct sk_buff *skb) switch (call->conn->security_level) { case RXRPC_SECURITY_PLAIN: ret =3D 0; break; case RXRPC_SECURITY_AUTH: - ret =3D rxkad_verify_packet_1(call, skb, seq, req); + ret =3D rxkad_verify_packet_1(call, skb, seq); break; case RXRPC_SECURITY_ENCRYPT: - ret =3D rxkad_verify_packet_2(call, skb, seq, req); + ret =3D rxkad_verify_packet_2(call, skb, seq); break; default: ret =3D -ENOANO; break; } - out: - skcipher_request_free(req); return ret; } =20 /* * issue a challenge @@ -710,45 +576,10 @@ static void rxkad_calc_response_checksum(struct rxkad= _response *response) csum =3D csum * 0x10204081 + *p++; =20 response->encrypted.checksum =3D htonl(csum); } =20 -/* - * encrypt the response packet - */ -static int rxkad_encrypt_response(struct rxrpc_connection *conn, - struct sk_buff *response, - const struct rxkad_key *s2) -{ - struct skcipher_request *req; - struct rxrpc_crypt iv; - struct scatterlist sg[1]; - size_t encsize =3D sizeof(((struct rxkad_response *)0)->encrypted); - int ret; - - sg_init_table(sg, ARRAY_SIZE(sg)); - ret =3D skb_to_sgvec(response, sg, - sizeof(struct rxrpc_wire_header) + - offsetof(struct rxkad_response, encrypted), encsize); - if (ret < 0) - return ret; - - req =3D skcipher_request_alloc(&conn->rxkad.cipher->base, GFP_NOFS); - if (!req) - return -ENOMEM; - - /* continue encrypting from where we left off */ - memcpy(&iv, s2->session_key, sizeof(iv)); - - skcipher_request_set_sync_tfm(req, conn->rxkad.cipher); - skcipher_request_set_callback(req, 0, NULL, NULL); - skcipher_request_set_crypt(req, sg, sg, encsize, iv.x); - ret =3D crypto_skcipher_encrypt(req); - skcipher_request_free(req); - return ret; -} - /* * Validate a challenge packet. */ static bool rxkad_validate_challenge(struct rxrpc_connection *conn, struct sk_buff *skb) @@ -844,10 +675,16 @@ int rxkad_insert_response_header(struct rxrpc_connect= ion *conn, h.resp.kvno =3D htonl(token->kad->kvno); h.resp.ticket_len =3D htonl(token->kad->ticket_len); =20 rxkad_calc_response_checksum(&h.resp); =20 + /* encrypt the response packet */ + static_assert(sizeof(h.resp.encrypted) % FCRYPT_BSIZE =3D=3D 0); + fcrypt_pcbc_encrypt(conn->rxkad.cipher, token->kad->session_key, + &h.resp.encrypted, &h.resp.encrypted, + sizeof(h.resp.encrypted) / FCRYPT_BSIZE); + ret =3D skb_store_bits(response, *offset, &h, sizeof(h)); *offset +=3D sizeof(h); return ret; } =20 @@ -888,14 +725,10 @@ static int rxkad_respond_to_challenge(struct rxrpc_co= nnection *conn, ret =3D rxkad_insert_response_header(conn, token, challenge, response, &offset); if (ret < 0) goto error; =20 - ret =3D rxkad_encrypt_response(conn, response, token->kad); - if (ret < 0) - goto error; - ret =3D skb_store_bits(response, offset, token->kad->ticket, token->kad->ticket_len); if (ret < 0) goto error; =20 @@ -1070,43 +903,26 @@ static int rxkad_decrypt_ticket(struct rxrpc_connect= ion *conn, } =20 /* * decrypt the response packet */ -static int rxkad_decrypt_response(struct rxrpc_connection *conn, - struct rxkad_response *resp, - const struct rxrpc_crypt *session_key) +static void rxkad_decrypt_response(struct rxrpc_connection *conn, + struct rxkad_response *resp, + const struct rxrpc_crypt *session_key) { - struct skcipher_request *req =3D rxkad_ci_req; - struct scatterlist sg[1]; - struct rxrpc_crypt iv; - int ret; + struct fcrypt_key cipher; =20 _enter(",,%08x%08x", ntohl(session_key->n[0]), ntohl(session_key->n[1])); =20 - mutex_lock(&rxkad_ci_mutex); - ret =3D crypto_sync_skcipher_setkey(rxkad_ci, session_key->x, - sizeof(*session_key)); - if (ret < 0) - goto unlock; - - memcpy(&iv, session_key, sizeof(iv)); - - sg_init_table(sg, 1); - sg_set_buf(sg, &resp->encrypted, sizeof(resp->encrypted)); - skcipher_request_set_sync_tfm(req, rxkad_ci); - skcipher_request_set_callback(req, 0, NULL, NULL); - skcipher_request_set_crypt(req, sg, sg, sizeof(resp->encrypted), iv.x); - ret =3D crypto_skcipher_decrypt(req); - skcipher_request_zero(req); - -unlock: - mutex_unlock(&rxkad_ci_mutex); + fcrypt_preparekey(&cipher, session_key->x); =20 + static_assert(sizeof(resp->encrypted) % FCRYPT_BSIZE =3D=3D 0); + fcrypt_pcbc_decrypt(&cipher, session_key->x, &resp->encrypted, + &resp->encrypted, + sizeof(resp->encrypted) / FCRYPT_BSIZE); _leave(""); - return ret; } =20 /* * verify a response */ @@ -1189,13 +1005,11 @@ static int rxkad_verify_response(struct rxrpc_conne= ction *conn, if (ret < 0) goto error; =20 /* use the session key from inside the ticket to decrypt the * response */ - ret =3D rxkad_decrypt_response(conn, response, &session_key); - if (ret < 0) - goto error; + rxkad_decrypt_response(conn, response, &session_key); =20 if (ntohl(response->encrypted.epoch) !=3D conn->proto.epoch || ntohl(response->encrypted.cid) !=3D conn->proto.cid || ntohl(response->encrypted.securityIndex) !=3D conn->security_ix) { ret =3D rxrpc_abort_conn(conn, skb, RXKADSEALEDINCON, -EPROTO, @@ -1268,48 +1082,31 @@ static int rxkad_verify_response(struct rxrpc_conne= ction *conn, */ static void rxkad_clear(struct rxrpc_connection *conn) { _enter(""); =20 - if (conn->rxkad.cipher) - crypto_free_sync_skcipher(conn->rxkad.cipher); + kfree_sensitive(conn->rxkad.cipher); + conn->rxkad.cipher =3D NULL; } =20 /* * Initialise the rxkad security service. */ static int rxkad_init(void) { - struct crypto_sync_skcipher *tfm; - struct skcipher_request *req; - - /* pin the cipher we need so that the crypto layer doesn't invoke - * keventd to go get it */ - tfm =3D crypto_alloc_sync_skcipher("pcbc(fcrypt)", 0, 0); - if (IS_ERR(tfm)) - return PTR_ERR(tfm); - - req =3D skcipher_request_alloc(&tfm->base, GFP_KERNEL); - if (!req) - goto nomem_tfm; - - rxkad_ci_req =3D req; - rxkad_ci =3D tfm; + if (fips_enabled) { + pr_warn("rxkad support is disabled due to FIPS\n"); + return -ENOENT; + } return 0; - -nomem_tfm: - crypto_free_sync_skcipher(tfm); - return -ENOMEM; } =20 /* * Clean up the rxkad security service. */ static void rxkad_exit(void) { - crypto_free_sync_skcipher(rxkad_ci); - skcipher_request_free(rxkad_ci_req); } =20 /* * RxRPC Kerberos-based security */ --=20 2.54.0 From nobody Sun May 24 20:33:22 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 077BD363C62; Fri, 22 May 2026 05:07:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779426474; cv=none; b=B10oTr2YCnV6eykBKkEBoNh4oF9xf8pq5F4QI58K+c6mMWlLhLK+Iwg97KynJ2ebBnSrm6dokvhzWT9aIgz+TM1YLu2eYJj+vj2F3448on0ln9/qpwCuVAQChOX/iEWBSV29MxoLXVynaO4MH5b1kWewic+jxldDJFadi5pPjwQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779426474; c=relaxed/simple; bh=YVdkVt5Q1YzEU8xrOBXwbZfk33BrOMnk8Av8x9/Q5GA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FypmmScQeqlru4OUCqzUqM8QjmXaceFlX8bawC81EPjx2+0Mot3Zxk4pOrjCis6nibq6qaRosr1Lw9sT9iTx3zFRen+17azojNswpvnkim1dhMFYIX7A4NDDz03os8dkU5AQl/wTarfBxc88CIgPLHazNMggFON3eJG60VR7zh8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=H5KhvOaR; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="H5KhvOaR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2AE6B1F000E9; Fri, 22 May 2026 05:07:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779426470; bh=RE8zw7SGnqcTYHAWD5IFxg3YX4EJ1yXQvTpVYApC2cU=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=H5KhvOaRDC5m/tGa2iffIaMQbveX+3P3ENxtWDNSopJdluWzZJuNG3afn0b0guj5y 9+J1vA5beXnVhdn1Yyila9dXizk6yoXBuPDugeJa6Cl1rybA8CPfkvef5cLEQHhOre 2EucQ++daE456JzSVp2YTA78+c0PhKtu5zCtvCn6dky0NOnHPeakGsGtttwRf8/+K+ STMcGvURc27ZGIfniO2067Ga9ysuAEOfRDvpVlVAIhZLdbbnmgjfHhUdbwloCgcxqc DqGHDus8jtm3ub2YuF9LuzjgH+Zxx5AWwZu9/DcVMfdxbIKhd3A4TgIunUwrcMii4m yYoKuIFc5KC/w== From: Eric Biggers To: netdev@vger.kernel.org, linux-afs@lists.infradead.org Cc: David Howells , Marc Dionne , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Eric Biggers Subject: [PATCH net-next v2 3/5] net/rxrpc: Reimplement DES-PCBC using DES library Date: Fri, 22 May 2026 00:07:34 -0500 Message-ID: <20260522050740.84561-4-ebiggers@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260522050740.84561-1-ebiggers@kernel.org> References: <20260522050740.84561-1-ebiggers@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Since the use of "pcbc(des)" in rxkad_decrypt_ticket() is the only remaining user of the crypto API "pcbc" template, just implement DES-PCBC by locally implementing PCBC mode on top of the DES library. Note that only the decryption direction is needed. This will allow support for the obsolete PCBC mode to be removed from the crypto API. Acked-by: David Howells Signed-off-by: Eric Biggers Tested-by: Marc Dionne --- net/rxrpc/Kconfig | 5 +-- net/rxrpc/ar-internal.h | 5 +++ net/rxrpc/key.c | 1 - net/rxrpc/rxkad.c | 76 +++++++++++++++++++---------------- net/rxrpc/server_key.c | 1 - net/rxrpc/tests/rxrpc_kunit.c | 31 ++++++++++++++ 6 files changed, 79 insertions(+), 40 deletions(-) diff --git a/net/rxrpc/Kconfig b/net/rxrpc/Kconfig index de19c67dc965..2cebb666dc07 100644 --- a/net/rxrpc/Kconfig +++ b/net/rxrpc/Kconfig @@ -5,10 +5,11 @@ =20 config AF_RXRPC tristate "RxRPC session sockets" depends on INET select CRYPTO + select CRYPTO_LIB_DES if RXKAD select KEYS select NET_UDP_TUNNEL help Say Y or M here to include support for RxRPC session sockets (just the transport part, not the presentation part: (un)marshalling is @@ -54,14 +55,10 @@ config AF_RXRPC_DEBUG See Documentation/networking/rxrpc.rst. =20 =20 config RXKAD bool "RxRPC Kerberos security" - select CRYPTO - select CRYPTO_MANAGER - select CRYPTO_SKCIPHER - select CRYPTO_PCBC help Provide kerberos 4 and AFS kaserver security handling for AF_RXRPC through the use of the key retention service. =20 See Documentation/networking/rxrpc.rst. diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h index 29d32aa4ecc7..5802f6f78723 100644 --- a/net/rxrpc/ar-internal.h +++ b/net/rxrpc/ar-internal.h @@ -34,10 +34,15 @@ void fcrypt_pcbc_encrypt(const struct fcrypt_key *key, const u8 iv[FCRYPT_BSIZE], const void *src, void *dst, size_t nblocks); void fcrypt_pcbc_decrypt(const struct fcrypt_key *key, const u8 iv[FCRYPT_BSIZE], const void *src, void *dst, size_t nblocks); +#if IS_ENABLED(CONFIG_KUNIT) +struct des_ctx; +void des_pcbc_decrypt_inplace(const struct des_ctx *key, __le64 iv, u8 *da= ta, + size_t len); +#endif =20 #define rxrpc_queue_work(WS) queue_work(rxrpc_workqueue, (WS)) #define rxrpc_queue_delayed_work(WS,D) \ queue_delayed_work(rxrpc_workqueue, (WS), (D)) =20 diff --git a/net/rxrpc/key.c b/net/rxrpc/key.c index 3ec3d89fdf14..a0aa78d89289 100644 --- a/net/rxrpc/key.c +++ b/net/rxrpc/key.c @@ -8,11 +8,10 @@ * "afs@example.com" */ =20 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt =20 -#include #include #include #include #include #include diff --git a/net/rxrpc/rxkad.c b/net/rxrpc/rxkad.c index d8bc5ecbfc3d..ca9f0e82cb9a 100644 --- a/net/rxrpc/rxkad.c +++ b/net/rxrpc/rxkad.c @@ -5,20 +5,22 @@ * Written by David Howells (dhowells@redhat.com) */ =20 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt =20 -#include +#include +#include +#include #include #include #include #include #include -#include #include #include #include +#include #include #include #include #include "ar-internal.h" =20 @@ -50,44 +52,45 @@ static void rxkad_prime_packet_security(struct rxrpc_co= nnection *conn, * * The data should be the 8-byte secret key. */ static int rxkad_preparse_server_key(struct key_preparsed_payload *prep) { - struct crypto_skcipher *ci; + struct des_ctx *des_key; + int err; =20 if (prep->datalen !=3D 8) return -EINVAL; =20 memcpy(&prep->payload.data[2], prep->data, 8); =20 - ci =3D crypto_alloc_skcipher("pcbc(des)", 0, CRYPTO_ALG_ASYNC); - if (IS_ERR(ci)) { - _leave(" =3D %ld", PTR_ERR(ci)); - return PTR_ERR(ci); + des_key =3D kmalloc_obj(*des_key); + if (!des_key) { + _leave(" =3D -ENOMEM"); + return -ENOMEM; } =20 - if (crypto_skcipher_setkey(ci, prep->data, 8) < 0) - BUG(); + err =3D des_expand_key(des_key, prep->data, 8); + if (err) { + kfree_sensitive(des_key); + _leave(" =3D %d", err); + return err; + } =20 - prep->payload.data[0] =3D ci; + prep->payload.data[0] =3D des_key; _leave(" =3D 0"); return 0; } =20 static void rxkad_free_preparse_server_key(struct key_preparsed_payload *p= rep) { - - if (prep->payload.data[0]) - crypto_free_skcipher(prep->payload.data[0]); + kfree_sensitive(prep->payload.data[0]); } =20 static void rxkad_destroy_server_key(struct key *key) { - if (key->payload.data[0]) { - crypto_free_skcipher(key->payload.data[0]); - key->payload.data[0] =3D NULL; - } + kfree_sensitive(key->payload.data[0]); + key->payload.data[0] =3D NULL; } =20 /* * initialise connection security */ @@ -769,51 +772,56 @@ int rxkad_kernel_respond_to_challenge(struct sk_buff = *challenge) =20 return rxkad_respond_to_challenge(csp->chall.conn, challenge); } EXPORT_SYMBOL(rxkad_kernel_respond_to_challenge); =20 +/* Decrypt data in-place using DES-PCBC. @len must be a multiple of 8. */ +VISIBLE_IF_KUNIT void des_pcbc_decrypt_inplace(const struct des_ctx *key, + __le64 iv, u8 *data, size_t len) +{ + for (size_t i =3D 0; i < len; i +=3D DES_BLOCK_SIZE) { + __le64 ctext, ptext; + + ctext =3D get_unaligned((const __le64 *)&data[i]); + des_decrypt(key, (u8 *)&ptext, (const u8 *)&ctext); + ptext ^=3D iv; + put_unaligned(ptext, (__le64 *)&data[i]); + iv =3D ptext ^ ctext; + } +} +EXPORT_SYMBOL_IF_KUNIT(des_pcbc_decrypt_inplace); + /* * decrypt the kerberos IV ticket in the response */ static int rxkad_decrypt_ticket(struct rxrpc_connection *conn, struct key *server_key, struct sk_buff *skb, void *ticket, size_t ticket_len, struct rxrpc_crypt *_session_key, time64_t *_expiry) { - struct skcipher_request *req; - struct rxrpc_crypt iv, key; - struct scatterlist sg[1]; + struct rxrpc_crypt key; struct in_addr addr; unsigned int life; time64_t issue, now; - int ret; bool little_endian; u8 *p, *q, *name, *end; =20 _enter("{%d},{%x}", conn->debug_id, key_serial(server_key)); =20 *_expiry =3D 0; =20 ASSERT(server_key->payload.data[0] !=3D NULL); =20 - memcpy(&iv, &server_key->payload.data[2], sizeof(iv)); - - req =3D skcipher_request_alloc(server_key->payload.data[0], GFP_NOFS); - if (!req) - return -ENOMEM; - - sg_init_one(&sg[0], ticket, ticket_len); - skcipher_request_set_callback(req, 0, NULL, NULL); - skcipher_request_set_crypt(req, sg, sg, ticket_len, iv.x); - ret =3D crypto_skcipher_decrypt(req); - skcipher_request_free(req); - if (ret < 0) + if (ticket_len % DES_BLOCK_SIZE !=3D 0) return rxrpc_abort_conn(conn, skb, RXKADBADTICKET, -EPROTO, rxkad_abort_resp_tkt_short); - + des_pcbc_decrypt_inplace( + server_key->payload.data[0], + get_unaligned((const __le64 *)&server_key->payload.data[2]), + ticket, ticket_len); p =3D ticket; end =3D p + ticket_len; =20 #define Z(field, fieldl) \ ({ \ diff --git a/net/rxrpc/server_key.c b/net/rxrpc/server_key.c index 27491f1e1273..3efe104b1930 100644 --- a/net/rxrpc/server_key.c +++ b/net/rxrpc/server_key.c @@ -8,11 +8,10 @@ * "afs@CAMBRIDGE.REDHAT.COM> */ =20 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt =20 -#include #include #include #include #include #include diff --git a/net/rxrpc/tests/rxrpc_kunit.c b/net/rxrpc/tests/rxrpc_kunit.c index 85a9859fae44..95fd05a07d17 100644 --- a/net/rxrpc/tests/rxrpc_kunit.c +++ b/net/rxrpc/tests/rxrpc_kunit.c @@ -3,10 +3,11 @@ * Unit tests for RxRPC crypto functions * * Copyright 2026 Google LLC */ #include "../ar-internal.h" +#include #include =20 struct fcrypt_pcbc_testvec { u8 key[FCRYPT_BSIZE]; u8 iv[FCRYPT_BSIZE]; @@ -91,12 +92,42 @@ static void test_fcrypt_pcbc(struct kunit *test) fcrypt_pcbc_decrypt(&key, tv->iv, data, data, nblocks); KUNIT_ASSERT_MEMEQ(test, tv->ptext, data, len); } } =20 +static void test_des_pcbc(struct kunit *test) +{ + /* This was generated from the original pcbc(des) crypto API code. */ + static const u8 expected_ptext[24] =3D + "\xc8\xe2\x3c\xdf\x80\x61\x8a\xad\xa5\x52\xb4\x20" + "\x74\x32\x1f\xe4\x2c\x15\x7d\x21\x57\xda\x3f\x31"; + u8 key[8]; + union { + __le64 w; + u8 b[8]; + } iv; + u8 data[24]; + struct des_ctx ctx; + int err; + + for (int i =3D 0; i < 8; i++) { + key[i] =3D i; + iv.b[i] =3D 255 - i; + } + for (int i =3D 0; i < sizeof(data); i++) + data[i] =3D i; + + err =3D des_expand_key(&ctx, key, sizeof(key)); + KUNIT_ASSERT_EQ(test, 0, err); + + des_pcbc_decrypt_inplace(&ctx, iv.w, data, sizeof(data)); + KUNIT_ASSERT_MEMEQ(test, expected_ptext, data, sizeof(data)); +} + static struct kunit_case rxrpc_test_cases[] =3D { KUNIT_CASE(test_fcrypt_pcbc), + KUNIT_CASE(test_des_pcbc), {}, }; =20 static struct kunit_suite rxrpc_test_suite =3D { .name =3D "rxrpc", --=20 2.54.0 From nobody Sun May 24 20:33:22 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6693F3659FD; Fri, 22 May 2026 05:07:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779426478; cv=none; b=XpYsZ3Ubz6dCqc73npBDOM7mdIZ45Shb5+t3PfKpF+G5QfAHXYqAU0XyHkDSOcgUdRWsLtyMIAF4jBGLc6752/vSvuqS3picyums0TRT/9UyQna1s1NdiwSfywYieAuE+EIUjJ7d+AfuUoPbJvOzOwyj7jsnus7xDev6dzzpsA4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779426478; c=relaxed/simple; bh=xdNWEP87RVY0v4dLgFVnO5yBf4ZzgiQyxAurv9ZnEtw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=B8m/6cXwygTRRIh/mYB1zhWHrl0wdUncNGcR9cQauehgdHquUiIbMsp85vVPmfr9giALDKf+vLdLI6bwYHVxAByZSHZV7KR/BXiZcoTYXfuA4S+dQoUSbeyiT2RPMuhlRkHrtDslYpuZGScPc9GjD+AxpEtASvSi819MrYzd9IY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lbM8IyAa; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lbM8IyAa" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B89E1F00ADE; Fri, 22 May 2026 05:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779426471; bh=gca1Dk0Ie3RB9ym0eUfJJdbpFsK5d3+qWoTleIq4XEs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=lbM8IyAaLYgeJN7hGQO0DLO8kJPi+TEiIjSmakLBfXOav7JDvi+9Yl0krvmUHG/jB d173NyU80zclPYh3tqyCRaULZzuMM24bNPibhnP4C85Q/qui99dvJrKlHCDyTMw0dI Mfz8Dz9Jjigp00Z7OxoftKYhQPsZl5S+bsUWOvkiIOWyGYcIAyKK9kDteDRmfOCAuO fs/qJnkhK6SZ8fWQEx2yANehq9/CZ3e88Y1ACnfWT3HNdoRQ4rCtWZm6gIWOrzhYMD 2+zs2t8Zs+FkhG8TM+KbNT63am0icNHTetiTlSlKqfGv5iyDWHypeZ1Rrq6ksy+GpL i8B3TOQ/xxumQ== From: Eric Biggers To: netdev@vger.kernel.org, linux-afs@lists.infradead.org Cc: David Howells , Marc Dionne , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Eric Biggers , Geert Uytterhoeven Subject: [PATCH net-next v2 4/5] crypto: fcrypt - Remove support for FCrypt block cipher Date: Fri, 22 May 2026 00:07:35 -0500 Message-ID: <20260522050740.84561-5-ebiggers@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260522050740.84561-1-ebiggers@kernel.org> References: <20260522050740.84561-1-ebiggers@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Remove the insecure FCrypt block cipher from the crypto API. Its only user was net/rxrpc/, but now net/rxrpc/ implements it locally. The crypto API implementation is no longer needed. For some additional context: FCrypt was designed in 1988 and is essentially a weakened version of DES. It has the same 56-bit key size as DES, which is easily brute forced. Moreover, it's cryptographically weak and doesn't even provide the intended 56-bit security level. Its author considers it to be a mistake, as well (https://lists.openafs.org/pipermail/openafs-devel/2000-December/005320.htm= l). But fortunately this 1980s-era homebrew block cipher was never adopted outside of net/rxrpc/. So its code can just be kept there. Acked-by: Geert Uytterhoeven # m68k Acked-by: David Howells Signed-off-by: Eric Biggers Tested-by: Marc Dionne --- arch/arm/configs/pxa_defconfig | 1 - arch/m68k/configs/amiga_defconfig | 1 - arch/m68k/configs/apollo_defconfig | 1 - arch/m68k/configs/atari_defconfig | 1 - arch/m68k/configs/bvme6000_defconfig | 1 - arch/m68k/configs/hp300_defconfig | 1 - arch/m68k/configs/mac_defconfig | 1 - arch/m68k/configs/multi_defconfig | 1 - arch/m68k/configs/mvme147_defconfig | 1 - arch/m68k/configs/mvme16x_defconfig | 1 - arch/m68k/configs/q40_defconfig | 1 - arch/m68k/configs/sun3_defconfig | 1 - arch/m68k/configs/sun3x_defconfig | 1 - arch/mips/configs/bigsur_defconfig | 1 - arch/mips/configs/decstation_64_defconfig | 1 - arch/mips/configs/decstation_defconfig | 1 - arch/mips/configs/decstation_r4k_defconfig | 1 - arch/mips/configs/ip22_defconfig | 1 - arch/mips/configs/ip27_defconfig | 1 - arch/mips/configs/ip30_defconfig | 1 - arch/mips/configs/ip32_defconfig | 1 - arch/mips/configs/lemote2f_defconfig | 1 - arch/mips/configs/malta_defconfig | 1 - arch/mips/configs/malta_kvm_defconfig | 1 - arch/mips/configs/maltaup_xpa_defconfig | 1 - arch/mips/configs/rm200_defconfig | 1 - arch/mips/configs/sb1250_swarm_defconfig | 1 - arch/parisc/configs/generic-64bit_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - arch/s390/configs/debug_defconfig | 1 - arch/s390/configs/defconfig | 1 - arch/sh/configs/sh2007_defconfig | 1 - arch/sparc/configs/sparc64_defconfig | 1 - crypto/Kconfig | 9 - crypto/Makefile | 1 - crypto/fcrypt.c | 420 -------------------- crypto/tcrypt.c | 4 - crypto/testmgr.c | 15 - crypto/testmgr.h | 45 --- 39 files changed, 527 deletions(-) delete mode 100644 crypto/fcrypt.c diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig index c51ae373ca88..53f1e5820c49 100644 --- a/arch/arm/configs/pxa_defconfig +++ b/arch/arm/configs/pxa_defconfig @@ -638,11 +638,10 @@ CONFIG_CRYPTO_CRYPTD=3Dm CONFIG_CRYPTO_AUTHENC=3Dm CONFIG_CRYPTO_BENCHMARK=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_de= fconfig index 47e48c18e55c..ca45670a6af4 100644 --- a/arch/m68k/configs/amiga_defconfig +++ b/arch/m68k/configs/amiga_defconfig @@ -522,11 +522,10 @@ CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_= defconfig index 161586d611ab..2732a5b8b694 100644 --- a/arch/m68k/configs/apollo_defconfig +++ b/arch/m68k/configs/apollo_defconfig @@ -477,11 +477,10 @@ CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_de= fconfig index c13c6deeac22..242882b05fa4 100644 --- a/arch/m68k/configs/atari_defconfig +++ b/arch/m68k/configs/atari_defconfig @@ -499,11 +499,10 @@ CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6= 000_defconfig index d4f3f94b61ff..07e73c78a9e2 100644 --- a/arch/m68k/configs/bvme6000_defconfig +++ b/arch/m68k/configs/bvme6000_defconfig @@ -469,11 +469,10 @@ CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_de= fconfig index 58288f83349d..7188948da864 100644 --- a/arch/m68k/configs/hp300_defconfig +++ b/arch/m68k/configs/hp300_defconfig @@ -479,11 +479,10 @@ CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defcon= fig index abb369fd1f55..fa5b04d59aa6 100644 --- a/arch/m68k/configs/mac_defconfig +++ b/arch/m68k/configs/mac_defconfig @@ -498,11 +498,10 @@ CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/m68k/configs/multi_defconfig b/arch/m68k/configs/multi_de= fconfig index cb8de979700f..3bc9911549c0 100644 --- a/arch/m68k/configs/multi_defconfig +++ b/arch/m68k/configs/multi_defconfig @@ -585,11 +585,10 @@ CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme14= 7_defconfig index 176540bd5074..9f5c8e0a07f3 100644 --- a/arch/m68k/configs/mvme147_defconfig +++ b/arch/m68k/configs/mvme147_defconfig @@ -469,11 +469,10 @@ CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16= x_defconfig index 8b2e5cf4d2f2..e5a6299aeae0 100644 --- a/arch/m68k/configs/mvme16x_defconfig +++ b/arch/m68k/configs/mvme16x_defconfig @@ -470,11 +470,10 @@ CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defcon= fig index d48f3cf5285b..e79bbb397261 100644 --- a/arch/m68k/configs/q40_defconfig +++ b/arch/m68k/configs/q40_defconfig @@ -488,11 +488,10 @@ CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defc= onfig index 0b96428f25d4..7aa76de5c472 100644 --- a/arch/m68k/configs/sun3_defconfig +++ b/arch/m68k/configs/sun3_defconfig @@ -467,11 +467,10 @@ CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_de= fconfig index 6140e18244a1..2ecd8bd097ea 100644 --- a/arch/m68k/configs/sun3x_defconfig +++ b/arch/m68k/configs/sun3x_defconfig @@ -467,11 +467,10 @@ CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_= defconfig index aa63ada62e28..74c6821e4c37 100644 --- a/arch/mips/configs/bigsur_defconfig +++ b/arch/mips/configs/bigsur_defconfig @@ -217,11 +217,10 @@ CONFIG_CRYPTO_SHA512=3Dm CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm diff --git a/arch/mips/configs/decstation_64_defconfig b/arch/mips/configs/= decstation_64_defconfig index 7c43352fac6b..e98d218ed4c1 100644 --- a/arch/mips/configs/decstation_64_defconfig +++ b/arch/mips/configs/decstation_64_defconfig @@ -187,11 +187,10 @@ CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/dec= station_defconfig index aee10274f048..2b4e06cc238b 100644 --- a/arch/mips/configs/decstation_defconfig +++ b/arch/mips/configs/decstation_defconfig @@ -182,11 +182,10 @@ CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm diff --git a/arch/mips/configs/decstation_r4k_defconfig b/arch/mips/configs= /decstation_r4k_defconfig index a1698049aa7a..280553269156 100644 --- a/arch/mips/configs/decstation_r4k_defconfig +++ b/arch/mips/configs/decstation_r4k_defconfig @@ -182,11 +182,10 @@ CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defc= onfig index e123848f94ab..50895ed06592 100644 --- a/arch/mips/configs/ip22_defconfig +++ b/arch/mips/configs/ip22_defconfig @@ -315,11 +315,10 @@ CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defc= onfig index fea0ccee6948..ff7e06b92f58 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig @@ -307,11 +307,10 @@ CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm diff --git a/arch/mips/configs/ip30_defconfig b/arch/mips/configs/ip30_defc= onfig index 718f3060d9fa..d9f748f8cfaa 100644 --- a/arch/mips/configs/ip30_defconfig +++ b/arch/mips/configs/ip30_defconfig @@ -164,11 +164,10 @@ CONFIG_SECURITYFS=3Dy CONFIG_CRYPTO_CRYPTD=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_LRW=3Dm CONFIG_CRYPTO_PCBC=3Dm diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defc= onfig index 9020c309dcda..4b15f895be63 100644 --- a/arch/mips/configs/ip32_defconfig +++ b/arch/mips/configs/ip32_defconfig @@ -167,11 +167,10 @@ CONFIG_CRYPTO_ARC4=3Dy CONFIG_CRYPTO_BLOWFISH=3Dy CONFIG_CRYPTO_CAMELLIA=3Dy CONFIG_CRYPTO_CAST5=3Dy CONFIG_CRYPTO_CAST6=3Dy CONFIG_CRYPTO_DES=3Dy -CONFIG_CRYPTO_FCRYPT=3Dy CONFIG_CRYPTO_KHAZAD=3Dy CONFIG_CRYPTO_SERPENT=3Dy CONFIG_CRYPTO_TEA=3Dy CONFIG_CRYPTO_TWOFISH=3Dy CONFIG_CRYPTO_DEFLATE=3Dy diff --git a/arch/mips/configs/lemote2f_defconfig b/arch/mips/configs/lemot= e2f_defconfig index b9f3e1641105..bbcdfc8134cb 100644 --- a/arch/mips/configs/lemote2f_defconfig +++ b/arch/mips/configs/lemote2f_defconfig @@ -299,11 +299,10 @@ CONFIG_CRYPTO_CRYPTD=3Dm CONFIG_CRYPTO_BENCHMARK=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_LRW=3Dm CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_de= fconfig index 81704ec67f09..85e781607299 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig @@ -397,10 +397,9 @@ CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm diff --git a/arch/mips/configs/malta_kvm_defconfig b/arch/mips/configs/malt= a_kvm_defconfig index 82a97f58bce1..2db5f50fed3b 100644 --- a/arch/mips/configs/malta_kvm_defconfig +++ b/arch/mips/configs/malta_kvm_defconfig @@ -404,11 +404,10 @@ CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_RCU_CPU_STALL_TIMEOUT=3D60 diff --git a/arch/mips/configs/maltaup_xpa_defconfig b/arch/mips/configs/ma= ltaup_xpa_defconfig index 0f9ef20744f9..865ae23bf11d 100644 --- a/arch/mips/configs/maltaup_xpa_defconfig +++ b/arch/mips/configs/maltaup_xpa_defconfig @@ -403,10 +403,9 @@ CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_de= fconfig index ad9fbd0cbb38..7e04a6b1b4eb 100644 --- a/arch/mips/configs/rm200_defconfig +++ b/arch/mips/configs/rm200_defconfig @@ -378,10 +378,9 @@ CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm diff --git a/arch/mips/configs/sb1250_swarm_defconfig b/arch/mips/configs/s= b1250_swarm_defconfig index 4a25b8d3e507..fe8a5a3ff328 100644 --- a/arch/mips/configs/sb1250_swarm_defconfig +++ b/arch/mips/configs/sb1250_swarm_defconfig @@ -90,11 +90,10 @@ CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_DEFLATE=3Dm CONFIG_CRYPTO_LZO=3Dm # CONFIG_CRYPTO_HW is not set diff --git a/arch/parisc/configs/generic-64bit_defconfig b/arch/parisc/conf= igs/generic-64bit_defconfig index 0c4d54df9cf0..0503b4ef4c7a 100644 --- a/arch/parisc/configs/generic-64bit_defconfig +++ b/arch/parisc/configs/generic-64bit_defconfig @@ -279,11 +279,10 @@ CONFIG_NLS_CODEPAGE_1250=3Dm CONFIG_NLS_CODEPAGE_1251=3Dm CONFIG_NLS_ASCII=3Dm CONFIG_NLS_ISO8859_1=3Dm CONFIG_NLS_ISO8859_2=3Dm CONFIG_NLS_UTF8=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_ECB=3Dm CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DEFLATE=3Dm diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/p= pc6xx_defconfig index eda1fec7ffd9..db3a8da4ccd3 100644 --- a/arch/powerpc/configs/ppc6xx_defconfig +++ b/arch/powerpc/configs/ppc6xx_defconfig @@ -1062,11 +1062,10 @@ CONFIG_CRYPTO_SHA512=3Dm CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm diff --git a/arch/s390/configs/debug_defconfig b/arch/s390/configs/debug_de= fconfig index c28f9a7d0bd8..b69f626b7cce 100644 --- a/arch/s390/configs/debug_defconfig +++ b/arch/s390/configs/debug_defconfig @@ -774,11 +774,10 @@ CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/s390/configs/defconfig b/arch/s390/configs/defconfig index d89c988f33ea..9ea820882fdf 100644 --- a/arch/s390/configs/defconfig +++ b/arch/s390/configs/defconfig @@ -758,11 +758,10 @@ CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_ARIA=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_DES=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_SM4_GENERIC=3Dm CONFIG_CRYPTO_TEA=3Dm diff --git a/arch/sh/configs/sh2007_defconfig b/arch/sh/configs/sh2007_defc= onfig index 5d9080499485..4a67f9c85806 100644 --- a/arch/sh/configs/sh2007_defconfig +++ b/arch/sh/configs/sh2007_defconfig @@ -180,11 +180,10 @@ CONFIG_CRYPTO_ANUBIS=3Dy CONFIG_CRYPTO_ARC4=3Dy CONFIG_CRYPTO_BLOWFISH=3Dy CONFIG_CRYPTO_CAMELLIA=3Dy CONFIG_CRYPTO_CAST5=3Dy CONFIG_CRYPTO_CAST6=3Dy -CONFIG_CRYPTO_FCRYPT=3Dy CONFIG_CRYPTO_KHAZAD=3Dy CONFIG_CRYPTO_SEED=3Dy CONFIG_CRYPTO_SERPENT=3Dy CONFIG_CRYPTO_TEA=3Dy CONFIG_CRYPTO_TWOFISH=3Dy diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/spar= c64_defconfig index 632081a262ba..c6009ebc806d 100644 --- a/arch/sparc/configs/sparc64_defconfig +++ b/arch/sparc/configs/sparc64_defconfig @@ -218,11 +218,10 @@ CONFIG_CRYPTO_AES=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm -CONFIG_CRYPTO_FCRYPT=3Dm CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm diff --git a/crypto/Kconfig b/crypto/Kconfig index 103d1f58cb7c..0727cd5877da 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -462,19 +462,10 @@ config CRYPTO_DES help DES (Data Encryption Standard)(FIPS 46-2, ISO/IEC 18033-3) and Triple DES EDE (Encrypt/Decrypt/Encrypt) (FIPS 46-3, ISO/IEC 18033-3) cipher algorithms =20 -config CRYPTO_FCRYPT - tristate "FCrypt" - select CRYPTO_ALGAPI - select CRYPTO_SKCIPHER - help - FCrypt algorithm used by RxRPC - - See https://ota.polyonymo.us/fcrypt-paper.txt - config CRYPTO_KHAZAD tristate "Khazad" depends on CRYPTO_USER_API_ENABLE_OBSOLETE select CRYPTO_ALGAPI help diff --git a/crypto/Makefile b/crypto/Makefile index 162242593c7c..1827f84192e6 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -124,11 +124,10 @@ endif CFLAGS_aegis128-neon-inner.o +=3D -isystem $(shell $(CC) -print-file-name= =3Dinclude) =20 obj-$(CONFIG_CRYPTO_PCRYPT) +=3D pcrypt.o obj-$(CONFIG_CRYPTO_CRYPTD) +=3D cryptd.o obj-$(CONFIG_CRYPTO_DES) +=3D des_generic.o -obj-$(CONFIG_CRYPTO_FCRYPT) +=3D fcrypt.o obj-$(CONFIG_CRYPTO_BLOWFISH) +=3D blowfish_generic.o obj-$(CONFIG_CRYPTO_BLOWFISH_COMMON) +=3D blowfish_common.o obj-$(CONFIG_CRYPTO_TWOFISH) +=3D twofish_generic.o obj-$(CONFIG_CRYPTO_TWOFISH_COMMON) +=3D twofish_common.o obj-$(CONFIG_CRYPTO_SERPENT) +=3D serpent_generic.o diff --git a/crypto/fcrypt.c b/crypto/fcrypt.c deleted file mode 100644 index 80036835cec5..000000000000 --- a/crypto/fcrypt.c +++ /dev/null @@ -1,420 +0,0 @@ -/* FCrypt encryption algorithm - * - * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@redhat.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * Based on code: - * - * Copyright (c) 1995 - 2000 Kungliga Tekniska H=C3=B6gskolan - * (Royal Institute of Technology, Stockholm, Sweden). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * 3. Neither the name of the Institute nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' A= ND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURP= OSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIA= BLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENT= IAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STR= ICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY W= AY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#include -#include -#include -#include -#include - -#define ROUNDS 16 - -struct fcrypt_ctx { - __be32 sched[ROUNDS]; -}; - -/* Rotate right two 32 bit numbers as a 56 bit number */ -#define ror56(hi, lo, n) \ -do { \ - u32 t =3D lo & ((1 << n) - 1); \ - lo =3D (lo >> n) | ((hi & ((1 << n) - 1)) << (32 - n)); \ - hi =3D (hi >> n) | (t << (24-n)); \ -} while (0) - -/* Rotate right one 64 bit number as a 56 bit number */ -#define ror56_64(k, n) (k =3D (k >> n) | ((k & ((1 << n) - 1)) << (56 - n)= )) - -/* - * Sboxes for Feistel network derived from - * /afs/transarc.com/public/afsps/afs.rel31b.export-src/rxkad/sboxes.h - */ -#undef Z -#define Z(x) cpu_to_be32(x << 3) -static const __be32 sbox0[256] =3D { - Z(0xea), Z(0x7f), Z(0xb2), Z(0x64), Z(0x9d), Z(0xb0), Z(0xd9), Z(0x11), - Z(0xcd), Z(0x86), Z(0x86), Z(0x91), Z(0x0a), Z(0xb2), Z(0x93), Z(0x06), - Z(0x0e), Z(0x06), Z(0xd2), Z(0x65), Z(0x73), Z(0xc5), Z(0x28), Z(0x60), - Z(0xf2), Z(0x20), Z(0xb5), Z(0x38), Z(0x7e), Z(0xda), Z(0x9f), Z(0xe3), - Z(0xd2), Z(0xcf), Z(0xc4), Z(0x3c), Z(0x61), Z(0xff), Z(0x4a), Z(0x4a), - Z(0x35), Z(0xac), Z(0xaa), Z(0x5f), Z(0x2b), Z(0xbb), Z(0xbc), Z(0x53), - Z(0x4e), Z(0x9d), Z(0x78), Z(0xa3), Z(0xdc), Z(0x09), Z(0x32), Z(0x10), - Z(0xc6), Z(0x6f), Z(0x66), Z(0xd6), Z(0xab), Z(0xa9), Z(0xaf), Z(0xfd), - Z(0x3b), Z(0x95), Z(0xe8), Z(0x34), Z(0x9a), Z(0x81), Z(0x72), Z(0x80), - Z(0x9c), Z(0xf3), Z(0xec), Z(0xda), Z(0x9f), Z(0x26), Z(0x76), Z(0x15), - Z(0x3e), Z(0x55), Z(0x4d), Z(0xde), Z(0x84), Z(0xee), Z(0xad), Z(0xc7), - Z(0xf1), Z(0x6b), Z(0x3d), Z(0xd3), Z(0x04), Z(0x49), Z(0xaa), Z(0x24), - Z(0x0b), Z(0x8a), Z(0x83), Z(0xba), Z(0xfa), Z(0x85), Z(0xa0), Z(0xa8), - Z(0xb1), Z(0xd4), Z(0x01), Z(0xd8), Z(0x70), Z(0x64), Z(0xf0), Z(0x51), - Z(0xd2), Z(0xc3), Z(0xa7), Z(0x75), Z(0x8c), Z(0xa5), Z(0x64), Z(0xef), - Z(0x10), Z(0x4e), Z(0xb7), Z(0xc6), Z(0x61), Z(0x03), Z(0xeb), Z(0x44), - Z(0x3d), Z(0xe5), Z(0xb3), Z(0x5b), Z(0xae), Z(0xd5), Z(0xad), Z(0x1d), - Z(0xfa), Z(0x5a), Z(0x1e), Z(0x33), Z(0xab), Z(0x93), Z(0xa2), Z(0xb7), - Z(0xe7), Z(0xa8), Z(0x45), Z(0xa4), Z(0xcd), Z(0x29), Z(0x63), Z(0x44), - Z(0xb6), Z(0x69), Z(0x7e), Z(0x2e), Z(0x62), Z(0x03), Z(0xc8), Z(0xe0), - Z(0x17), Z(0xbb), Z(0xc7), Z(0xf3), Z(0x3f), Z(0x36), Z(0xba), Z(0x71), - Z(0x8e), Z(0x97), Z(0x65), Z(0x60), Z(0x69), Z(0xb6), Z(0xf6), Z(0xe6), - Z(0x6e), Z(0xe0), Z(0x81), Z(0x59), Z(0xe8), Z(0xaf), Z(0xdd), Z(0x95), - Z(0x22), Z(0x99), Z(0xfd), Z(0x63), Z(0x19), Z(0x74), Z(0x61), Z(0xb1), - Z(0xb6), Z(0x5b), Z(0xae), Z(0x54), Z(0xb3), Z(0x70), Z(0xff), Z(0xc6), - Z(0x3b), Z(0x3e), Z(0xc1), Z(0xd7), Z(0xe1), Z(0x0e), Z(0x76), Z(0xe5), - Z(0x36), Z(0x4f), Z(0x59), Z(0xc7), Z(0x08), Z(0x6e), Z(0x82), Z(0xa6), - Z(0x93), Z(0xc4), Z(0xaa), Z(0x26), Z(0x49), Z(0xe0), Z(0x21), Z(0x64), - Z(0x07), Z(0x9f), Z(0x64), Z(0x81), Z(0x9c), Z(0xbf), Z(0xf9), Z(0xd1), - Z(0x43), Z(0xf8), Z(0xb6), Z(0xb9), Z(0xf1), Z(0x24), Z(0x75), Z(0x03), - Z(0xe4), Z(0xb0), Z(0x99), Z(0x46), Z(0x3d), Z(0xf5), Z(0xd1), Z(0x39), - Z(0x72), Z(0x12), Z(0xf6), Z(0xba), Z(0x0c), Z(0x0d), Z(0x42), Z(0x2e) -}; - -#undef Z -#define Z(x) cpu_to_be32(((x & 0x1f) << 27) | (x >> 5)) -static const __be32 sbox1[256] =3D { - Z(0x77), Z(0x14), Z(0xa6), Z(0xfe), Z(0xb2), Z(0x5e), Z(0x8c), Z(0x3e), - Z(0x67), Z(0x6c), Z(0xa1), Z(0x0d), Z(0xc2), Z(0xa2), Z(0xc1), Z(0x85), - Z(0x6c), Z(0x7b), Z(0x67), Z(0xc6), Z(0x23), Z(0xe3), Z(0xf2), Z(0x89), - Z(0x50), Z(0x9c), Z(0x03), Z(0xb7), Z(0x73), Z(0xe6), Z(0xe1), Z(0x39), - Z(0x31), Z(0x2c), Z(0x27), Z(0x9f), Z(0xa5), Z(0x69), Z(0x44), Z(0xd6), - Z(0x23), Z(0x83), Z(0x98), Z(0x7d), Z(0x3c), Z(0xb4), Z(0x2d), Z(0x99), - Z(0x1c), Z(0x1f), Z(0x8c), Z(0x20), Z(0x03), Z(0x7c), Z(0x5f), Z(0xad), - Z(0xf4), Z(0xfa), Z(0x95), Z(0xca), Z(0x76), Z(0x44), Z(0xcd), Z(0xb6), - Z(0xb8), Z(0xa1), Z(0xa1), Z(0xbe), Z(0x9e), Z(0x54), Z(0x8f), Z(0x0b), - Z(0x16), Z(0x74), Z(0x31), Z(0x8a), Z(0x23), Z(0x17), Z(0x04), Z(0xfa), - Z(0x79), Z(0x84), Z(0xb1), Z(0xf5), Z(0x13), Z(0xab), Z(0xb5), Z(0x2e), - Z(0xaa), Z(0x0c), Z(0x60), Z(0x6b), Z(0x5b), Z(0xc4), Z(0x4b), Z(0xbc), - Z(0xe2), Z(0xaf), Z(0x45), Z(0x73), Z(0xfa), Z(0xc9), Z(0x49), Z(0xcd), - Z(0x00), Z(0x92), Z(0x7d), Z(0x97), Z(0x7a), Z(0x18), Z(0x60), Z(0x3d), - Z(0xcf), Z(0x5b), Z(0xde), Z(0xc6), Z(0xe2), Z(0xe6), Z(0xbb), Z(0x8b), - Z(0x06), Z(0xda), Z(0x08), Z(0x15), Z(0x1b), Z(0x88), Z(0x6a), Z(0x17), - Z(0x89), Z(0xd0), Z(0xa9), Z(0xc1), Z(0xc9), Z(0x70), Z(0x6b), Z(0xe5), - Z(0x43), Z(0xf4), Z(0x68), Z(0xc8), Z(0xd3), Z(0x84), Z(0x28), Z(0x0a), - Z(0x52), Z(0x66), Z(0xa3), Z(0xca), Z(0xf2), Z(0xe3), Z(0x7f), Z(0x7a), - Z(0x31), Z(0xf7), Z(0x88), Z(0x94), Z(0x5e), Z(0x9c), Z(0x63), Z(0xd5), - Z(0x24), Z(0x66), Z(0xfc), Z(0xb3), Z(0x57), Z(0x25), Z(0xbe), Z(0x89), - Z(0x44), Z(0xc4), Z(0xe0), Z(0x8f), Z(0x23), Z(0x3c), Z(0x12), Z(0x52), - Z(0xf5), Z(0x1e), Z(0xf4), Z(0xcb), Z(0x18), Z(0x33), Z(0x1f), Z(0xf8), - Z(0x69), Z(0x10), Z(0x9d), Z(0xd3), Z(0xf7), Z(0x28), Z(0xf8), Z(0x30), - Z(0x05), Z(0x5e), Z(0x32), Z(0xc0), Z(0xd5), Z(0x19), Z(0xbd), Z(0x45), - Z(0x8b), Z(0x5b), Z(0xfd), Z(0xbc), Z(0xe2), Z(0x5c), Z(0xa9), Z(0x96), - Z(0xef), Z(0x70), Z(0xcf), Z(0xc2), Z(0x2a), Z(0xb3), Z(0x61), Z(0xad), - Z(0x80), Z(0x48), Z(0x81), Z(0xb7), Z(0x1d), Z(0x43), Z(0xd9), Z(0xd7), - Z(0x45), Z(0xf0), Z(0xd8), Z(0x8a), Z(0x59), Z(0x7c), Z(0x57), Z(0xc1), - Z(0x79), Z(0xc7), Z(0x34), Z(0xd6), Z(0x43), Z(0xdf), Z(0xe4), Z(0x78), - Z(0x16), Z(0x06), Z(0xda), Z(0x92), Z(0x76), Z(0x51), Z(0xe1), Z(0xd4), - Z(0x70), Z(0x03), Z(0xe0), Z(0x2f), Z(0x96), Z(0x91), Z(0x82), Z(0x80) -}; - -#undef Z -#define Z(x) cpu_to_be32(x << 11) -static const __be32 sbox2[256] =3D { - Z(0xf0), Z(0x37), Z(0x24), Z(0x53), Z(0x2a), Z(0x03), Z(0x83), Z(0x86), - Z(0xd1), Z(0xec), Z(0x50), Z(0xf0), Z(0x42), Z(0x78), Z(0x2f), Z(0x6d), - Z(0xbf), Z(0x80), Z(0x87), Z(0x27), Z(0x95), Z(0xe2), Z(0xc5), Z(0x5d), - Z(0xf9), Z(0x6f), Z(0xdb), Z(0xb4), Z(0x65), Z(0x6e), Z(0xe7), Z(0x24), - Z(0xc8), Z(0x1a), Z(0xbb), Z(0x49), Z(0xb5), Z(0x0a), Z(0x7d), Z(0xb9), - Z(0xe8), Z(0xdc), Z(0xb7), Z(0xd9), Z(0x45), Z(0x20), Z(0x1b), Z(0xce), - Z(0x59), Z(0x9d), Z(0x6b), Z(0xbd), Z(0x0e), Z(0x8f), Z(0xa3), Z(0xa9), - Z(0xbc), Z(0x74), Z(0xa6), Z(0xf6), Z(0x7f), Z(0x5f), Z(0xb1), Z(0x68), - Z(0x84), Z(0xbc), Z(0xa9), Z(0xfd), Z(0x55), Z(0x50), Z(0xe9), Z(0xb6), - Z(0x13), Z(0x5e), Z(0x07), Z(0xb8), Z(0x95), Z(0x02), Z(0xc0), Z(0xd0), - Z(0x6a), Z(0x1a), Z(0x85), Z(0xbd), Z(0xb6), Z(0xfd), Z(0xfe), Z(0x17), - Z(0x3f), Z(0x09), Z(0xa3), Z(0x8d), Z(0xfb), Z(0xed), Z(0xda), Z(0x1d), - Z(0x6d), Z(0x1c), Z(0x6c), Z(0x01), Z(0x5a), Z(0xe5), Z(0x71), Z(0x3e), - Z(0x8b), Z(0x6b), Z(0xbe), Z(0x29), Z(0xeb), Z(0x12), Z(0x19), Z(0x34), - Z(0xcd), Z(0xb3), Z(0xbd), Z(0x35), Z(0xea), Z(0x4b), Z(0xd5), Z(0xae), - Z(0x2a), Z(0x79), Z(0x5a), Z(0xa5), Z(0x32), Z(0x12), Z(0x7b), Z(0xdc), - Z(0x2c), Z(0xd0), Z(0x22), Z(0x4b), Z(0xb1), Z(0x85), Z(0x59), Z(0x80), - Z(0xc0), Z(0x30), Z(0x9f), Z(0x73), Z(0xd3), Z(0x14), Z(0x48), Z(0x40), - Z(0x07), Z(0x2d), Z(0x8f), Z(0x80), Z(0x0f), Z(0xce), Z(0x0b), Z(0x5e), - Z(0xb7), Z(0x5e), Z(0xac), Z(0x24), Z(0x94), Z(0x4a), Z(0x18), Z(0x15), - Z(0x05), Z(0xe8), Z(0x02), Z(0x77), Z(0xa9), Z(0xc7), Z(0x40), Z(0x45), - Z(0x89), Z(0xd1), Z(0xea), Z(0xde), Z(0x0c), Z(0x79), Z(0x2a), Z(0x99), - Z(0x6c), Z(0x3e), Z(0x95), Z(0xdd), Z(0x8c), Z(0x7d), Z(0xad), Z(0x6f), - Z(0xdc), Z(0xff), Z(0xfd), Z(0x62), Z(0x47), Z(0xb3), Z(0x21), Z(0x8a), - Z(0xec), Z(0x8e), Z(0x19), Z(0x18), Z(0xb4), Z(0x6e), Z(0x3d), Z(0xfd), - Z(0x74), Z(0x54), Z(0x1e), Z(0x04), Z(0x85), Z(0xd8), Z(0xbc), Z(0x1f), - Z(0x56), Z(0xe7), Z(0x3a), Z(0x56), Z(0x67), Z(0xd6), Z(0xc8), Z(0xa5), - Z(0xf3), Z(0x8e), Z(0xde), Z(0xae), Z(0x37), Z(0x49), Z(0xb7), Z(0xfa), - Z(0xc8), Z(0xf4), Z(0x1f), Z(0xe0), Z(0x2a), Z(0x9b), Z(0x15), Z(0xd1), - Z(0x34), Z(0x0e), Z(0xb5), Z(0xe0), Z(0x44), Z(0x78), Z(0x84), Z(0x59), - Z(0x56), Z(0x68), Z(0x77), Z(0xa5), Z(0x14), Z(0x06), Z(0xf5), Z(0x2f), - Z(0x8c), Z(0x8a), Z(0x73), Z(0x80), Z(0x76), Z(0xb4), Z(0x10), Z(0x86) -}; - -#undef Z -#define Z(x) cpu_to_be32(x << 19) -static const __be32 sbox3[256] =3D { - Z(0xa9), Z(0x2a), Z(0x48), Z(0x51), Z(0x84), Z(0x7e), Z(0x49), Z(0xe2), - Z(0xb5), Z(0xb7), Z(0x42), Z(0x33), Z(0x7d), Z(0x5d), Z(0xa6), Z(0x12), - Z(0x44), Z(0x48), Z(0x6d), Z(0x28), Z(0xaa), Z(0x20), Z(0x6d), Z(0x57), - Z(0xd6), Z(0x6b), Z(0x5d), Z(0x72), Z(0xf0), Z(0x92), Z(0x5a), Z(0x1b), - Z(0x53), Z(0x80), Z(0x24), Z(0x70), Z(0x9a), Z(0xcc), Z(0xa7), Z(0x66), - Z(0xa1), Z(0x01), Z(0xa5), Z(0x41), Z(0x97), Z(0x41), Z(0x31), Z(0x82), - Z(0xf1), Z(0x14), Z(0xcf), Z(0x53), Z(0x0d), Z(0xa0), Z(0x10), Z(0xcc), - Z(0x2a), Z(0x7d), Z(0xd2), Z(0xbf), Z(0x4b), Z(0x1a), Z(0xdb), Z(0x16), - Z(0x47), Z(0xf6), Z(0x51), Z(0x36), Z(0xed), Z(0xf3), Z(0xb9), Z(0x1a), - Z(0xa7), Z(0xdf), Z(0x29), Z(0x43), Z(0x01), Z(0x54), Z(0x70), Z(0xa4), - Z(0xbf), Z(0xd4), Z(0x0b), Z(0x53), Z(0x44), Z(0x60), Z(0x9e), Z(0x23), - Z(0xa1), Z(0x18), Z(0x68), Z(0x4f), Z(0xf0), Z(0x2f), Z(0x82), Z(0xc2), - Z(0x2a), Z(0x41), Z(0xb2), Z(0x42), Z(0x0c), Z(0xed), Z(0x0c), Z(0x1d), - Z(0x13), Z(0x3a), Z(0x3c), Z(0x6e), Z(0x35), Z(0xdc), Z(0x60), Z(0x65), - Z(0x85), Z(0xe9), Z(0x64), Z(0x02), Z(0x9a), Z(0x3f), Z(0x9f), Z(0x87), - Z(0x96), Z(0xdf), Z(0xbe), Z(0xf2), Z(0xcb), Z(0xe5), Z(0x6c), Z(0xd4), - Z(0x5a), Z(0x83), Z(0xbf), Z(0x92), Z(0x1b), Z(0x94), Z(0x00), Z(0x42), - Z(0xcf), Z(0x4b), Z(0x00), Z(0x75), Z(0xba), Z(0x8f), Z(0x76), Z(0x5f), - Z(0x5d), Z(0x3a), Z(0x4d), Z(0x09), Z(0x12), Z(0x08), Z(0x38), Z(0x95), - Z(0x17), Z(0xe4), Z(0x01), Z(0x1d), Z(0x4c), Z(0xa9), Z(0xcc), Z(0x85), - Z(0x82), Z(0x4c), Z(0x9d), Z(0x2f), Z(0x3b), Z(0x66), Z(0xa1), Z(0x34), - Z(0x10), Z(0xcd), Z(0x59), Z(0x89), Z(0xa5), Z(0x31), Z(0xcf), Z(0x05), - Z(0xc8), Z(0x84), Z(0xfa), Z(0xc7), Z(0xba), Z(0x4e), Z(0x8b), Z(0x1a), - Z(0x19), Z(0xf1), Z(0xa1), Z(0x3b), Z(0x18), Z(0x12), Z(0x17), Z(0xb0), - Z(0x98), Z(0x8d), Z(0x0b), Z(0x23), Z(0xc3), Z(0x3a), Z(0x2d), Z(0x20), - Z(0xdf), Z(0x13), Z(0xa0), Z(0xa8), Z(0x4c), Z(0x0d), Z(0x6c), Z(0x2f), - Z(0x47), Z(0x13), Z(0x13), Z(0x52), Z(0x1f), Z(0x2d), Z(0xf5), Z(0x79), - Z(0x3d), Z(0xa2), Z(0x54), Z(0xbd), Z(0x69), Z(0xc8), Z(0x6b), Z(0xf3), - Z(0x05), Z(0x28), Z(0xf1), Z(0x16), Z(0x46), Z(0x40), Z(0xb0), Z(0x11), - Z(0xd3), Z(0xb7), Z(0x95), Z(0x49), Z(0xcf), Z(0xc3), Z(0x1d), Z(0x8f), - Z(0xd8), Z(0xe1), Z(0x73), Z(0xdb), Z(0xad), Z(0xc8), Z(0xc9), Z(0xa9), - Z(0xa1), Z(0xc2), Z(0xc5), Z(0xe3), Z(0xba), Z(0xfc), Z(0x0e), Z(0x25) -}; - -/* - * This is a 16 round Feistel network with permutation F_ENCRYPT - */ -#define F_ENCRYPT(R, L, sched) \ -do { \ - union lc4 { __be32 l; u8 c[4]; } u; \ - u.l =3D sched ^ R; \ - L ^=3D sbox0[u.c[0]] ^ sbox1[u.c[1]] ^ sbox2[u.c[2]] ^ sbox3[u.c[3]]; \ -} while (0) - -/* - * encryptor - */ -static void fcrypt_encrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) -{ - const struct fcrypt_ctx *ctx =3D crypto_tfm_ctx(tfm); - struct { - __be32 l, r; - } X; - - memcpy(&X, src, sizeof(X)); - - F_ENCRYPT(X.r, X.l, ctx->sched[0x0]); - F_ENCRYPT(X.l, X.r, ctx->sched[0x1]); - F_ENCRYPT(X.r, X.l, ctx->sched[0x2]); - F_ENCRYPT(X.l, X.r, ctx->sched[0x3]); - F_ENCRYPT(X.r, X.l, ctx->sched[0x4]); - F_ENCRYPT(X.l, X.r, ctx->sched[0x5]); - F_ENCRYPT(X.r, X.l, ctx->sched[0x6]); - F_ENCRYPT(X.l, X.r, ctx->sched[0x7]); - F_ENCRYPT(X.r, X.l, ctx->sched[0x8]); - F_ENCRYPT(X.l, X.r, ctx->sched[0x9]); - F_ENCRYPT(X.r, X.l, ctx->sched[0xa]); - F_ENCRYPT(X.l, X.r, ctx->sched[0xb]); - F_ENCRYPT(X.r, X.l, ctx->sched[0xc]); - F_ENCRYPT(X.l, X.r, ctx->sched[0xd]); - F_ENCRYPT(X.r, X.l, ctx->sched[0xe]); - F_ENCRYPT(X.l, X.r, ctx->sched[0xf]); - - memcpy(dst, &X, sizeof(X)); -} - -/* - * decryptor - */ -static void fcrypt_decrypt(struct crypto_tfm *tfm, u8 *dst, const u8 *src) -{ - const struct fcrypt_ctx *ctx =3D crypto_tfm_ctx(tfm); - struct { - __be32 l, r; - } X; - - memcpy(&X, src, sizeof(X)); - - F_ENCRYPT(X.l, X.r, ctx->sched[0xf]); - F_ENCRYPT(X.r, X.l, ctx->sched[0xe]); - F_ENCRYPT(X.l, X.r, ctx->sched[0xd]); - F_ENCRYPT(X.r, X.l, ctx->sched[0xc]); - F_ENCRYPT(X.l, X.r, ctx->sched[0xb]); - F_ENCRYPT(X.r, X.l, ctx->sched[0xa]); - F_ENCRYPT(X.l, X.r, ctx->sched[0x9]); - F_ENCRYPT(X.r, X.l, ctx->sched[0x8]); - F_ENCRYPT(X.l, X.r, ctx->sched[0x7]); - F_ENCRYPT(X.r, X.l, ctx->sched[0x6]); - F_ENCRYPT(X.l, X.r, ctx->sched[0x5]); - F_ENCRYPT(X.r, X.l, ctx->sched[0x4]); - F_ENCRYPT(X.l, X.r, ctx->sched[0x3]); - F_ENCRYPT(X.r, X.l, ctx->sched[0x2]); - F_ENCRYPT(X.l, X.r, ctx->sched[0x1]); - F_ENCRYPT(X.r, X.l, ctx->sched[0x0]); - - memcpy(dst, &X, sizeof(X)); -} - -/* - * Generate a key schedule from key, the least significant bit in each key= byte - * is parity and shall be ignored. This leaves 56 significant bits in the = key - * to scatter over the 16 key schedules. For each schedule extract the low - * order 32 bits and use as schedule, then rotate right by 11 bits. - */ -static int fcrypt_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned i= nt keylen) -{ - struct fcrypt_ctx *ctx =3D crypto_tfm_ctx(tfm); - -#if BITS_PER_LONG =3D=3D 64 /* the 64-bit version can also be used for 32= -bit - * kernels - it seems to be faster but the code is - * larger */ - - u64 k; /* k holds all 56 non-parity bits */ - - /* discard the parity bits */ - k =3D (*key++) >> 1; - k <<=3D 7; - k |=3D (*key++) >> 1; - k <<=3D 7; - k |=3D (*key++) >> 1; - k <<=3D 7; - k |=3D (*key++) >> 1; - k <<=3D 7; - k |=3D (*key++) >> 1; - k <<=3D 7; - k |=3D (*key++) >> 1; - k <<=3D 7; - k |=3D (*key++) >> 1; - k <<=3D 7; - k |=3D (*key) >> 1; - - /* Use lower 32 bits for schedule, rotate by 11 each round (16 times) */ - ctx->sched[0x0] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0x1] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0x2] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0x3] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0x4] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0x5] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0x6] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0x7] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0x8] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0x9] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0xa] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0xb] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0xc] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0xd] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0xe] =3D cpu_to_be32(k); ror56_64(k, 11); - ctx->sched[0xf] =3D cpu_to_be32(k); - - return 0; -#else - u32 hi, lo; /* hi is upper 24 bits and lo lower 32, total 56 */ - - /* discard the parity bits */ - lo =3D (*key++) >> 1; - lo <<=3D 7; - lo |=3D (*key++) >> 1; - lo <<=3D 7; - lo |=3D (*key++) >> 1; - lo <<=3D 7; - lo |=3D (*key++) >> 1; - hi =3D lo >> 4; - lo &=3D 0xf; - lo <<=3D 7; - lo |=3D (*key++) >> 1; - lo <<=3D 7; - lo |=3D (*key++) >> 1; - lo <<=3D 7; - lo |=3D (*key++) >> 1; - lo <<=3D 7; - lo |=3D (*key) >> 1; - - /* Use lower 32 bits for schedule, rotate by 11 each round (16 times) */ - ctx->sched[0x0] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0x1] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0x2] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0x3] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0x4] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0x5] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0x6] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0x7] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0x8] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0x9] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0xa] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0xb] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0xc] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0xd] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0xe] =3D cpu_to_be32(lo); ror56(hi, lo, 11); - ctx->sched[0xf] =3D cpu_to_be32(lo); - return 0; -#endif -} - -static struct crypto_alg fcrypt_alg =3D { - .cra_name =3D "fcrypt", - .cra_driver_name =3D "fcrypt-generic", - .cra_flags =3D CRYPTO_ALG_TYPE_CIPHER, - .cra_blocksize =3D 8, - .cra_ctxsize =3D sizeof(struct fcrypt_ctx), - .cra_module =3D THIS_MODULE, - .cra_u =3D { .cipher =3D { - .cia_min_keysize =3D 8, - .cia_max_keysize =3D 8, - .cia_setkey =3D fcrypt_setkey, - .cia_encrypt =3D fcrypt_encrypt, - .cia_decrypt =3D fcrypt_decrypt } } -}; - -static int __init fcrypt_mod_init(void) -{ - return crypto_register_alg(&fcrypt_alg); -} - -static void __exit fcrypt_mod_fini(void) -{ - crypto_unregister_alg(&fcrypt_alg); -} - -module_init(fcrypt_mod_init); -module_exit(fcrypt_mod_fini); - -MODULE_LICENSE("Dual BSD/GPL"); -MODULE_DESCRIPTION("FCrypt Cipher Algorithm"); -MODULE_AUTHOR("David Howells "); -MODULE_ALIAS_CRYPTO("fcrypt"); diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index e54517605f5f..61a2501bfe9b 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c @@ -1598,14 +1598,10 @@ static int do_test(const char *alg, u32 type, u32 m= ask, int m, u32 num_mb) =20 case 30: ret =3D min(ret, tcrypt_test("ecb(xeta)")); break; =20 - case 31: - ret =3D min(ret, tcrypt_test("pcbc(fcrypt)")); - break; - case 32: ret =3D min(ret, tcrypt_test("ecb(camellia)")); ret =3D min(ret, tcrypt_test("cbc(camellia)")); ret =3D min(ret, tcrypt_test("ctr(camellia)")); ret =3D min(ret, tcrypt_test("lrw(camellia)")); diff --git a/crypto/testmgr.c b/crypto/testmgr.c index 4d86efae65b2..f392d97fc469 100644 --- a/crypto/testmgr.c +++ b/crypto/testmgr.c @@ -4825,19 +4825,10 @@ static const struct alg_test_desc alg_test_descs[] = =3D { .alg =3D "ecb(des3_ede)", .test =3D alg_test_skcipher, .suite =3D { .cipher =3D __VECS(des3_ede_tv_template) } - }, { - .alg =3D "ecb(fcrypt)", - .test =3D alg_test_skcipher, - .suite =3D { - .cipher =3D { - .vecs =3D fcrypt_pcbc_tv_template, - .count =3D 1 - } - } }, { .alg =3D "ecb(khazad)", .test =3D alg_test_skcipher, .suite =3D { .cipher =3D __VECS(khazad_tv_template) @@ -5252,16 +5243,10 @@ static const struct alg_test_desc alg_test_descs[] = =3D { }, { .alg =3D "p1363(ecdsa-nist-p521)", .test =3D alg_test_null, .fips_allowed =3D 1, }, { - .alg =3D "pcbc(fcrypt)", - .test =3D alg_test_skcipher, - .suite =3D { - .cipher =3D __VECS(fcrypt_pcbc_tv_template) - } - }, { #if IS_ENABLED(CONFIG_CRYPTO_PHMAC_S390) .alg =3D "phmac(sha224)", .test =3D alg_test_hash, .fips_allowed =3D 1, .suite =3D { diff --git a/crypto/testmgr.h b/crypto/testmgr.h index 9b4d7e11c9fd..3f0600bd9c05 100644 --- a/crypto/testmgr.h +++ b/crypto/testmgr.h @@ -25066,55 +25066,10 @@ static const struct cipher_testvec xeta_tv_templa= te[] =3D { "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5", .len =3D 32, } }; =20 -/* - * FCrypt test vectors - */ -static const struct cipher_testvec fcrypt_pcbc_tv_template[] =3D { - { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.= html */ - .key =3D "\x00\x00\x00\x00\x00\x00\x00\x00", - .klen =3D 8, - .iv =3D "\x00\x00\x00\x00\x00\x00\x00\x00", - .ptext =3D "\x00\x00\x00\x00\x00\x00\x00\x00", - .ctext =3D "\x0E\x09\x00\xC7\x3E\xF7\xED\x41", - .len =3D 8, - }, { - .key =3D "\x11\x44\x77\xAA\xDD\x00\x33\x66", - .klen =3D 8, - .iv =3D "\x00\x00\x00\x00\x00\x00\x00\x00", - .ptext =3D "\x12\x34\x56\x78\x9A\xBC\xDE\xF0", - .ctext =3D "\xD8\xED\x78\x74\x77\xEC\x06\x80", - .len =3D 8, - }, { /* From Arla */ - .key =3D "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87", - .klen =3D 8, - .iv =3D "\xfe\xdc\xba\x98\x76\x54\x32\x10", - .ptext =3D "The quick brown fox jumps over the lazy dogs.\0\0", - .ctext =3D "\x00\xf0\x0e\x11\x75\xe6\x23\x82" - "\xee\xac\x98\x62\x44\x51\xe4\x84" - "\xc3\x59\xd8\xaa\x64\x60\xae\xf7" - "\xd2\xd9\x13\x79\x72\xa3\x45\x03" - "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1" - "\xf8\x91\x3c\xac\x44\x22\x92\xef", - .len =3D 48, - }, { - .key =3D "\xfe\xdc\xba\x98\x76\x54\x32\x10", - .klen =3D 8, - .iv =3D "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87", - .ptext =3D "The quick brown fox jumps over the lazy dogs.\0\0", - .ctext =3D "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c" - "\x01\x88\x7f\x3e\x31\x6e\x62\x9d" - "\xd8\xe0\x57\xa3\x06\x3a\x42\x58" - "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0" - "\x19\x89\x09\x1c\x2a\x8e\x8c\x94" - "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f", - .len =3D 48, - } -}; - /* * CAMELLIA test vectors. */ static const struct hash_testvec camellia_cmac128_tv_template[] =3D { { /* From draft-kato-ipsec-camellia-cmac96and128-01 */ --=20 2.54.0 From nobody Sun May 24 20:33:22 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C239536683D; Fri, 22 May 2026 05:07:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779426480; cv=none; b=V71gY9izuiyQFvqFm28J2nb1e4daWe7QmbnBeIFH4CIt7idZShzP6rtejqEKvlUYxKoATLnCQh4Gf4I5lNXQB/pLFodwiUts6pUwQI3t2PL6RM5ZmNIf/uAy4sSNcp3+Ri8uVt+BH2MMpTPS89qZzDDlPUo9OLYjXLfbUHVaBHM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779426480; c=relaxed/simple; bh=niynx7zNWpTRyBpnRMPDkeyl+BLBoxHqPkr+tGSyj9A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=R8CtXOxEOI5qCRFxbBjUFymGbOuqGjgkW91SKIKjMwgRsnpkznpAqvzzlziTxLsZ7JEFb/jI37em+pEYO3ZUf6MG8Tk6WzvsvdHJpaQ0shiN0RVcIfLqaVe8HVuGB7JQAH74fhL8DJwWvL/1kEaPzxDtXvvKX4GZ3F98xFdOW8E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QcO0qiKE; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QcO0qiKE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1B5111F0155A; Fri, 22 May 2026 05:07:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1779426472; bh=Cb1R5lojQv0QYPgNCAvqbtji6TaIEpVaiQRNaAOKVuk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=QcO0qiKEPadt5Qt33p33t0arfdBxr6DnLKSnZVUCtvvUzr4DKTRvmNSqvNiTFbYn6 NgrfoLrNAFSeDzcYsa1PhT081GZC3/C/vIvUBO+9M8zyNYOoskdurJYBbAy7oYysTn E7Lu4J32AfIPKC+5jEK8cgcKxWWYd4XQ/D1L7CON9t6Y0O76l4ObAKON9omaPJSKRj s1EG7T0Bf/NGs5MeD/sVq+glZWwVGRET/ektRnuGpbdH6Kol7psB4UvBL9QODiSvW9 PfX4zPLaQS964g+soXndffmcdReM0vR44dCg5SiB7CJSQy2E0Y2T8/9l2+4taEoTh2 3g/nCWnwG8oxA== From: Eric Biggers To: netdev@vger.kernel.org, linux-afs@lists.infradead.org Cc: David Howells , Marc Dionne , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Eric Biggers , Geert Uytterhoeven Subject: [PATCH net-next v2 5/5] crypto: pcbc - Remove support for PCBC mode Date: Fri, 22 May 2026 00:07:36 -0500 Message-ID: <20260522050740.84561-6-ebiggers@kernel.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260522050740.84561-1-ebiggers@kernel.org> References: <20260522050740.84561-1-ebiggers@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The only user of PCBC mode (Propagating Cipher Block Chaining mode) was net/rxrpc/rxkad.c, which now uses local code instead. While PCBC was an interesting cryptographic experiment, it has largely been relegated to the history books and academic exercises. It is non-parallelizable (i.e., very slow) and doesn't actually achieve the integrity properties it was apparently intended to achieve. Remove support for it from the crypto API. Acked-by: Geert Uytterhoeven # m68k Acked-by: David Howells Signed-off-by: Eric Biggers Tested-by: Marc Dionne --- arch/arm/configs/am200epdkit_defconfig | 1 - arch/arm/configs/dove_defconfig | 1 - arch/arm/configs/multi_v5_defconfig | 1 - arch/arm/configs/mv78xx0_defconfig | 1 - arch/arm/configs/mvebu_v5_defconfig | 1 - arch/arm/configs/omap1_defconfig | 1 - arch/arm/configs/orion5x_defconfig | 1 - arch/arm/configs/pxa_defconfig | 1 - arch/arm/configs/wpcm450_defconfig | 1 - arch/m68k/configs/amiga_defconfig | 1 - arch/m68k/configs/apollo_defconfig | 1 - arch/m68k/configs/atari_defconfig | 1 - arch/m68k/configs/bvme6000_defconfig | 1 - arch/m68k/configs/hp300_defconfig | 1 - arch/m68k/configs/mac_defconfig | 1 - arch/m68k/configs/multi_defconfig | 1 - arch/m68k/configs/mvme147_defconfig | 1 - arch/m68k/configs/mvme16x_defconfig | 1 - arch/m68k/configs/q40_defconfig | 1 - arch/m68k/configs/sun3_defconfig | 1 - arch/m68k/configs/sun3x_defconfig | 1 - arch/mips/configs/bigsur_defconfig | 1 - arch/mips/configs/decstation_64_defconfig | 1 - arch/mips/configs/decstation_defconfig | 1 - arch/mips/configs/decstation_r4k_defconfig | 1 - arch/mips/configs/fuloong2e_defconfig | 1 - arch/mips/configs/gpr_defconfig | 1 - arch/mips/configs/ip22_defconfig | 1 - arch/mips/configs/ip27_defconfig | 1 - arch/mips/configs/ip30_defconfig | 1 - arch/mips/configs/ip32_defconfig | 1 - arch/mips/configs/lemote2f_defconfig | 1 - arch/mips/configs/malta_defconfig | 1 - arch/mips/configs/malta_kvm_defconfig | 1 - arch/mips/configs/malta_qemu_32r6_defconfig | 1 - arch/mips/configs/maltaaprp_defconfig | 1 - arch/mips/configs/maltasmvp_defconfig | 1 - arch/mips/configs/maltasmvp_eva_defconfig | 1 - arch/mips/configs/maltaup_defconfig | 1 - arch/mips/configs/maltaup_xpa_defconfig | 1 - arch/mips/configs/mtx1_defconfig | 1 - arch/mips/configs/rm200_defconfig | 1 - arch/mips/configs/sb1250_swarm_defconfig | 1 - arch/parisc/configs/generic-64bit_defconfig | 1 - arch/powerpc/configs/44x/akebono_defconfig | 1 - arch/powerpc/configs/44x/bamboo_defconfig | 1 - arch/powerpc/configs/44x/currituck_defconfig | 1 - arch/powerpc/configs/44x/ebony_defconfig | 1 - arch/powerpc/configs/44x/eiger_defconfig | 1 - arch/powerpc/configs/44x/fsp2_defconfig | 1 - arch/powerpc/configs/44x/icon_defconfig | 1 - arch/powerpc/configs/44x/iss476-smp_defconfig | 1 - arch/powerpc/configs/44x/katmai_defconfig | 1 - arch/powerpc/configs/44x/rainier_defconfig | 1 - arch/powerpc/configs/44x/redwood_defconfig | 1 - arch/powerpc/configs/44x/sequoia_defconfig | 1 - arch/powerpc/configs/44x/taishan_defconfig | 1 - arch/powerpc/configs/52xx/cm5200_defconfig | 1 - arch/powerpc/configs/52xx/motionpro_defconfig | 1 - arch/powerpc/configs/52xx/tqm5200_defconfig | 1 - arch/powerpc/configs/83xx/asp8347_defconfig | 1 - .../configs/83xx/mpc8313_rdb_defconfig | 1 - .../configs/83xx/mpc8315_rdb_defconfig | 1 - .../configs/83xx/mpc832x_rdb_defconfig | 1 - .../configs/83xx/mpc834x_itx_defconfig | 1 - .../configs/83xx/mpc834x_itxgp_defconfig | 1 - .../configs/83xx/mpc837x_rdb_defconfig | 1 - arch/powerpc/configs/amigaone_defconfig | 1 - arch/powerpc/configs/cell_defconfig | 1 - arch/powerpc/configs/chrp32_defconfig | 1 - arch/powerpc/configs/ep8248e_defconfig | 1 - arch/powerpc/configs/fsl-emb-nonhw.config | 1 - arch/powerpc/configs/g5_defconfig | 1 - arch/powerpc/configs/linkstation_defconfig | 1 - arch/powerpc/configs/mgcoge_defconfig | 1 - arch/powerpc/configs/mpc83xx_defconfig | 1 - arch/powerpc/configs/mvme5100_defconfig | 1 - arch/powerpc/configs/pmac32_defconfig | 1 - arch/powerpc/configs/powernv_defconfig | 1 - arch/powerpc/configs/ppc44x_defconfig | 1 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/configs/ppc64e_defconfig | 1 - arch/powerpc/configs/ppc6xx_defconfig | 1 - arch/powerpc/configs/ps3_defconfig | 1 - arch/s390/configs/debug_defconfig | 1 - arch/s390/configs/defconfig | 1 - arch/sh/configs/hp6xx_defconfig | 1 - arch/sh/configs/r7780mp_defconfig | 1 - arch/sh/configs/r7785rp_defconfig | 1 - arch/sh/configs/se7712_defconfig | 1 - arch/sh/configs/sh2007_defconfig | 1 - arch/sparc/configs/sparc32_defconfig | 1 - arch/sparc/configs/sparc64_defconfig | 1 - crypto/Kconfig | 9 - crypto/Makefile | 1 - crypto/pcbc.c | 195 ------------------ 96 files changed, 298 deletions(-) delete mode 100644 crypto/pcbc.c diff --git a/arch/arm/configs/am200epdkit_defconfig b/arch/arm/configs/am20= 0epdkit_defconfig index 2367b1685c1c..d8198592fe1b 100644 --- a/arch/arm/configs/am200epdkit_defconfig +++ b/arch/arm/configs/am200epdkit_defconfig @@ -84,10 +84,9 @@ CONFIG_NLS_ISO8859_1=3Dy CONFIG_DEBUG_KERNEL=3Dy # CONFIG_DETECT_SOFTLOCKUP is not set CONFIG_CRYPTO=3Dy CONFIG_CRYPTO_CBC=3Dm CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_ARC4=3Dm # CONFIG_DEBUG_BUGVERBOSE is not set # CONFIG_DEBUG_PREEMPT is not set CONFIG_DEBUG_USER=3Dy diff --git a/arch/arm/configs/dove_defconfig b/arch/arm/configs/dove_defcon= fig index e98c35df675e..9743b0b7ec61 100644 --- a/arch/arm/configs/dove_defconfig +++ b/arch/arm/configs/dove_defconfig @@ -116,11 +116,10 @@ CONFIG_TIMER_STATS=3Dy CONFIG_CRYPTO_NULL=3Dy CONFIG_CRYPTO_BLOWFISH=3Dy CONFIG_CRYPTO_TEA=3Dy CONFIG_CRYPTO_TWOFISH=3Dy CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_MD4=3Dy CONFIG_CRYPTO_SHA1=3Dy CONFIG_CRYPTO_SHA256=3Dy CONFIG_CRYPTO_SHA512=3Dy diff --git a/arch/arm/configs/multi_v5_defconfig b/arch/arm/configs/multi_v= 5_defconfig index 59b020e66a0b..95afc972047e 100644 --- a/arch/arm/configs/multi_v5_defconfig +++ b/arch/arm/configs/multi_v5_defconfig @@ -284,11 +284,10 @@ CONFIG_NLS_CODEPAGE_437=3Dy CONFIG_NLS_CODEPAGE_850=3Dy CONFIG_NLS_ISO8859_1=3Dy CONFIG_NLS_ISO8859_2=3Dy CONFIG_NLS_UTF8=3Dy CONFIG_CRYPTO_CBC=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_DEV_MARVELL_CESA=3Dy CONFIG_DEBUG_KERNEL=3Dy CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DEBUG_FS=3Dy diff --git a/arch/arm/configs/mv78xx0_defconfig b/arch/arm/configs/mv78xx0_= defconfig index d3a26efe766c..a652ccd1358b 100644 --- a/arch/arm/configs/mv78xx0_defconfig +++ b/arch/arm/configs/mv78xx0_defconfig @@ -109,11 +109,10 @@ CONFIG_NLS_CODEPAGE_437=3Dy CONFIG_NLS_CODEPAGE_850=3Dy CONFIG_NLS_ISO8859_1=3Dy CONFIG_NLS_ISO8859_2=3Dy CONFIG_CRYPTO_CBC=3Dm CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DEBUG_FS=3Dy CONFIG_DEBUG_KERNEL=3Dy diff --git a/arch/arm/configs/mvebu_v5_defconfig b/arch/arm/configs/mvebu_v= 5_defconfig index d1742a7cae6a..4cf77df183b3 100644 --- a/arch/arm/configs/mvebu_v5_defconfig +++ b/arch/arm/configs/mvebu_v5_defconfig @@ -183,11 +183,10 @@ CONFIG_NLS_CODEPAGE_437=3Dy CONFIG_NLS_CODEPAGE_850=3Dy CONFIG_NLS_ISO8859_1=3Dy CONFIG_NLS_ISO8859_2=3Dy CONFIG_NLS_UTF8=3Dy CONFIG_CRYPTO_CBC=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_DEV_MARVELL_CESA=3Dy CONFIG_DEBUG_KERNEL=3Dy CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DEBUG_FS=3Dy diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defc= onfig index c6155f101fc9..7bf58e8a5ab5 100644 --- a/arch/arm/configs/omap1_defconfig +++ b/arch/arm/configs/omap1_defconfig @@ -213,11 +213,10 @@ CONFIG_NLS_KOI8_R=3Dy CONFIG_NLS_UTF8=3Dy # CONFIG_ENABLE_MUST_CHECK is not set CONFIG_DEBUG_KERNEL=3Dy CONFIG_SECURITY=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_DEFLATE=3Dy CONFIG_CRYPTO_LZO=3Dy CONFIG_FONTS=3Dy CONFIG_FONT_8x8=3Dy CONFIG_FONT_8x16=3Dy diff --git a/arch/arm/configs/orion5x_defconfig b/arch/arm/configs/orion5x_= defconfig index 002c9145026b..f5be2e26d9ae 100644 --- a/arch/arm/configs/orion5x_defconfig +++ b/arch/arm/configs/orion5x_defconfig @@ -132,11 +132,10 @@ CONFIG_NLS_CODEPAGE_437=3Dy CONFIG_NLS_CODEPAGE_850=3Dy CONFIG_NLS_ISO8859_1=3Dy CONFIG_NLS_ISO8859_2=3Dy CONFIG_CRYPTO_CBC=3Dm CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_DEV_MARVELL_CESA=3Dy # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DEBUG_FS=3Dy diff --git a/arch/arm/configs/pxa_defconfig b/arch/arm/configs/pxa_defconfig index 53f1e5820c49..83d1ed3a37f5 100644 --- a/arch/arm/configs/pxa_defconfig +++ b/arch/arm/configs/pxa_defconfig @@ -644,11 +644,10 @@ CONFIG_CRYPTO_KHAZAD=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_SHA512=3Dm CONFIG_CRYPTO_TGR192=3Dm CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm diff --git a/arch/arm/configs/wpcm450_defconfig b/arch/arm/configs/wpcm450_= defconfig index cd4b3e70ff68..67b64a378166 100644 --- a/arch/arm/configs/wpcm450_defconfig +++ b/arch/arm/configs/wpcm450_defconfig @@ -179,11 +179,10 @@ CONFIG_KEYS=3Dy CONFIG_HARDENED_USERCOPY=3Dy CONFIG_FORTIFY_SOURCE=3Dy CONFIG_CRYPTO_RSA=3Dy CONFIG_CRYPTO_AES=3Dy CONFIG_CRYPTO_CBC=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_CCM=3Dy CONFIG_CRYPTO_GCM=3Dy CONFIG_CRYPTO_CMAC=3Dy CONFIG_CRYPTO_SHA256=3Dy CONFIG_ASYMMETRIC_KEY_TYPE=3Dy diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_de= fconfig index ca45670a6af4..aadff466830f 100644 --- a/arch/m68k/configs/amiga_defconfig +++ b/arch/m68k/configs/amiga_defconfig @@ -533,11 +533,10 @@ CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_= defconfig index 2732a5b8b694..ea9487a39884 100644 --- a/arch/m68k/configs/apollo_defconfig +++ b/arch/m68k/configs/apollo_defconfig @@ -488,11 +488,10 @@ CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_de= fconfig index 242882b05fa4..a70127ac7a2d 100644 --- a/arch/m68k/configs/atari_defconfig +++ b/arch/m68k/configs/atari_defconfig @@ -510,11 +510,10 @@ CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6= 000_defconfig index 07e73c78a9e2..83da79382538 100644 --- a/arch/m68k/configs/bvme6000_defconfig +++ b/arch/m68k/configs/bvme6000_defconfig @@ -480,11 +480,10 @@ CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_de= fconfig index 7188948da864..cea5ab74b3b1 100644 --- a/arch/m68k/configs/hp300_defconfig +++ b/arch/m68k/configs/hp300_defconfig @@ -490,11 +490,10 @@ CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defcon= fig index fa5b04d59aa6..26406777376d 100644 --- a/arch/m68k/configs/mac_defconfig +++ b/arch/m68k/configs/mac_defconfig @@ -509,11 +509,10 @@ CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm diff --git a/arch/m68k/configs/multi_defconfig b/arch/m68k/configs/multi_de= fconfig index 3bc9911549c0..8357491645ad 100644 --- a/arch/m68k/configs/multi_defconfig +++ b/arch/m68k/configs/multi_defconfig @@ -596,11 +596,10 @@ CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme14= 7_defconfig index 9f5c8e0a07f3..fe94f95862e7 100644 --- a/arch/m68k/configs/mvme147_defconfig +++ b/arch/m68k/configs/mvme147_defconfig @@ -480,11 +480,10 @@ CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16= x_defconfig index e5a6299aeae0..ba67cacc079e 100644 --- a/arch/m68k/configs/mvme16x_defconfig +++ b/arch/m68k/configs/mvme16x_defconfig @@ -481,11 +481,10 @@ CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defcon= fig index e79bbb397261..552399979e4b 100644 --- a/arch/m68k/configs/q40_defconfig +++ b/arch/m68k/configs/q40_defconfig @@ -499,11 +499,10 @@ CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defc= onfig index 7aa76de5c472..b4f3935d3d18 100644 --- a/arch/m68k/configs/sun3_defconfig +++ b/arch/m68k/configs/sun3_defconfig @@ -478,11 +478,10 @@ CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_de= fconfig index 2ecd8bd097ea..bb519520ae6e 100644 --- a/arch/m68k/configs/sun3x_defconfig +++ b/arch/m68k/configs/sun3x_defconfig @@ -478,11 +478,10 @@ CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm diff --git a/arch/mips/configs/bigsur_defconfig b/arch/mips/configs/bigsur_= defconfig index 74c6821e4c37..611dc0dd392d 100644 --- a/arch/mips/configs/bigsur_defconfig +++ b/arch/mips/configs/bigsur_defconfig @@ -205,11 +205,10 @@ CONFIG_DEFAULT_SECURITY_DAC=3Dy CONFIG_CRYPTO_NULL=3Dy CONFIG_CRYPTO_CCM=3Dm CONFIG_CRYPTO_GCM=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm diff --git a/arch/mips/configs/decstation_64_defconfig b/arch/mips/configs/= decstation_64_defconfig index e98d218ed4c1..0e8e4e827515 100644 --- a/arch/mips/configs/decstation_64_defconfig +++ b/arch/mips/configs/decstation_64_defconfig @@ -172,11 +172,10 @@ CONFIG_CRYPTO_CCM=3Dm CONFIG_CRYPTO_GCM=3Dm CONFIG_CRYPTO_CHACHA20POLY1305=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_LRW=3Dm CONFIG_CRYPTO_OFB=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_CMAC=3Dm CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_CRC32=3Dm CONFIG_CRYPTO_MD4=3Dm diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/dec= station_defconfig index 2b4e06cc238b..c664928efb9f 100644 --- a/arch/mips/configs/decstation_defconfig +++ b/arch/mips/configs/decstation_defconfig @@ -167,11 +167,10 @@ CONFIG_CRYPTO_CCM=3Dm CONFIG_CRYPTO_GCM=3Dm CONFIG_CRYPTO_CHACHA20POLY1305=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_LRW=3Dm CONFIG_CRYPTO_OFB=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_CMAC=3Dm CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_CRC32=3Dm CONFIG_CRYPTO_MD4=3Dm diff --git a/arch/mips/configs/decstation_r4k_defconfig b/arch/mips/configs= /decstation_r4k_defconfig index 280553269156..402255ae09ec 100644 --- a/arch/mips/configs/decstation_r4k_defconfig +++ b/arch/mips/configs/decstation_r4k_defconfig @@ -167,11 +167,10 @@ CONFIG_CRYPTO_CCM=3Dm CONFIG_CRYPTO_GCM=3Dm CONFIG_CRYPTO_CHACHA20POLY1305=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_LRW=3Dm CONFIG_CRYPTO_OFB=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_CMAC=3Dm CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_CRC32=3Dm CONFIG_CRYPTO_MD4=3Dm diff --git a/arch/mips/configs/fuloong2e_defconfig b/arch/mips/configs/fulo= ong2e_defconfig index b6fe3c962464..405799a9ed2a 100644 --- a/arch/mips/configs/fuloong2e_defconfig +++ b/arch/mips/configs/fuloong2e_defconfig @@ -207,11 +207,10 @@ CONFIG_NLS_CODEPAGE_936=3Dy CONFIG_NLS_ISO8859_1=3Dy CONFIG_NLS_UTF8=3Dy CONFIG_CRYPTO_AUTHENC=3Dm CONFIG_CRYPTO_GCM=3Dm CONFIG_CRYPTO_CTS=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SEED=3Dm CONFIG_CRYPTO_DEFLATE=3Dm diff --git a/arch/mips/configs/gpr_defconfig b/arch/mips/configs/gpr_defcon= fig index ed1a8f80f96e..47016655a089 100644 --- a/arch/mips/configs/gpr_defconfig +++ b/arch/mips/configs/gpr_defconfig @@ -247,11 +247,10 @@ CONFIG_ROOT_NFS=3Dy CONFIG_NLS_CODEPAGE_437=3Dy CONFIG_NLS_CODEPAGE_850=3Dy CONFIG_NLS_ISO8859_1=3Dy CONFIG_CRYPTO_AUTHENC=3Dm CONFIG_CRYPTO_BENCHMARK=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_SHA512=3Dm CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defc= onfig index 50895ed06592..822cc1ed64c2 100644 --- a/arch/mips/configs/ip22_defconfig +++ b/arch/mips/configs/ip22_defconfig @@ -304,11 +304,10 @@ CONFIG_NLS_UTF8=3Dm CONFIG_KEYS=3Dy CONFIG_CRYPTO_CRYPTD=3Dm CONFIG_CRYPTO_GCM=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_WP512=3Dm diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defc= onfig index ff7e06b92f58..d108fd7b752b 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig @@ -294,11 +294,10 @@ CONFIG_OMFS_FS=3Dm CONFIG_NFS_FS=3Dy CONFIG_SECURITYFS=3Dy CONFIG_CRYPTO_CRYPTD=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm diff --git a/arch/mips/configs/ip30_defconfig b/arch/mips/configs/ip30_defc= onfig index d9f748f8cfaa..028286029877 100644 --- a/arch/mips/configs/ip30_defconfig +++ b/arch/mips/configs/ip30_defconfig @@ -168,11 +168,10 @@ CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_WP512=3Dm diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defc= onfig index 4b15f895be63..5ddbaa0aafaf 100644 --- a/arch/mips/configs/ip32_defconfig +++ b/arch/mips/configs/ip32_defconfig @@ -152,11 +152,10 @@ CONFIG_NLS_UTF8=3Dm CONFIG_KEYS=3Dy CONFIG_CRYPTO_NULL=3Dy CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy CONFIG_CRYPTO_LRW=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_XCBC=3Dy CONFIG_CRYPTO_MD4=3Dy CONFIG_CRYPTO_SHA1=3Dy CONFIG_CRYPTO_SHA256=3Dy diff --git a/arch/mips/configs/lemote2f_defconfig b/arch/mips/configs/lemot= e2f_defconfig index bbcdfc8134cb..326f30748030 100644 --- a/arch/mips/configs/lemote2f_defconfig +++ b/arch/mips/configs/lemote2f_defconfig @@ -302,11 +302,10 @@ CONFIG_CRYPTO_CAMELLIA=3Dm CONFIG_CRYPTO_CAST5=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dm CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_XCBC=3Dm diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_de= fconfig index 85e781607299..61c9d5cd1a75 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig @@ -386,11 +386,10 @@ CONFIG_NLS_ISO8859_14=3Dm CONFIG_NLS_ISO8859_15=3Dm CONFIG_NLS_KOI8_R=3Dm CONFIG_NLS_KOI8_U=3Dm CONFIG_CRYPTO_CRYPTD=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_SHA512=3Dm CONFIG_CRYPTO_WP512=3Dm diff --git a/arch/mips/configs/malta_kvm_defconfig b/arch/mips/configs/malt= a_kvm_defconfig index 2db5f50fed3b..f862fbc7fbb7 100644 --- a/arch/mips/configs/malta_kvm_defconfig +++ b/arch/mips/configs/malta_kvm_defconfig @@ -393,11 +393,10 @@ CONFIG_NLS_ISO8859_14=3Dm CONFIG_NLS_ISO8859_15=3Dm CONFIG_NLS_KOI8_R=3Dm CONFIG_NLS_KOI8_U=3Dm CONFIG_CRYPTO_CRYPTD=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_SHA512=3Dm CONFIG_CRYPTO_WP512=3Dm diff --git a/arch/mips/configs/malta_qemu_32r6_defconfig b/arch/mips/config= s/malta_qemu_32r6_defconfig index 5687e10c1bc8..14cdd23f1acb 100644 --- a/arch/mips/configs/malta_qemu_32r6_defconfig +++ b/arch/mips/configs/malta_qemu_32r6_defconfig @@ -161,11 +161,10 @@ CONFIG_ROOT_NFS=3Dy CONFIG_CIFS=3Dm CONFIG_CIFS_XATTR=3Dy CONFIG_CIFS_POSIX=3Dy CONFIG_NLS_CODEPAGE_437=3Dm CONFIG_NLS_ISO8859_1=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAST5=3Dm diff --git a/arch/mips/configs/maltaaprp_defconfig b/arch/mips/configs/malt= aaprp_defconfig index abd22bff517b..2943593264b9 100644 --- a/arch/mips/configs/maltaaprp_defconfig +++ b/arch/mips/configs/maltaaprp_defconfig @@ -162,11 +162,10 @@ CONFIG_ROOT_NFS=3Dy CONFIG_CIFS=3Dm CONFIG_CIFS_XATTR=3Dy CONFIG_CIFS_POSIX=3Dy CONFIG_NLS_CODEPAGE_437=3Dm CONFIG_NLS_ISO8859_1=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAST5=3Dm diff --git a/arch/mips/configs/maltasmvp_defconfig b/arch/mips/configs/malt= asmvp_defconfig index 3fb3def8112d..47226fca0548 100644 --- a/arch/mips/configs/maltasmvp_defconfig +++ b/arch/mips/configs/maltasmvp_defconfig @@ -163,11 +163,10 @@ CONFIG_ROOT_NFS=3Dy CONFIG_CIFS=3Dm CONFIG_CIFS_XATTR=3Dy CONFIG_CIFS_POSIX=3Dy CONFIG_NLS_CODEPAGE_437=3Dm CONFIG_NLS_ISO8859_1=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAST5=3Dm diff --git a/arch/mips/configs/maltasmvp_eva_defconfig b/arch/mips/configs/= maltasmvp_eva_defconfig index 92e026912f68..09187a78409f 100644 --- a/arch/mips/configs/maltasmvp_eva_defconfig +++ b/arch/mips/configs/maltasmvp_eva_defconfig @@ -165,11 +165,10 @@ CONFIG_ROOT_NFS=3Dy CONFIG_CIFS=3Dm CONFIG_CIFS_XATTR=3Dy CONFIG_CIFS_POSIX=3Dy CONFIG_NLS_CODEPAGE_437=3Dm CONFIG_NLS_ISO8859_1=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAST5=3Dm diff --git a/arch/mips/configs/maltaup_defconfig b/arch/mips/configs/maltau= p_defconfig index 7a675fd3321f..a80783097c1e 100644 --- a/arch/mips/configs/maltaup_defconfig +++ b/arch/mips/configs/maltaup_defconfig @@ -161,11 +161,10 @@ CONFIG_ROOT_NFS=3Dy CONFIG_CIFS=3Dm CONFIG_CIFS_XATTR=3Dy CONFIG_CIFS_POSIX=3Dy CONFIG_NLS_CODEPAGE_437=3Dm CONFIG_NLS_ISO8859_1=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAST5=3Dm diff --git a/arch/mips/configs/maltaup_xpa_defconfig b/arch/mips/configs/ma= ltaup_xpa_defconfig index 865ae23bf11d..e660c503654e 100644 --- a/arch/mips/configs/maltaup_xpa_defconfig +++ b/arch/mips/configs/maltaup_xpa_defconfig @@ -392,11 +392,10 @@ CONFIG_NLS_ISO8859_14=3Dm CONFIG_NLS_ISO8859_15=3Dm CONFIG_NLS_KOI8_R=3Dm CONFIG_NLS_KOI8_U=3Dm CONFIG_CRYPTO_CRYPTD=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_SHA512=3Dm CONFIG_CRYPTO_WP512=3Dm diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defc= onfig index 3629afbe5d75..42a0f4f70437 100644 --- a/arch/mips/configs/mtx1_defconfig +++ b/arch/mips/configs/mtx1_defconfig @@ -624,11 +624,10 @@ CONFIG_NLS_ISO8859_14=3Dm CONFIG_NLS_ISO8859_15=3Dm CONFIG_NLS_KOI8_R=3Dm CONFIG_NLS_KOI8_U=3Dm CONFIG_NLS_UTF8=3Dm CONFIG_CRYPTO_BENCHMARK=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_de= fconfig index 7e04a6b1b4eb..291c6644035d 100644 --- a/arch/mips/configs/rm200_defconfig +++ b/arch/mips/configs/rm200_defconfig @@ -370,11 +370,10 @@ CONFIG_NLS_ISO8859_14=3Dm CONFIG_NLS_ISO8859_15=3Dm CONFIG_NLS_KOI8_R=3Dm CONFIG_NLS_KOI8_U=3Dm CONFIG_NLS_UTF8=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm diff --git a/arch/mips/configs/sb1250_swarm_defconfig b/arch/mips/configs/s= b1250_swarm_defconfig index fe8a5a3ff328..a5b66b9f6d39 100644 --- a/arch/mips/configs/sb1250_swarm_defconfig +++ b/arch/mips/configs/sb1250_swarm_defconfig @@ -78,11 +78,10 @@ CONFIG_NFS_FS=3Dy CONFIG_ROOT_NFS=3Dy CONFIG_CRYPTO_CRYPTD=3Dm CONFIG_CRYPTO_AUTHENC=3Dm CONFIG_CRYPTO_CBC=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_SHA512=3Dm diff --git a/arch/parisc/configs/generic-64bit_defconfig b/arch/parisc/conf= igs/generic-64bit_defconfig index 0503b4ef4c7a..406f8174a1d2 100644 --- a/arch/parisc/configs/generic-64bit_defconfig +++ b/arch/parisc/configs/generic-64bit_defconfig @@ -280,11 +280,10 @@ CONFIG_NLS_CODEPAGE_1251=3Dm CONFIG_NLS_ASCII=3Dm CONFIG_NLS_ISO8859_1=3Dm CONFIG_NLS_ISO8859_2=3Dm CONFIG_NLS_UTF8=3Dm CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DEFLATE=3Dm # CONFIG_CRYPTO_HW is not set CONFIG_PRINTK_TIME=3Dy diff --git a/arch/powerpc/configs/44x/akebono_defconfig b/arch/powerpc/conf= igs/44x/akebono_defconfig index 11ad5ed3cc90..bdb0e6ece6ec 100644 --- a/arch/powerpc/configs/44x/akebono_defconfig +++ b/arch/powerpc/configs/44x/akebono_defconfig @@ -122,9 +122,8 @@ CONFIG_DETECT_HUNG_TASK=3Dy CONFIG_XMON=3Dy CONFIG_XMON_DEFAULT=3Dy CONFIG_PPC_EARLY_DEBUG=3Dy CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=3D0x00010000 CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=3D0x33f -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DES=3Dy # CONFIG_CRYPTO_HW is not set diff --git a/arch/powerpc/configs/44x/bamboo_defconfig b/arch/powerpc/confi= gs/44x/bamboo_defconfig index acbce718eaa8..bfffea3a54b2 100644 --- a/arch/powerpc/configs/44x/bamboo_defconfig +++ b/arch/powerpc/configs/44x/bamboo_defconfig @@ -44,8 +44,7 @@ CONFIG_DEBUG_FS=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DETECT_HUNG_TASK=3Dy # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DES=3Dy diff --git a/arch/powerpc/configs/44x/currituck_defconfig b/arch/powerpc/co= nfigs/44x/currituck_defconfig index 7283b7d4a1a5..6d6ec5d569b1 100644 --- a/arch/powerpc/configs/44x/currituck_defconfig +++ b/arch/powerpc/configs/44x/currituck_defconfig @@ -81,9 +81,8 @@ CONFIG_XMON_DEFAULT=3Dy CONFIG_PPC_EARLY_DEBUG=3Dy CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=3D0x10000000 CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=3D0x200 CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DES=3Dy # CONFIG_CRYPTO_HW is not set diff --git a/arch/powerpc/configs/44x/ebony_defconfig b/arch/powerpc/config= s/44x/ebony_defconfig index 93d2a4e64af9..0d6f9bdf8ad3 100644 --- a/arch/powerpc/configs/44x/ebony_defconfig +++ b/arch/powerpc/configs/44x/ebony_defconfig @@ -50,9 +50,8 @@ CONFIG_ROOT_NFS=3Dy CONFIG_DEBUG_FS=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DETECT_HUNG_TASK=3Dy CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DES=3Dy # CONFIG_CRYPTO_HW is not set diff --git a/arch/powerpc/configs/44x/eiger_defconfig b/arch/powerpc/config= s/44x/eiger_defconfig index 509300f400e2..48ab405ab80b 100644 --- a/arch/powerpc/configs/44x/eiger_defconfig +++ b/arch/powerpc/configs/44x/eiger_defconfig @@ -77,11 +77,10 @@ CONFIG_CRYPTO_AUTHENC=3Dy CONFIG_CRYPTO_CCM=3Dy CONFIG_CRYPTO_GCM=3Dy CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_CTS=3Dy CONFIG_CRYPTO_LRW=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_XTS=3Dy CONFIG_CRYPTO_XCBC=3Dy CONFIG_CRYPTO_MD4=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_SHA1=3Dy diff --git a/arch/powerpc/configs/44x/fsp2_defconfig b/arch/powerpc/configs= /44x/fsp2_defconfig index 5492537f4c6c..b8b21fa15a07 100644 --- a/arch/powerpc/configs/44x/fsp2_defconfig +++ b/arch/powerpc/configs/44x/fsp2_defconfig @@ -113,9 +113,8 @@ CONFIG_DYNAMIC_DEBUG=3Dy CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DETECT_HUNG_TASK=3Dy CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DES=3Dy # CONFIG_CRYPTO_HW is not set diff --git a/arch/powerpc/configs/44x/icon_defconfig b/arch/powerpc/configs= /44x/icon_defconfig index fb9a15573546..4f7cd127dc77 100644 --- a/arch/powerpc/configs/44x/icon_defconfig +++ b/arch/powerpc/configs/44x/icon_defconfig @@ -80,8 +80,7 @@ CONFIG_NLS_ISO8859_15=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DETECT_HUNG_TASK=3Dy # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DES=3Dy diff --git a/arch/powerpc/configs/44x/iss476-smp_defconfig b/arch/powerpc/c= onfigs/44x/iss476-smp_defconfig index 0f6380e1e612..5188ec5406fd 100644 --- a/arch/powerpc/configs/44x/iss476-smp_defconfig +++ b/arch/powerpc/configs/44x/iss476-smp_defconfig @@ -60,9 +60,8 @@ CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DETECT_HUNG_TASK=3Dy CONFIG_PPC_EARLY_DEBUG=3Dy CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DES=3Dy # CONFIG_CRYPTO_HW is not set diff --git a/arch/powerpc/configs/44x/katmai_defconfig b/arch/powerpc/confi= gs/44x/katmai_defconfig index 1a0f1c3e0ee9..59622bd1327d 100644 --- a/arch/powerpc/configs/44x/katmai_defconfig +++ b/arch/powerpc/configs/44x/katmai_defconfig @@ -49,8 +49,7 @@ CONFIG_ROOT_NFS=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DETECT_HUNG_TASK=3Dy # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DES=3Dy diff --git a/arch/powerpc/configs/44x/rainier_defconfig b/arch/powerpc/conf= igs/44x/rainier_defconfig index 6dd67de06a0b..22d10c33f374 100644 --- a/arch/powerpc/configs/44x/rainier_defconfig +++ b/arch/powerpc/configs/44x/rainier_defconfig @@ -55,8 +55,7 @@ CONFIG_DETECT_HUNG_TASK=3Dy # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_PPC_EARLY_DEBUG=3Dy CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=3D0xef600300 CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DES=3Dy diff --git a/arch/powerpc/configs/44x/redwood_defconfig b/arch/powerpc/conf= igs/44x/redwood_defconfig index e28d76416537..1e883938ca11 100644 --- a/arch/powerpc/configs/44x/redwood_defconfig +++ b/arch/powerpc/configs/44x/redwood_defconfig @@ -76,11 +76,10 @@ CONFIG_CRYPTO_AUTHENC=3Dy CONFIG_CRYPTO_CCM=3Dy CONFIG_CRYPTO_GCM=3Dy CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_CTS=3Dy CONFIG_CRYPTO_LRW=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_XTS=3Dy CONFIG_CRYPTO_XCBC=3Dy CONFIG_CRYPTO_MD4=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_SHA1=3Dy diff --git a/arch/powerpc/configs/44x/sequoia_defconfig b/arch/powerpc/conf= igs/44x/sequoia_defconfig index b4984eab43eb..ce8912b406eb 100644 --- a/arch/powerpc/configs/44x/sequoia_defconfig +++ b/arch/powerpc/configs/44x/sequoia_defconfig @@ -56,8 +56,7 @@ CONFIG_DEBUG_FS=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DETECT_HUNG_TASK=3Dy # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DES=3Dy diff --git a/arch/powerpc/configs/44x/taishan_defconfig b/arch/powerpc/conf= igs/44x/taishan_defconfig index 3ea5932ab852..8263b3b7d0a1 100644 --- a/arch/powerpc/configs/44x/taishan_defconfig +++ b/arch/powerpc/configs/44x/taishan_defconfig @@ -50,8 +50,7 @@ CONFIG_DEBUG_FS=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DETECT_HUNG_TASK=3Dy # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DES=3Dy diff --git a/arch/powerpc/configs/52xx/cm5200_defconfig b/arch/powerpc/conf= igs/52xx/cm5200_defconfig index 2412a6bf7ee6..ddf1280fe295 100644 --- a/arch/powerpc/configs/52xx/cm5200_defconfig +++ b/arch/powerpc/configs/52xx/cm5200_defconfig @@ -73,6 +73,5 @@ CONFIG_NLS_CODEPAGE_437=3Dy CONFIG_NLS_ISO8859_1=3Dy CONFIG_PRINTK_TIME=3Dy CONFIG_DETECT_HUNG_TASK=3Dy # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy diff --git a/arch/powerpc/configs/52xx/motionpro_defconfig b/arch/powerpc/c= onfigs/52xx/motionpro_defconfig index 6186ead1e105..d7165dbed529 100644 --- a/arch/powerpc/configs/52xx/motionpro_defconfig +++ b/arch/powerpc/configs/52xx/motionpro_defconfig @@ -86,6 +86,5 @@ CONFIG_NLS_ISO8859_1=3Dy CONFIG_PRINTK_TIME=3Dy CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_DETECT_HUNG_TASK=3Dy # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy diff --git a/arch/powerpc/configs/52xx/tqm5200_defconfig b/arch/powerpc/con= figs/52xx/tqm5200_defconfig index 688f703d8e22..1d2d68b0f137 100644 --- a/arch/powerpc/configs/52xx/tqm5200_defconfig +++ b/arch/powerpc/configs/52xx/tqm5200_defconfig @@ -87,6 +87,5 @@ CONFIG_NLS_ISO8859_1=3Dy CONFIG_PRINTK_TIME=3Dy CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_DETECT_HUNG_TASK=3Dy # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy diff --git a/arch/powerpc/configs/83xx/asp8347_defconfig b/arch/powerpc/con= figs/83xx/asp8347_defconfig index 10192410b33c..07e00c8d6023 100644 --- a/arch/powerpc/configs/83xx/asp8347_defconfig +++ b/arch/powerpc/configs/83xx/asp8347_defconfig @@ -66,6 +66,5 @@ CONFIG_TMPFS=3Dy CONFIG_JFFS2_FS=3Dy CONFIG_NFS_FS=3Dy CONFIG_NFS_V4=3Dy CONFIG_ROOT_NFS=3Dy CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm diff --git a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig b/arch/powerpc= /configs/83xx/mpc8313_rdb_defconfig index 16a42e2267fb..140dd429278e 100644 --- a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig +++ b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig @@ -81,6 +81,5 @@ CONFIG_TMPFS=3Dy CONFIG_JFFS2_FS=3Dy CONFIG_NFS_FS=3Dy CONFIG_NFS_V4=3Dy CONFIG_ROOT_NFS=3Dy CONFIG_DETECT_HUNG_TASK=3Dy -CONFIG_CRYPTO_PCBC=3Dm diff --git a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig b/arch/powerpc= /configs/83xx/mpc8315_rdb_defconfig index 80d40ae668eb..7616771f072c 100644 --- a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig +++ b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig @@ -80,6 +80,5 @@ CONFIG_TMPFS=3Dy CONFIG_JFFS2_FS=3Dy CONFIG_NFS_FS=3Dy CONFIG_NFS_V4=3Dy CONFIG_ROOT_NFS=3Dy CONFIG_DETECT_HUNG_TASK=3Dy -CONFIG_CRYPTO_PCBC=3Dm diff --git a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig b/arch/powerpc= /configs/83xx/mpc832x_rdb_defconfig index b99caba8724a..e670d16e6fd7 100644 --- a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig +++ b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig @@ -72,6 +72,5 @@ CONFIG_ROOT_NFS=3Dy CONFIG_NLS_CODEPAGE_437=3Dy CONFIG_NLS_CODEPAGE_932=3Dy CONFIG_NLS_ISO8859_8=3Dy CONFIG_NLS_ISO8859_1=3Dy CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm diff --git a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig b/arch/powerpc= /configs/83xx/mpc834x_itx_defconfig index 11163052fdba..fcf91b52af2d 100644 --- a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig +++ b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig @@ -78,6 +78,5 @@ CONFIG_VFAT_FS=3Dy CONFIG_PROC_KCORE=3Dy CONFIG_TMPFS=3Dy CONFIG_NFS_FS=3Dy CONFIG_NFS_V4=3Dy CONFIG_ROOT_NFS=3Dy -CONFIG_CRYPTO_PCBC=3Dm diff --git a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig b/arch/power= pc/configs/83xx/mpc834x_itxgp_defconfig index 312d39e4242c..7d060b6f49ca 100644 --- a/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig +++ b/arch/powerpc/configs/83xx/mpc834x_itxgp_defconfig @@ -70,6 +70,5 @@ CONFIG_VFAT_FS=3Dy CONFIG_PROC_KCORE=3Dy CONFIG_TMPFS=3Dy CONFIG_NFS_FS=3Dy CONFIG_NFS_V4=3Dy CONFIG_ROOT_NFS=3Dy -CONFIG_CRYPTO_PCBC=3Dm diff --git a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig b/arch/powerpc= /configs/83xx/mpc837x_rdb_defconfig index ac27f99faab8..4567345aea9a 100644 --- a/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig +++ b/arch/powerpc/configs/83xx/mpc837x_rdb_defconfig @@ -74,6 +74,5 @@ CONFIG_PROC_KCORE=3Dy CONFIG_TMPFS=3Dy CONFIG_NFS_FS=3Dy CONFIG_NFS_V4=3Dy CONFIG_ROOT_NFS=3Dy CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm diff --git a/arch/powerpc/configs/amigaone_defconfig b/arch/powerpc/configs= /amigaone_defconfig index 7a515390646b..11dfd964465a 100644 --- a/arch/powerpc/configs/amigaone_defconfig +++ b/arch/powerpc/configs/amigaone_defconfig @@ -109,7 +109,6 @@ CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DEBUG_KERNEL=3Dy CONFIG_DEBUG_MUTEXES=3Dy CONFIG_XMON=3Dy CONFIG_XMON_DEFAULT=3Dy CONFIG_CRYPTO_CBC=3Dm -CONFIG_CRYPTO_PCBC=3Dm # CONFIG_CRYPTO_HW is not set diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cel= l_defconfig index 7a31b52e92e1..b5ed8945ec33 100644 --- a/arch/powerpc/configs/cell_defconfig +++ b/arch/powerpc/configs/cell_defconfig @@ -195,7 +195,6 @@ CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DEBUG_KERNEL=3Dy CONFIG_DEBUG_MUTEXES=3Dy CONFIG_XMON=3Dy CONFIG_XMON_DEFAULT=3Dy CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/c= hrp32_defconfig index 66eae5b7e16c..36662f293587 100644 --- a/arch/powerpc/configs/chrp32_defconfig +++ b/arch/powerpc/configs/chrp32_defconfig @@ -113,7 +113,6 @@ CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DEBUG_KERNEL=3Dy CONFIG_DEBUG_MUTEXES=3Dy CONFIG_XMON=3Dy CONFIG_XMON_DEFAULT=3Dy CONFIG_CRYPTO_CBC=3Dm -CONFIG_CRYPTO_PCBC=3Dm # CONFIG_CRYPTO_HW is not set diff --git a/arch/powerpc/configs/ep8248e_defconfig b/arch/powerpc/configs/= ep8248e_defconfig index 0d8d3f41f194..c3167726706d 100644 --- a/arch/powerpc/configs/ep8248e_defconfig +++ b/arch/powerpc/configs/ep8248e_defconfig @@ -62,9 +62,8 @@ CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_MAGIC_SYSRQ=3Dy # CONFIG_SCHED_DEBUG is not set CONFIG_BDI_SWITCH=3Dy CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_DES=3Dy # CONFIG_CRYPTO_HW is not set diff --git a/arch/powerpc/configs/fsl-emb-nonhw.config b/arch/powerpc/confi= gs/fsl-emb-nonhw.config index 2f81bc2d819e..391c99117ee0 100644 --- a/arch/powerpc/configs/fsl-emb-nonhw.config +++ b/arch/powerpc/configs/fsl-emb-nonhw.config @@ -17,11 +17,10 @@ CONFIG_CGROUPS=3Dy # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set CONFIG_CPUSETS=3Dy CONFIG_CRAMFS=3Dy CONFIG_CRYPTO_MD4=3Dy CONFIG_CRYPTO_NULL=3Dy -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_SHA256=3Dy CONFIG_CRYPTO_SHA512=3Dy CONFIG_DEBUG_FS=3Dy CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_DEBUG_KERNEL=3Dy diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_de= fconfig index 5ca1676e6058..04afb1594890 100644 --- a/arch/powerpc/configs/g5_defconfig +++ b/arch/powerpc/configs/g5_defconfig @@ -233,11 +233,10 @@ CONFIG_NLS_UTF8=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DEBUG_KERNEL=3Dy CONFIG_DEBUG_MUTEXES=3Dy CONFIG_BOOTX_TEXT=3Dy CONFIG_CRYPTO_BENCHMARK=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_SHA512=3Dm CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/conf= igs/linkstation_defconfig index 31f84d08b6ef..e1c1b00b0c81 100644 --- a/arch/powerpc/configs/linkstation_defconfig +++ b/arch/powerpc/configs/linkstation_defconfig @@ -126,11 +126,10 @@ CONFIG_NLS_CODEPAGE_932=3Dm CONFIG_NLS_ISO8859_1=3Dm CONFIG_NLS_UTF8=3Dm CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DEBUG_KERNEL=3Dy CONFIG_DETECT_HUNG_TASK=3Dy -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_SHA1=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_DEFLATE=3Dm diff --git a/arch/powerpc/configs/mgcoge_defconfig b/arch/powerpc/configs/m= gcoge_defconfig index f65001e7877f..a31e1184f912 100644 --- a/arch/powerpc/configs/mgcoge_defconfig +++ b/arch/powerpc/configs/mgcoge_defconfig @@ -76,7 +76,6 @@ CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_DEBUG_FS=3Dy CONFIG_MAGIC_SYSRQ=3Dy # CONFIG_SCHED_DEBUG is not set CONFIG_BDI_SWITCH=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy # CONFIG_CRYPTO_HW is not set diff --git a/arch/powerpc/configs/mpc83xx_defconfig b/arch/powerpc/configs/= mpc83xx_defconfig index a815d9e5e3e8..d603d8e93958 100644 --- a/arch/powerpc/configs/mpc83xx_defconfig +++ b/arch/powerpc/configs/mpc83xx_defconfig @@ -96,8 +96,7 @@ CONFIG_PROC_KCORE=3Dy CONFIG_TMPFS=3Dy CONFIG_NFS_FS=3Dy CONFIG_NFS_V4=3Dy CONFIG_ROOT_NFS=3Dy CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_SHA512=3Dy CONFIG_CRYPTO_DEV_TALITOS=3Dy diff --git a/arch/powerpc/configs/mvme5100_defconfig b/arch/powerpc/configs= /mvme5100_defconfig index c82754c14e15..3918768d7cd2 100644 --- a/arch/powerpc/configs/mvme5100_defconfig +++ b/arch/powerpc/configs/mvme5100_defconfig @@ -111,11 +111,10 @@ CONFIG_XZ_DEC=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DEBUG_KERNEL=3Dy CONFIG_DETECT_HUNG_TASK=3Dy CONFIG_DEFAULT_HUNG_TASK_TIMEOUT=3D20 CONFIG_CRYPTO_CBC=3Dy -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_MD5=3Dy CONFIG_CRYPTO_SHA1=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_DES=3Dy CONFIG_CRYPTO_SERPENT=3Dm diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/p= mac32_defconfig index ae45f70b29f0..728c8cabfb83 100644 --- a/arch/powerpc/configs/pmac32_defconfig +++ b/arch/powerpc/configs/pmac32_defconfig @@ -279,11 +279,10 @@ CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DEBUG_KERNEL=3Dy CONFIG_DETECT_HUNG_TASK=3Dy CONFIG_XMON=3Dy CONFIG_XMON_DEFAULT=3Dy CONFIG_BOOTX_TEXT=3Dy -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_SHA512=3Dm CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm diff --git a/arch/powerpc/configs/powernv_defconfig b/arch/powerpc/configs/= powernv_defconfig index 5d32c2767a65..2b9b46704180 100644 --- a/arch/powerpc/configs/powernv_defconfig +++ b/arch/powerpc/configs/powernv_defconfig @@ -312,11 +312,10 @@ CONFIG_PPC_EMULATED_STATS=3Dy CONFIG_CODE_PATCHING_SELFTEST=3Dy CONFIG_FTR_FIXUP_SELFTEST=3Dy CONFIG_MSI_BITMAP_SELFTEST=3Dy CONFIG_XMON=3Dy CONFIG_CRYPTO_BENCHMARK=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_SHA256=3Dy CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm diff --git a/arch/powerpc/configs/ppc44x_defconfig b/arch/powerpc/configs/p= pc44x_defconfig index 41c930f74ed4..0dc537f6aff3 100644 --- a/arch/powerpc/configs/ppc44x_defconfig +++ b/arch/powerpc/configs/ppc44x_defconfig @@ -91,8 +91,7 @@ CONFIG_ROOT_NFS=3Dy CONFIG_NLS_CODEPAGE_437=3Dm CONFIG_NLS_ISO8859_1=3Dm CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DETECT_HUNG_TASK=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy # CONFIG_CRYPTO_HW is not set CONFIG_VIRTUALIZATION=3Dy diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/pp= c64_defconfig index 6316ca4df25d..f795b74602ec 100644 --- a/arch/powerpc/configs/ppc64_defconfig +++ b/arch/powerpc/configs/ppc64_defconfig @@ -376,11 +376,10 @@ CONFIG_IMA_APPRAISE_MODSIG=3Dy CONFIG_CRYPTO_BENCHMARK=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm CONFIG_CRYPTO_CAST6=3Dm CONFIG_CRYPTO_SERPENT=3Dm CONFIG_CRYPTO_TWOFISH=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_SHA256=3Dy CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_LZO=3Dm CONFIG_CRYPTO_AES_GCM_P10=3Dm CONFIG_CRYPTO_DEV_NX=3Dy diff --git a/arch/powerpc/configs/ppc64e_defconfig b/arch/powerpc/configs/p= pc64e_defconfig index 20cc17dce94d..f365b79c7802 100644 --- a/arch/powerpc/configs/ppc64e_defconfig +++ b/arch/powerpc/configs/ppc64e_defconfig @@ -218,11 +218,10 @@ CONFIG_FTR_FIXUP_SELFTEST=3Dy CONFIG_MSI_BITMAP_SELFTEST=3Dy CONFIG_XMON=3Dy CONFIG_CRYPTO_BENCHMARK=3Dm CONFIG_CRYPTO_CCM=3Dm CONFIG_CRYPTO_GCM=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_SHA512=3Dm CONFIG_CRYPTO_WP512=3Dm CONFIG_CRYPTO_ANUBIS=3Dm CONFIG_CRYPTO_BLOWFISH=3Dm diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/p= pc6xx_defconfig index db3a8da4ccd3..00a2e003ee9f 100644 --- a/arch/powerpc/configs/ppc6xx_defconfig +++ b/arch/powerpc/configs/ppc6xx_defconfig @@ -1050,11 +1050,10 @@ CONFIG_SECURITY_SELINUX=3Dy CONFIG_SECURITY_SELINUX_BOOTPARAM=3Dy CONFIG_SECURITY_SELINUX_DISABLE=3Dy CONFIG_CRYPTO_BENCHMARK=3Dm CONFIG_CRYPTO_CTS=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_XCBC=3Dm CONFIG_CRYPTO_RMD160=3Dm CONFIG_CRYPTO_SHA1=3Dy diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_= defconfig index 7cfae0b7b2f3..22cfe85b7db7 100644 --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig @@ -143,11 +143,10 @@ CONFIG_NFS_SWAP=3Dy CONFIG_ROOT_NFS=3Dy CONFIG_CIFS=3Dm CONFIG_NLS=3Dy CONFIG_NLS_CODEPAGE_437=3Dy CONFIG_NLS_ISO8859_1=3Dy -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_LZO=3Dm CONFIG_PRINTK_TIME=3Dy CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_MAGIC_SYSRQ=3Dy CONFIG_DEBUG_MEMORY_INIT=3Dy diff --git a/arch/s390/configs/debug_defconfig b/arch/s390/configs/debug_de= fconfig index b69f626b7cce..12511bdb9579 100644 --- a/arch/s390/configs/debug_defconfig +++ b/arch/s390/configs/debug_defconfig @@ -784,11 +784,10 @@ CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_GCM=3Dy CONFIG_CRYPTO_SEQIV=3Dy CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_MD5=3Dy diff --git a/arch/s390/configs/defconfig b/arch/s390/configs/defconfig index 9ea820882fdf..9d44dd968ecc 100644 --- a/arch/s390/configs/defconfig +++ b/arch/s390/configs/defconfig @@ -768,11 +768,10 @@ CONFIG_CRYPTO_TEA=3Dm CONFIG_CRYPTO_TWOFISH=3Dm CONFIG_CRYPTO_ADIANTUM=3Dm CONFIG_CRYPTO_ARC4=3Dm CONFIG_CRYPTO_HCTR2=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_AEGIS128=3Dm CONFIG_CRYPTO_GCM=3Dy CONFIG_CRYPTO_SEQIV=3Dy CONFIG_CRYPTO_MD4=3Dm CONFIG_CRYPTO_MD5=3Dy diff --git a/arch/sh/configs/hp6xx_defconfig b/arch/sh/configs/hp6xx_defcon= fig index b6116a203a27..bdc476dcfa43 100644 --- a/arch/sh/configs/hp6xx_defconfig +++ b/arch/sh/configs/hp6xx_defconfig @@ -49,8 +49,7 @@ CONFIG_VFAT_FS=3Dy CONFIG_PROC_KCORE=3Dy CONFIG_NLS_CODEPAGE_850=3Dy CONFIG_CRYPTO=3Dy CONFIG_CRYPTO_CBC=3Dy CONFIG_CRYPTO_ECB=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_MD5=3Dy # CONFIG_CRYPTO_HW is not set diff --git a/arch/sh/configs/r7780mp_defconfig b/arch/sh/configs/r7780mp_de= fconfig index af954f75444b..7b46f62fe7db 100644 --- a/arch/sh/configs/r7780mp_defconfig +++ b/arch/sh/configs/r7780mp_defconfig @@ -99,7 +99,6 @@ CONFIG_DEBUG_FS=3Dy CONFIG_DEBUG_KERNEL=3Dy CONFIG_DETECT_HUNG_TASK=3Dy # CONFIG_DEBUG_PREEMPT is not set CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy diff --git a/arch/sh/configs/r7785rp_defconfig b/arch/sh/configs/r7785rp_de= fconfig index a66dd6d74cf1..6d2461a85f19 100644 --- a/arch/sh/configs/r7785rp_defconfig +++ b/arch/sh/configs/r7785rp_defconfig @@ -97,7 +97,6 @@ CONFIG_DEBUG_LOCKING_API_SELFTESTS=3Dy CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_SH_STANDARD_BIOS=3Dy CONFIG_DEBUG_STACK_USAGE=3Dy CONFIG_4KSTACKS=3Dy CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_HMAC=3Dy diff --git a/arch/sh/configs/se7712_defconfig b/arch/sh/configs/se7712_defc= onfig index dee1d88f6a7d..8d8a311c60b1 100644 --- a/arch/sh/configs/se7712_defconfig +++ b/arch/sh/configs/se7712_defconfig @@ -91,6 +91,5 @@ CONFIG_NFS_FS=3Dy CONFIG_ROOT_NFS=3Dy CONFIG_DEBUG_KERNEL=3Dy CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=3Dy CONFIG_FRAME_POINTER=3Dy CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm diff --git a/arch/sh/configs/sh2007_defconfig b/arch/sh/configs/sh2007_defc= onfig index 4a67f9c85806..3060bcd9cc5f 100644 --- a/arch/sh/configs/sh2007_defconfig +++ b/arch/sh/configs/sh2007_defconfig @@ -163,11 +163,10 @@ CONFIG_FRAME_POINTER=3Dy CONFIG_SH_STANDARD_BIOS=3Dy CONFIG_CRYPTO_NULL=3Dy CONFIG_CRYPTO_AUTHENC=3Dy CONFIG_CRYPTO_ECB=3Dy CONFIG_CRYPTO_LRW=3Dy -CONFIG_CRYPTO_PCBC=3Dy CONFIG_CRYPTO_XTS=3Dy CONFIG_CRYPTO_HMAC=3Dy CONFIG_CRYPTO_XCBC=3Dy CONFIG_CRYPTO_MD4=3Dy CONFIG_CRYPTO_SHA1=3Dy diff --git a/arch/sparc/configs/sparc32_defconfig b/arch/sparc/configs/spar= c32_defconfig index 48d834acafb4..d5579217fb4c 100644 --- a/arch/sparc/configs/sparc32_defconfig +++ b/arch/sparc/configs/sparc32_defconfig @@ -78,11 +78,10 @@ CONFIG_DETECT_HUNG_TASK=3Dy # CONFIG_SCHED_DEBUG is not set CONFIG_KGDB=3Dy CONFIG_KGDB_TESTS=3Dy CONFIG_CRYPTO_NULL=3Dm CONFIG_CRYPTO_ECB=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_MD4=3Dy CONFIG_CRYPTO_SHA256=3Dm CONFIG_CRYPTO_SHA512=3Dm CONFIG_CRYPTO_AES=3Dm CONFIG_CRYPTO_ARC4=3Dm diff --git a/arch/sparc/configs/sparc64_defconfig b/arch/sparc/configs/spar= c64_defconfig index c6009ebc806d..3763108c3bd4 100644 --- a/arch/sparc/configs/sparc64_defconfig +++ b/arch/sparc/configs/sparc64_defconfig @@ -204,11 +204,10 @@ CONFIG_BLK_DEV_IO_TRACE=3Dy CONFIG_UPROBE_EVENTS=3Dy CONFIG_KEYS=3Dy CONFIG_CRYPTO_NULL=3Dm CONFIG_CRYPTO_BENCHMARK=3Dm CONFIG_CRYPTO_LRW=3Dm -CONFIG_CRYPTO_PCBC=3Dm CONFIG_CRYPTO_XTS=3Dm CONFIG_CRYPTO_XCBC=3Dy CONFIG_CRYPTO_MD4=3Dy CONFIG_CRYPTO_SHA256=3Dm CONFIG_CRYPTO_SHA512=3Dm diff --git a/crypto/Kconfig b/crypto/Kconfig index 0727cd5877da..f8d5801a4d5e 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig @@ -701,19 +701,10 @@ config CRYPTO_LRW The first 128, 192 or 256 bits in the key are used for AES and the rest is used to tie each cipher block to its logical position. =20 See https://people.csail.mit.edu/rivest/pubs/LRW02.pdf =20 -config CRYPTO_PCBC - tristate "PCBC (Propagating Cipher Block Chaining)" - select CRYPTO_SKCIPHER - select CRYPTO_MANAGER - help - PCBC (Propagating Cipher Block Chaining) mode - - This block cipher mode is required for RxRPC. - config CRYPTO_XCTR tristate select CRYPTO_SKCIPHER select CRYPTO_MANAGER help diff --git a/crypto/Makefile b/crypto/Makefile index 1827f84192e6..9081ed10ce61 100644 --- a/crypto/Makefile +++ b/crypto/Makefile @@ -87,11 +87,10 @@ obj-$(CONFIG_CRYPTO_STREEBOG) +=3D streebog_generic.o obj-$(CONFIG_CRYPTO_WP512) +=3D wp512.o CFLAGS_wp512.o :=3D $(call cc-option,-fno-schedule-insns) # https://gcc.g= nu.org/bugzilla/show_bug.cgi?id=3D79149 obj-$(CONFIG_CRYPTO_BLAKE2B) +=3D blake2b.o obj-$(CONFIG_CRYPTO_ECB) +=3D ecb.o obj-$(CONFIG_CRYPTO_CBC) +=3D cbc.o -obj-$(CONFIG_CRYPTO_PCBC) +=3D pcbc.o obj-$(CONFIG_CRYPTO_CTS) +=3D cts.o obj-$(CONFIG_CRYPTO_LRW) +=3D lrw.o obj-$(CONFIG_CRYPTO_XTS) +=3D xts.o obj-$(CONFIG_CRYPTO_CTR) +=3D ctr.o obj-$(CONFIG_CRYPTO_XCTR) +=3D xctr.o diff --git a/crypto/pcbc.c b/crypto/pcbc.c deleted file mode 100644 index d092717ea4fc..000000000000 --- a/crypto/pcbc.c +++ /dev/null @@ -1,195 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later -/* - * PCBC: Propagating Cipher Block Chaining mode - * - * Copyright (C) 2006 Red Hat, Inc. All Rights Reserved. - * Written by David Howells (dhowells@redhat.com) - * - * Derived from cbc.c - * - Copyright (c) 2006 Herbert Xu - */ - -#include -#include -#include -#include -#include -#include -#include - -static int crypto_pcbc_encrypt_segment(struct skcipher_request *req, - struct skcipher_walk *walk, - struct crypto_cipher *tfm) -{ - int bsize =3D crypto_cipher_blocksize(tfm); - const u8 *src =3D walk->src.virt.addr; - unsigned int nbytes =3D walk->nbytes; - u8 *dst =3D walk->dst.virt.addr; - u8 * const iv =3D walk->iv; - - do { - crypto_xor(iv, src, bsize); - crypto_cipher_encrypt_one(tfm, dst, iv); - crypto_xor_cpy(iv, dst, src, bsize); - - src +=3D bsize; - dst +=3D bsize; - } while ((nbytes -=3D bsize) >=3D bsize); - - return nbytes; -} - -static int crypto_pcbc_encrypt_inplace(struct skcipher_request *req, - struct skcipher_walk *walk, - struct crypto_cipher *tfm) -{ - int bsize =3D crypto_cipher_blocksize(tfm); - unsigned int nbytes =3D walk->nbytes; - u8 *dst =3D walk->dst.virt.addr; - u8 * const iv =3D walk->iv; - u8 tmpbuf[MAX_CIPHER_BLOCKSIZE]; - - do { - memcpy(tmpbuf, dst, bsize); - crypto_xor(iv, dst, bsize); - crypto_cipher_encrypt_one(tfm, dst, iv); - crypto_xor_cpy(iv, tmpbuf, dst, bsize); - - dst +=3D bsize; - } while ((nbytes -=3D bsize) >=3D bsize); - - return nbytes; -} - -static int crypto_pcbc_encrypt(struct skcipher_request *req) -{ - struct crypto_skcipher *tfm =3D crypto_skcipher_reqtfm(req); - struct crypto_cipher *cipher =3D skcipher_cipher_simple(tfm); - struct skcipher_walk walk; - unsigned int nbytes; - int err; - - err =3D skcipher_walk_virt(&walk, req, false); - - while (walk.nbytes) { - if (walk.src.virt.addr =3D=3D walk.dst.virt.addr) - nbytes =3D crypto_pcbc_encrypt_inplace(req, &walk, - cipher); - else - nbytes =3D crypto_pcbc_encrypt_segment(req, &walk, - cipher); - err =3D skcipher_walk_done(&walk, nbytes); - } - - return err; -} - -static int crypto_pcbc_decrypt_segment(struct skcipher_request *req, - struct skcipher_walk *walk, - struct crypto_cipher *tfm) -{ - int bsize =3D crypto_cipher_blocksize(tfm); - const u8 *src =3D walk->src.virt.addr; - unsigned int nbytes =3D walk->nbytes; - u8 *dst =3D walk->dst.virt.addr; - u8 * const iv =3D walk->iv; - - do { - crypto_cipher_decrypt_one(tfm, dst, src); - crypto_xor(dst, iv, bsize); - crypto_xor_cpy(iv, dst, src, bsize); - - src +=3D bsize; - dst +=3D bsize; - } while ((nbytes -=3D bsize) >=3D bsize); - - return nbytes; -} - -static int crypto_pcbc_decrypt_inplace(struct skcipher_request *req, - struct skcipher_walk *walk, - struct crypto_cipher *tfm) -{ - int bsize =3D crypto_cipher_blocksize(tfm); - unsigned int nbytes =3D walk->nbytes; - u8 *dst =3D walk->dst.virt.addr; - u8 * const iv =3D walk->iv; - u8 tmpbuf[MAX_CIPHER_BLOCKSIZE] __aligned(__alignof__(u32)); - - do { - memcpy(tmpbuf, dst, bsize); - crypto_cipher_decrypt_one(tfm, dst, dst); - crypto_xor(dst, iv, bsize); - crypto_xor_cpy(iv, dst, tmpbuf, bsize); - - dst +=3D bsize; - } while ((nbytes -=3D bsize) >=3D bsize); - - return nbytes; -} - -static int crypto_pcbc_decrypt(struct skcipher_request *req) -{ - struct crypto_skcipher *tfm =3D crypto_skcipher_reqtfm(req); - struct crypto_cipher *cipher =3D skcipher_cipher_simple(tfm); - struct skcipher_walk walk; - unsigned int nbytes; - int err; - - err =3D skcipher_walk_virt(&walk, req, false); - - while (walk.nbytes) { - if (walk.src.virt.addr =3D=3D walk.dst.virt.addr) - nbytes =3D crypto_pcbc_decrypt_inplace(req, &walk, - cipher); - else - nbytes =3D crypto_pcbc_decrypt_segment(req, &walk, - cipher); - err =3D skcipher_walk_done(&walk, nbytes); - } - - return err; -} - -static int crypto_pcbc_create(struct crypto_template *tmpl, struct rtattr = **tb) -{ - struct skcipher_instance *inst; - int err; - - inst =3D skcipher_alloc_instance_simple(tmpl, tb); - if (IS_ERR(inst)) - return PTR_ERR(inst); - - inst->alg.encrypt =3D crypto_pcbc_encrypt; - inst->alg.decrypt =3D crypto_pcbc_decrypt; - - err =3D skcipher_register_instance(tmpl, inst); - if (err) - inst->free(inst); - - return err; -} - -static struct crypto_template crypto_pcbc_tmpl =3D { - .name =3D "pcbc", - .create =3D crypto_pcbc_create, - .module =3D THIS_MODULE, -}; - -static int __init crypto_pcbc_module_init(void) -{ - return crypto_register_template(&crypto_pcbc_tmpl); -} - -static void __exit crypto_pcbc_module_exit(void) -{ - crypto_unregister_template(&crypto_pcbc_tmpl); -} - -module_init(crypto_pcbc_module_init); -module_exit(crypto_pcbc_module_exit); - -MODULE_LICENSE("GPL"); -MODULE_DESCRIPTION("PCBC block cipher mode of operation"); -MODULE_ALIAS_CRYPTO("pcbc"); -MODULE_IMPORT_NS("CRYPTO_INTERNAL"); --=20 2.54.0