]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
crypto: crct10dif - remove from crypto API
authorEric Biggers <ebiggers@google.com>
Thu, 6 Feb 2025 17:38:57 +0000 (09:38 -0800)
committerEric Biggers <ebiggers@google.com>
Sun, 9 Feb 2025 04:06:30 +0000 (20:06 -0800)
Remove the "crct10dif" shash algorithm from the crypto API.  It has no
known user now that the lib is no longer built on top of it.  It has no
remaining references in kernel code.  The only other potential users
would be the usual components that allow specifying arbitrary hash
algorithms by name, namely AF_ALG and dm-integrity.   However there are
no indications that "crct10dif" is being used with these components.
Debian Code Search and web searches don't find anything relevant, and
explicitly grepping the source code of the usual suspects (cryptsetup,
libell, iwd) finds no matches either.  "crc32" and "crc32c" are used in
a few more places, but that doesn't seem to be the case for "crct10dif".

crc_t10dif_update() is also tested by crc_kunit now, so the test
coverage provided via the crypto self-tests is no longer needed.

Also note that the "crct10dif" shash algorithm was inconsistent with the
rest of the shash API in that it wrote the digest in CPU endianness,
making the resulting byte array differ on little endian vs. big endian
platforms.  This means it was effectively just built for use by the lib
functions, and it was not actually correct to treat it as "just another
hash function" that could be dropped in via the shash API.

Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: "Martin K. Petersen" <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20250206173857.39794-1-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
arch/mips/configs/decstation_64_defconfig
arch/mips/configs/decstation_defconfig
arch/mips/configs/decstation_r4k_defconfig
crypto/Kconfig
crypto/Makefile
crypto/crct10dif_generic.c [deleted file]
crypto/tcrypt.c
crypto/testmgr.c
crypto/testmgr.h
include/linux/crc-t10dif.h
tools/testing/selftests/arm64/fp/kernel-test.c

index da51b9731db0e80408538381aeac14ae35bb2744..9655567614aa28d80e553ff15404747dccf62f44 100644 (file)
@@ -180,7 +180,6 @@ CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_CMAC=m
 CONFIG_CRYPTO_XCBC=m
 CONFIG_CRYPTO_CRC32=m
-CONFIG_CRYPTO_CRCT10DIF=m
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
index 424e3f011fc2a615bcecd64cf239a05eef91924a..1539fe8eb34d0cae1c71281cf3ea8b54804fe2f8 100644 (file)
@@ -175,7 +175,6 @@ CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_CMAC=m
 CONFIG_CRYPTO_XCBC=m
 CONFIG_CRYPTO_CRC32=m
-CONFIG_CRYPTO_CRCT10DIF=m
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
index cfc8bf7917924a8cf55ac0152924095d8dc2e0c6..58c36720c94a4aef8b368535f3ada39b9a342379 100644 (file)
@@ -175,7 +175,6 @@ CONFIG_CRYPTO_XTS=m
 CONFIG_CRYPTO_CMAC=m
 CONFIG_CRYPTO_XCBC=m
 CONFIG_CRYPTO_CRC32=m
-CONFIG_CRYPTO_CRCT10DIF=m
 CONFIG_CRYPTO_MD4=m
 CONFIG_CRYPTO_MICHAEL_MIC=m
 CONFIG_CRYPTO_RMD160=m
index 9ffb59b1aac3bf11b9b4b9787d78c89edac00def..b8a436edf4c3cd9584ecabef3ab1afa2d8697259 100644 (file)
@@ -1081,15 +1081,6 @@ config CRYPTO_CRC32
 
          Used by RoCEv2 and f2fs.
 
-config CRYPTO_CRCT10DIF
-       tristate "CRCT10DIF"
-       select CRYPTO_HASH
-       select CRC_T10DIF
-       help
-         CRC16 CRC algorithm used for the T10 (SCSI) Data Integrity Field (DIF)
-
-         CRC algorithm used by the SCSI Block Commands standard.
-
 endmenu
 
 menu "Compression"
index d3b79b8c902229ab90640e16c6438f8aab431879..2f7d64eeb0080ce3a1d0bcb002fb680581660c8d 100644 (file)
@@ -155,8 +155,6 @@ obj-$(CONFIG_CRYPTO_CRC32C) += crc32c_generic.o
 obj-$(CONFIG_CRYPTO_CRC32) += crc32_generic.o
 CFLAGS_crc32c_generic.o += -DARCH=$(ARCH)
 CFLAGS_crc32_generic.o += -DARCH=$(ARCH)
-obj-$(CONFIG_CRYPTO_CRCT10DIF) += crct10dif_generic.o
-CFLAGS_crct10dif_generic.o += -DARCH=$(ARCH)
 obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o authencesn.o
 obj-$(CONFIG_CRYPTO_LZO) += lzo.o lzo-rle.o
 obj-$(CONFIG_CRYPTO_LZ4) += lz4.o
