Skip to contentSkip to conversation

crypto: tcrypt - Remove unused poly1305 support

PATCH In review Eric Biggers 3 participants 3 messages Nov 14, 2025 – Nov 22, 2025 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: tcrypt - Remove unused poly1305 support

Since the crypto_shash support for poly1305 was removed, the tcrypt support for it is now unused as well. Support for benchmarking the kernel's Poly1305 code is now provided by the poly1305 kunit test.

---

This patch is targeting cryptodev/master

 crypto/tcrypt.c |  4 ----
 crypto/tcrypt.h | 18 ------------------
 2 files changed, 22 deletions(-)
crypto/tcrypt.c +0 -4
index d1d88debbd71..3baff6bfb9d1 100644
@@ -2266,14 +2266,10 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
 		fallthrough;
 	case 319:
 		test_hash_speed("crc32c", 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;
-		fallthrough;
 	case 322:
 		test_hash_speed("sha3-224", sec, generic_hash_speed_template);
 		if (mode > 300 && mode < 400) break;
 		fallthrough;
 	case 323:
crypto/tcrypt.h +0 -18
index 7f938ac93e58..85c3f77bcfb4 100644
@@ -94,24 +94,6 @@ static struct hash_speed generic_hash_speed_template[] = {
 
 	/* End marker */
 	{  .blen = 0,	.plen = 0, }
 };
 
-static struct hash_speed poly1305_speed_template[] = {
-	{ .blen = 96,	.plen = 16, },
-	{ .blen = 96,	.plen = 32, },
-	{ .blen = 96,	.plen = 96, },
-	{ .blen = 288,	.plen = 16, },
-	{ .blen = 288,	.plen = 32, },
-	{ .blen = 288,	.plen = 288, },
-	{ .blen = 1056,	.plen = 32, },
-	{ .blen = 1056,	.plen = 1056, },
-	{ .blen = 2080,	.plen = 32, },
-	{ .blen = 2080,	.plen = 2080, },
-	{ .blen = 4128,	.plen = 4128, },
-	{ .blen = 8224,	.plen = 8224, },
-
-	/* End marker */
-	{  .blen = 0,	.plen = 0, }
-};
-
 #endif	/* _CRYPTO_TCRYPT_H */

base-commit: d633730bb3873578a00fde4b97f9ac62a1be8d34

Signature · 1 line
2.51.2
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Eric Biggers

Since the crypto_shash support for poly1305 was removed, the tcrypt support for it is now unused as well. Support for benchmarking the kernel's Poly1305 code is now provided by the poly1305 kunit test.

Quoted 62 lines

---

This patch is targeting cryptodev/master

 crypto/tcrypt.c |  4 ----
 crypto/tcrypt.h | 18 ------------------
 2 files changed, 22 deletions(-)
crypto/tcrypt.c +0 -4
index d1d88debbd71..3baff6bfb9d1 100644
@@ -2266,14 +2266,10 @@ static int do_test(const char *alg, u32 type, u32 mask, int m, u32 num_mb)
                fallthrough;
        case 319:
                test_hash_speed("crc32c", 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;
-               fallthrough;
        case 322:
                test_hash_speed("sha3-224", sec, generic_hash_speed_template);
                if (mode > 300 && mode < 400) break;
                fallthrough;
        case 323:
crypto/tcrypt.h +0 -18
index 7f938ac93e58..85c3f77bcfb4 100644
@@ -94,24 +94,6 @@ static struct hash_speed generic_hash_speed_template[] = {
 
        /* End marker */
        {  .blen = 0,   .plen = 0, }
 };
 
-static struct hash_speed poly1305_speed_template[] = {
-       { .blen = 96,   .plen = 16, },
-       { .blen = 96,   .plen = 32, },
-       { .blen = 96,   .plen = 96, },
-       { .blen = 288,  .plen = 16, },
-       { .blen = 288,  .plen = 32, },
-       { .blen = 288,  .plen = 288, },
-       { .blen = 1056, .plen = 32, },
-       { .blen = 1056, .plen = 1056, },
-       { .blen = 2080, .plen = 32, },
-       { .blen = 2080, .plen = 2080, },
-       { .blen = 4128, .plen = 4128, },
-       { .blen = 8224, .plen = 8224, },
-
-       /* End marker */
-       {  .blen = 0,   .plen = 0, }
-};
-
 #endif /* _CRYPTO_TCRYPT_H */

base-commit: d633730bb3873578a00fde4b97f9ac62a1be8d34 --
2.51.2

maintainer
#2 lore raw
In reply to Eric Biggers
Quoted 4 lines · Eric Biggers

Since the crypto_shash support for poly1305 was removed, the tcrypt support for it is now unused as well. Support for benchmarking the kernel's Poly1305 code is now provided by the poly1305 kunit test.

Quoted 8 lines

---

This patch is targeting cryptodev/master

 crypto/tcrypt.c |  4 ----
 crypto/tcrypt.h | 18 ------------------
 2 files changed, 22 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt