crypto: sha512 - Implement export_core() and import_core()
authorEric Biggers <ebiggers@kernel.org>
Mon, 1 Sep 2025 16:50:13 +0000 (09:50 -0700)
committerEric Biggers <ebiggers@kernel.org>
Wed, 3 Sep 2025 02:02:39 +0000 (19:02 -0700)
commitcdb03b6d1896c2d23f9c47dc779edba0a9241115
treed06ba3c3890d9f662ae635fb1b99a5d1f2f5c36f
parent30b2a8c4f2f3833f4f813d3e0d003f7c50cdf275
crypto: sha512 - Implement export_core() and import_core()

Since commit 9d7a0ab1c753 ("crypto: ahash - Handle partial blocks in
API"), the recently-added export_core() and import_core() methods in
struct shash_alg have effectively become mandatory (even though it is
not tested or enforced), since legacy drivers that need a fallback
depend on them.  Make crypto/sha512.c compatible with these legacy
drivers by adding export_core() and import_core() methods to it.

Reported-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reported-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
Closes: https://lore.kernel.org/r/aLSnCc9Ws5L9y+8X@gcabiddu-mobl.ger.corp.intel.com
Fixes: 4bc7f7b687a2 ("crypto: sha512 - Use same state format as legacy drivers")
Tested-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Tested-by: Ovidiu Panait <ovidiu.panait.oss@gmail.com>
Link: https://lore.kernel.org/r/20250901165013.48649-4-ebiggers@kernel.org
Signed-off-by: Eric Biggers <ebiggers@kernel.org>
crypto/sha512.c