diff --git a/crypto/crct10dif_generic.c b/crypto/crct10dif_generic.c
deleted file mode 100644 (file)
index 259cb01..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Cryptographic API.
- *
- * T10 Data Integrity Field CRC16 Crypto Transform
- *
- * Copyright (c) 2007 Oracle Corporation.  All rights reserved.
- * Written by Martin K. Petersen <martin.petersen@oracle.com>
- * Copyright (C) 2013 Intel Corporation
- * Author: Tim Chen <tim.c.chen@linux.intel.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.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
- */
-
-#include <linux/module.h>
-#include <linux/crc-t10dif.h>
-#include <crypto/internal/hash.h>
-#include <linux/init.h>
-#include <linux/kernel.h>
-
-struct chksum_desc_ctx {
-       __u16 crc;
-};
-
-/*
- * Steps through buffer one byte at a time, calculates reflected
- * crc using table.
- */
-
-static int chksum_init(struct shash_desc *desc)
-{
-       struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
-
-       ctx->crc = 0;
-
-       return 0;
-}
-
-static int chksum_update(struct shash_desc *desc, const u8 *data,
-                        unsigned int length)
-{
-       struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
-
-       ctx->crc = crc_t10dif_generic(ctx->crc, data, length);
-       return 0;
-}
-
-static int chksum_update_arch(struct shash_desc *desc, const u8 *data,
-                             unsigned int length)
-{
-       struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
-
-       ctx->crc = crc_t10dif_update(ctx->crc, data, length);
-       return 0;
-}
-
-static int chksum_final(struct shash_desc *desc, u8 *out)
-{
-       struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
-
-       *(__u16 *)out = ctx->crc;
-       return 0;
-}
-
-static int __chksum_finup(__u16 crc, const u8 *data, unsigned int len, u8 *out)
-{
-       *(__u16 *)out = crc_t10dif_generic(crc, data, len);
-       return 0;
-}
-
-static int __chksum_finup_arch(__u16 crc, const u8 *data, unsigned int len,
-                              u8 *out)
-{
-       *(__u16 *)out = crc_t10dif_update(crc, data, len);
-       return 0;
-}
-
-static int chksum_finup(struct shash_desc *desc, const u8 *data,
-                       unsigned int len, u8 *out)
-{
-       struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
-
-       return __chksum_finup(ctx->crc, data, len, out);
-}
-
-static int chksum_finup_arch(struct shash_desc *desc, const u8 *data,
-                            unsigned int len, u8 *out)
-{
-       struct chksum_desc_ctx *ctx = shash_desc_ctx(desc);
-
-       return __chksum_finup_arch(ctx->crc, data, len, out);
-}
-
-static int chksum_digest(struct shash_desc *desc, const u8 *data,
-                        unsigned int length, u8 *out)
-{
-       return __chksum_finup(0, data, length, out);
-}
-
-static int chksum_digest_arch(struct shash_desc *desc, const u8 *data,
-                             unsigned int length, u8 *out)
-{
-       return __chksum_finup_arch(0, data, length, out);
-}
-
-static struct shash_alg algs[] = {{
-       .digestsize             = CRC_T10DIF_DIGEST_SIZE,
-       .init                   = chksum_init,
-       .update                 = chksum_update,
-       .final                  = chksum_final,
-       .finup                  = chksum_finup,
-       .digest                 = chksum_digest,
-       .descsize               = sizeof(struct chksum_desc_ctx),
-       .base.cra_name          = "crct10dif",
-       .base.cra_driver_name   = "crct10dif-generic",
-       .base.cra_priority      = 100,
-       .base.cra_blocksize     = CRC_T10DIF_BLOCK_SIZE,
-       .base.cra_module        = THIS_MODULE,
-}, {
-       .digestsize             = CRC_T10DIF_DIGEST_SIZE,
-       .init                   = chksum_init,
-       .update                 = chksum_update_arch,
-       .final                  = chksum_final,
-       .finup                  = chksum_finup_arch,
-       .digest                 = chksum_digest_arch,
-       .descsize               = sizeof(struct chksum_desc_ctx),
-       .base.cra_name          = "crct10dif",
-       .base.cra_driver_name   = "crct10dif-" __stringify(ARCH),
-       .base.cra_priority      = 150,
-       .base.cra_blocksize     = CRC_T10DIF_BLOCK_SIZE,
-       .base.cra_module        = THIS_MODULE,
-}};
-
-static int num_algs;
-
-static int __init crct10dif_mod_init(void)
-{
-       /* register the arch flavor only if it differs from the generic one */
-       num_algs = 1 + crc_t10dif_is_optimized();
-
-       return crypto_register_shashes(algs, num_algs);
-}
-
-static void __exit crct10dif_mod_fini(void)
-{
-       crypto_unregister_shashes(algs, num_algs);
-}
-
-subsys_initcall(crct10dif_mod_init);
-module_exit(crct10dif_mod_fini);
-
-MODULE_AUTHOR("Tim Chen <tim.c.chen@linux.intel.com>");
-MODULE_DESCRIPTION("T10 DIF CRC calculation.");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS_CRYPTO("crct10dif");
-MODULE_ALIAS_CRYPTO("crct10dif-generic");
index e1a74cb2cfbe4eae3bfbb90c1f82b8e48a0971cc..879fc21dcc166278073f2a797f8c0d1f0b77db7f 100644 (file)
@@ -1654,10 +1654,6 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
                ret = min(ret, tcrypt_test("ghash"));
                break;
 
-       case 47:
-               ret = min(ret, tcrypt_test("crct10dif"));
-               break;
-
        case 48:
                ret = min(ret, tcrypt_test("sha3-224"));
                break;
@@ -2272,10 +2268,6 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
                test_hash_speed("crc32c", sec, generic_hash_speed_template);
                if (mode > 300 && mode < 400) break;
                fallthrough;
-       case 320:
-               test_hash_speed("crct10dif", sec, generic_hash_speed_template);
-               if (mode > 300 && mode < 400) break;
-               fallthrough;
        case 321:
                test_hash_speed("poly1305", sec, poly1305_speed_template);
                if (mode > 300 && mode < 400) break;
index 0c1c3a6453b6a9901fd7af0cf45e0c3a7b94aafd..1e42582bc7f119f959e8e9ddfaa8722654701b7c 100644 (file)
@@ -4759,13 +4759,6 @@ static const struct alg_test_desc alg_test_descs[] = {
                .suite = {
                        .hash = __VECS(crc32c_tv_template)
                }
-       }, {
-               .alg = "crct10dif",
-               .test = alg_test_hash,
-               .fips_allowed = 1,
-               .suite = {
-                       .hash = __VECS(crct10dif_tv_template)
-               }
        }, {
                .alg = "ctr(aes)",
                .test = alg_test_skcipher,
index 61c7ae73105285d1d000e6c043f6cfbcd41e15ac..d3a99d15a3e57ef122323eb77fc960de2beb0c4e 100644 (file)
@@ -6017,294 +6017,6 @@ static const struct hash_testvec rmd160_tv_template[] = {
        }
 };
 
