Re: [PATCH RFC 1/2] crypto: ti: Add support for SHA224/256/384/512 in DTHE V2 driver
From: Herbert Xu
Date: Fri Apr 04 2025 - 21:33:20 EST
On Fri, Apr 04, 2025 at 06:10:23PM +0530, T Pratham wrote:
>
> Our hardware can accept data as multiple packets, each of which can be
> of any length. The only restriction it has is that only the last packet
> can have arbitrary length, rest have to be a multiple of BLOCK_SIZE. The
> hardware needs a bit to be set to indicate that the packet to be
> submitted is the last data packet.
This is not unique either. Even the software implementation has
to deal with this.
This needs to be dealt with in your update function. Simply buffer
leftover data and only feed whole blocks to the hardware, until
fina/finup is called.
Cheers,
--
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt