Skip to content

Commit 0fcec0b

Browse files
committed
crypto: crc64-rocksoft - remove from crypto API
Remove crc64-rocksoft from the crypto API. It has no known user now that the lib is no longer built on top of it. It was also added much more recently than the longstanding crc32 and crc32c. Unlike crc32 and crc32c, crc64-rocksoft is also not mentioned in the dm-integrity documentation and there are no references to it in anywhere in the cryptsetup git repo, so it is unlikely to have any user there either. Also, this CRC variant is named incorrectly; it has nothing to do with Rocksoft and should be called crc64-nvme. That is yet another reason to remove it from the crypto API; we would not want anyone to start depending on the current incorrect algorithm name of crc64-rocksoft. Note that this change temporarily makes this CRC variant not be covered by any tests, as previously it was relying on the crypto self-tests. This will be fixed by adding this CRC variant to crc_kunit. Reviewed-by: Ard Biesheuvel <[email protected]> Reviewed-by: "Martin K. Petersen" <[email protected]> Acked-by: Keith Busch <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Eric Biggers <[email protected]>
1 parent feb541b commit 0fcec0b

File tree

6 files changed

+0
-125
lines changed

6 files changed

+0
-125
lines changed

crypto/Kconfig

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,17 +1090,6 @@ config CRYPTO_CRCT10DIF
10901090

10911091
CRC algorithm used by the SCSI Block Commands standard.
10921092

1093-
config CRYPTO_CRC64_ROCKSOFT
1094-
tristate "CRC64 based on Rocksoft Model algorithm"
1095-
depends on CRC64
1096-
select CRYPTO_HASH
1097-
help
1098-
CRC64 CRC algorithm based on the Rocksoft Model CRC Algorithm
1099-
1100-
Used by the NVMe implementation of T10 DIF (BLK_DEV_INTEGRITY)
1101-
1102-
See https://zlib.net/crc_v3.txt
1103-
11041093
endmenu
11051094

11061095
menu "Compression"

crypto/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ CFLAGS_crc32c_generic.o += -DARCH=$(ARCH)
157157
CFLAGS_crc32_generic.o += -DARCH=$(ARCH)
158158
obj-$(CONFIG_CRYPTO_CRCT10DIF) += crct10dif_generic.o
159159
CFLAGS_crct10dif_generic.o += -DARCH=$(ARCH)
160-
obj-$(CONFIG_CRYPTO_CRC64_ROCKSOFT) += crc64_rocksoft_generic.o
161160
obj-$(CONFIG_CRYPTO_AUTHENC) += authenc.o authencesn.o
162161
obj-$(CONFIG_CRYPTO_LZO) += lzo.o lzo-rle.o
163162
obj-$(CONFIG_CRYPTO_LZ4) += lz4.o

crypto/crc64_rocksoft_generic.c

Lines changed: 0 additions & 89 deletions
This file was deleted.

crypto/testmgr.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4759,13 +4759,6 @@ static const struct alg_test_desc alg_test_descs[] = {
47594759
.suite = {
47604760
.hash = __VECS(crc32c_tv_template)
47614761
}
4762-
}, {
4763-
.alg = "crc64-rocksoft",
4764-
.test = alg_test_hash,
4765-
.fips_allowed = 1,
4766-
.suite = {
4767-
.hash = __VECS(crc64_rocksoft_tv_template)
4768-
}
47694762
}, {
47704763
.alg = "crct10dif",
47714764
.test = alg_test_hash,

crypto/testmgr.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6017,21 +6017,6 @@ static const struct hash_testvec rmd160_tv_template[] = {
60176017
}
60186018
};
60196019

6020-
static const u8 zeroes[4096] = { [0 ... 4095] = 0 };
6021-
static const u8 ones[4096] = { [0 ... 4095] = 0xff };
6022-
6023-
static const struct hash_testvec crc64_rocksoft_tv_template[] = {
6024-
{
6025-
.plaintext = zeroes,
6026-
.psize = 4096,
6027-
.digest = "\x4e\xb6\x22\xeb\x67\xd3\x82\x64",
6028-
}, {
6029-
.plaintext = ones,
6030-
.psize = 4096,
6031-
.digest = "\xac\xa3\xec\x02\x73\xba\xdd\xc0",
6032-
}
6033-
};
6034-
60356020
static const struct hash_testvec crct10dif_tv_template[] = {
60366021
{
60376022
.plaintext = "abc",

include/linux/crc64.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
#include <linux/types.h>
99

10-
#define CRC64_ROCKSOFT_STRING "crc64-rocksoft"
11-
1210
u64 __pure crc64_be(u64 crc, const void *p, size_t len);
1311
u64 __pure crc64_rocksoft_generic(u64 crc, const void *p, size_t len);
1412

0 commit comments

Comments
 (0)