-static const struct hash_testvec crct10dif_tv_template[] = {
-       {
-               .plaintext      = "abc",
-               .psize          = 3,
-               .digest         = (u8 *)(u16 []){ 0x443b },
-       }, {
-               .plaintext      = "1234567890123456789012345678901234567890"
-                                 "123456789012345678901234567890123456789",
-               .psize          = 79,
-               .digest         = (u8 *)(u16 []){ 0x4b70 },
-       }, {
-               .plaintext      = "abcdddddddddddddddddddddddddddddddddddddddd"
-                                 "ddddddddddddd",
-               .psize          = 56,
-               .digest         = (u8 *)(u16 []){ 0x9ce3 },
-       }, {
-               .plaintext      = "1234567890123456789012345678901234567890"
-                                 "1234567890123456789012345678901234567890"
-                                 "1234567890123456789012345678901234567890"
-                                 "1234567890123456789012345678901234567890"
-                                 "1234567890123456789012345678901234567890"
-                                 "1234567890123456789012345678901234567890"
-                                 "1234567890123456789012345678901234567890"
-                                 "123456789012345678901234567890123456789",
-               .psize          = 319,
-               .digest         = (u8 *)(u16 []){ 0x44c6 },
-       }, {
-               .plaintext =    "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
-                               "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
-                               "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
-                               "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
-                               "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
-                               "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
-                               "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
-                               "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
-                               "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
-                               "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
-                               "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
-                               "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
-                               "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
-                               "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
-                               "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
-                               "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
-                               "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
-                               "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
-                               "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
-                               "\x58\xef\x63\xfa\x91\x05\x9c\x33"
-                               "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
-                               "\x19\xb0\x47\xde\x52\xe9\x80\x17"
-                               "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
-                               "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
-                               "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
-                               "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
-                               "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
-                               "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
-                               "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
-                               "\x86\x1d\x91\x28\xbf\x33\xca\x61"
-                               "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
-                               "\x47\xde\x75\x0c\x80\x17\xae\x22"
-                               "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
-                               "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
-                               "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
-                               "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
-                               "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
-                               "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
-                               "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
-                               "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
-                               "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
-                               "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
-                               "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
-                               "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
-                               "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
-                               "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
-                               "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
-                               "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
-                               "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
-                               "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
-                               "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
-                               "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
-                               "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
-                               "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
-                               "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
-                               "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
-                               "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
-                               "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
-                               "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
-                               "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
-                               "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
-                               "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
-                               "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
-                               "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
-                               "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
-                               "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
-                               "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
-                               "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
-                               "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
-                               "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
-                               "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
-                               "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
-                               "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
-                               "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
-                               "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
-                               "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
-                               "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
-                               "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
-                               "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
-                               "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
-                               "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
-                               "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
-                               "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
-                               "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
-                               "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
-                               "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
-                               "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
-                               "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
-                               "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
-                               "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
-                               "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
-                               "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
-                               "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
-                               "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
-                               "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
-                               "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
-                               "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
-                               "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
-                               "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
-                               "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
-                               "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
-                               "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
-                               "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
-                               "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
-                               "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
-                               "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
-                               "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
-                               "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
-                               "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
-                               "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
-                               "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
-                               "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
-                               "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
-                               "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
-                               "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
-                               "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
-                               "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
-                               "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
-                               "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
-                               "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
-                               "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
-                               "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
-                               "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
-                               "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
-                               "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
-                               "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
-                               "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
-                               "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
-                               "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
-                               "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
-                               "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
-                               "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
-                               "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
-                               "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
-                               "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
-                               "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
-                               "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
-                               "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
-                               "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
-                               "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
-                               "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
-                               "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
-                               "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
-                               "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
-                               "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
-                               "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
-                               "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
-                               "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
-                               "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
-                               "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
-                               "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
-                               "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
-                               "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
-                               "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
-                               "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
-                               "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
-                               "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
-                               "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
-                               "\x47\xde\x52\xe9\x80\x17\x8b\x22"
-                               "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
-                               "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
-                               "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
-                               "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
-                               "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
-                               "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
-                               "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
-                               "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
-                               "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
-                               "\x75\x0c\x80\x17\xae\x22\xb9\x50"
-                               "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
-                               "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
-                               "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
-                               "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
-                               "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
-                               "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
-                               "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
-                               "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
-                               "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
-                               "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
-                               "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
-                               "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
-                               "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
-                               "\x48\xdf\x53\xea\x81\x18\x8c\x23"
-                               "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
-                               "\x09\xa0\x37\xce\x42\xd9\x70\x07"
-                               "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
-                               "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
-                               "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
-                               "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
-                               "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
-                               "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
-                               "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
-                               "\x76\x0d\x81\x18\xaf\x23\xba\x51"
-                               "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
-                               "\x37\xce\x65\xfc\x70\x07\x9e\x12"
-                               "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
-                               "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
-                               "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
-                               "\xff\x73\x0a\xa1\x15\xac\x43\xda"
-                               "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
-                               "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
-                               "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
-                               "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
-                               "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
-                               "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
-                               "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
-                               "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
-                               "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
-                               "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
-                               "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
-                               "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
-                               "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
-                               "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
-                               "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
-                               "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
-                               "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
-                               "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
-                               "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
-                               "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
-                               "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
-                               "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
-                               "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
-                               "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
-                               "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
-                               "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
-                               "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
-                               "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
-                               "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
-                               "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
-                               "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
-                               "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
-                               "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
-                               "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
-                               "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
-                               "\xef\x86\x1d\x91\x28\xbf\x33\xca"
-                               "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
-                               "\xd3\x47\xde\x75\x0c\x80\x17\xae"
-                               "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
-                               "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
-                               "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
-                               "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
-                               "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
-                               "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
-                               "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
-                               "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
-                               "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
-                               "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
-                               "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
-                               "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
-                               "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
-                               "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
-                               "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
-                               "\x67\xfe\x95\x09\xa0\x37\xce\x42"
-                               "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
-                               "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
-                               "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
-               .psize = 2048,
-               .digest         = (u8 *)(u16 []){ 0x23ca },
-       }
-};
-
 /*
  * Streebog test vectors from RFC 6986 and GOST R 34.11-2012
  */
index 16787c1cee21c65588dad2e7508065a400ee1b76..d0706544fc11f6bd41d545b22de69b8cc1541eab 100644 (file)
@@ -4,9 +4,6 @@
 
 #include <linux/types.h>
 
-#define CRC_T10DIF_DIGEST_SIZE 2
-#define CRC_T10DIF_BLOCK_SIZE 1
-
 u16 crc_t10dif_arch(u16 crc, const u8 *p, size_t len);
 u16 crc_t10dif_generic(u16 crc, const u8 *p, size_t len);
 
index 348e8bef62c7a0fc8225ccec6d881c7db0231626..e3cec3723ffa967c1570668a0b73085d0d9a4c8f 100644 (file)
@@ -46,7 +46,6 @@ static void handle_kick_signal(int sig, siginfo_t *info, void *context)
 }
 
 static char *drivers[] = {
-       "crct10dif-arm64",
        "sha1-ce",
        "sha224-arm64",
        "sha224-arm64-neon",