Re: [PATCH 2/3] crypto: sha256 - Implement export_core() and import_core()

From: Ovidiu Panait
Date: Tue Sep 02 2025 - 04:28:30 EST




On 9/1/25 7:50 PM, Eric Biggers wrote:
> 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/sha256.c compatible with these legacy
> drivers by adding export_core() and import_core() methods to it.
>
> Reported-by: Giovanni Cabiddu <giovanni.cabiddu@xxxxxxxxx>
> Reported-by: Ovidiu Panait <ovidiu.panait.oss@xxxxxxxxx>
> Closes: https://lore.kernel.org/r/aLSnCc9Ws5L9y+8X@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Fixes: 07f090959bba ("crypto: sha256 - Use same state format as legacy drivers")
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>


Tested-by: Ovidiu Panait <ovidiu.panait.oss@xxxxxxxxx>

Thanks,
Ovidiu