linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/15] crypto: lib - Add partial block helper
@ 2025-04-24 10:46 Herbert Xu
  2025-04-24 10:46 ` [PATCH 01/15] crypto: lib/sha256 - Move partial block handling out Herbert Xu
                   ` (15 more replies)
  0 siblings, 16 replies; 31+ messages in thread
From: Herbert Xu @ 2025-04-24 10:46 UTC (permalink / raw)
  To: Linux Crypto Mailing List

This is based on

	https://patchwork.kernel.org/project/linux-crypto/patch/20250422152151.3691-2-ebiggers@kernel.org/
	https://patchwork.kernel.org/project/linux-crypto/patch/20250422152716.5923-2-ebiggers@kernel.org/
	https://patchwork.kernel.org/project/linux-crypto/patch/2ea17454f213a54134340b25f70a33cd3f26be37.1745399917.git.herbert@gondor.apana.org.au/

This series introduces a partial block helper for lib/crypto hash
algorithms based on the one from sha256_base.

It then uses it on poly1305 to eliminate duplication between
architectures.  In particular, instead of having complete update
functions for each architecture, reduce it to a block function
per architecture instead.  The partial block handling is handled
by the generic library layer.

The poly1305 implementation was anomalous due to the inability
to call setkey in softirq.  This has since been resolved with
the addition of cloning.  Add setkey to poly1305 and switch the
IPsec code (rfc7539) to use that.

Finally add a partial blocks conversion for polyval.

Herbert Xu (15):
  crypto: lib/sha256 - Move partial block handling out
  crypto: lib/poly1305 - Add block-only interface
  crypto: arm/poly1305 - Add block-only interface
  crypto: arm64/poly1305 - Add block-only interface
  crypto: mips/poly1305 - Add block-only interface
  crypto: powerpc/poly1305 - Add block-only interface
  crypto: x86/poly1305 - Add block-only interface
  crypto: poly1305 - Use API partial block handling
  crypto: lib/poly1305 - Use block-only interface
  crypto: chacha20poly1305 - Use setkey on poly1305
  crypto: testmgr/poly1305 - Use setkey on poly1305
  crypto: poly1305 - Make setkey mandatory
  crypto: arm64/polyval - Use API partial block handling
  crypto: x86/polyval - Use API partial block handling
  crypto: polyval-generic - Use API partial block handling

 arch/arm/lib/crypto/poly1305-armv4.pl       |   4 +-
 arch/arm/lib/crypto/poly1305-glue.c         | 112 ++++---------
 arch/arm64/crypto/polyval-ce-glue.c         |  73 +++------
 arch/arm64/lib/crypto/Makefile              |   3 +-
 arch/arm64/lib/crypto/poly1305-glue.c       | 104 ++++--------
 arch/mips/lib/crypto/poly1305-glue.c        |  74 ++-------
 arch/mips/lib/crypto/poly1305-mips.pl       |  12 +-
 arch/powerpc/lib/crypto/poly1305-p10-glue.c | 105 ++++--------
 arch/x86/crypto/polyval-clmulni_glue.c      |  72 +++------
 arch/x86/lib/crypto/poly1305_glue.c         | 168 +++++---------------
 crypto/chacha20poly1305.c                   | 115 ++++++++------
 crypto/poly1305.c                           | 124 ++++++++++-----
 crypto/polyval-generic.c                    | 120 +++++---------
 crypto/testmgr.h                            | 112 +++++++------
 include/crypto/internal/blockhash.h         |  52 ++++++
 include/crypto/internal/poly1305.h          |  28 +++-
 include/crypto/poly1305.h                   |  60 ++-----
 include/crypto/polyval.h                    |   8 -
 include/crypto/sha2.h                       |   9 +-
 include/crypto/sha256_base.h                |  38 +----
 include/linux/crypto.h                      |   3 +
 lib/crypto/poly1305.c                       |  80 +++++-----
 22 files changed, 595 insertions(+), 881 deletions(-)
 create mode 100644 include/crypto/internal/blockhash.h

-- 
2.39.5


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2025-04-27  1:47 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-24 10:46 [PATCH 00/15] crypto: lib - Add partial block helper Herbert Xu
2025-04-24 10:46 ` [PATCH 01/15] crypto: lib/sha256 - Move partial block handling out Herbert Xu
2025-04-24 15:41   ` Eric Biggers
2025-04-25 11:42     ` Herbert Xu
2025-04-24 10:47 ` [PATCH 02/15] crypto: lib/poly1305 - Add block-only interface Herbert Xu
2025-04-24 16:14   ` Eric Biggers
2025-04-25 11:49     ` Herbert Xu
2025-04-27  1:41       ` Eric Biggers
2025-04-27  1:47         ` Herbert Xu
2025-04-24 10:47 ` [PATCH 03/15] crypto: arm/poly1305 " Herbert Xu
2025-04-24 10:47 ` [PATCH 04/15] crypto: arm64/poly1305 " Herbert Xu
2025-04-24 10:47 ` [PATCH 05/15] crypto: mips/poly1305 " Herbert Xu
2025-04-24 10:47 ` [PATCH 06/15] crypto: powerpc/poly1305 " Herbert Xu
2025-04-24 10:47 ` [PATCH 07/15] crypto: x86/poly1305 " Herbert Xu
2025-04-24 10:47 ` [PATCH 08/15] crypto: poly1305 - Use API partial block handling Herbert Xu
2025-04-24 15:36   ` Eric Biggers
2025-04-25  3:42     ` Herbert Xu
2025-04-25  3:59       ` Eric Biggers
2025-04-25 11:40         ` Herbert Xu
2025-04-24 10:47 ` [PATCH 09/15] crypto: lib/poly1305 - Use block-only interface Herbert Xu
2025-04-24 15:48   ` Eric Biggers
2025-04-24 16:21     ` Eric Biggers
2025-04-25 11:43     ` Herbert Xu
2025-04-24 10:47 ` [PATCH 10/15] crypto: chacha20poly1305 - Use setkey on poly1305 Herbert Xu
2025-04-24 10:47 ` [PATCH 11/15] crypto: testmgr/poly1305 " Herbert Xu
2025-04-24 10:47 ` [PATCH 12/15] crypto: poly1305 - Make setkey mandatory Herbert Xu
2025-04-24 10:47 ` [PATCH 13/15] crypto: arm64/polyval - Use API partial block handling Herbert Xu
2025-04-24 10:47 ` [PATCH 14/15] crypto: x86/polyval " Herbert Xu
2025-04-24 10:47 ` [PATCH 15/15] crypto: polyval-generic " Herbert Xu
2025-04-24 16:17 ` [PATCH 00/15] crypto: lib - Add partial block helper Eric Biggers
2025-04-25 11:52   ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).