Re: [PATCH] crypto: arm64/sha1 - Set finalize for short finup

From: Corentin Labbe
Date: Fri Apr 25 2025 - 15:16:37 EST


Le Fri, Apr 25, 2025 at 06:58:13PM +0800, Herbert Xu a écrit :
> On Fri, Apr 25, 2025 at 12:42:17PM +0200, Corentin Labbe wrote:
> >
> > No they are still there:
> > [ 2.022921] alg: shash: sha1-ce test failed (wrong result) on test vector 0, cfg="init+update+final aligned buffer"
>
> Thanks, I see the problem now. The zero-length hash doesn't
> set sctx->finalize correctly:
>
> ---8<---
> Always set sctx->finalize before calling finup as it may not have
> been set previously on a short final.
>
> Reported-by: Corentin LABBE <clabbe.montjoie@xxxxxxxxx>
> Fixes: b97d31100e36 ("crypto: arm64/sha1 - Use API partial block handling")
> Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
>

Tested-by: Corentin LABBE <clabbe.montjoie@xxxxxxxxx>

Thanks