public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
* Need some clarification about CRYPTO_AHASH_ALG_BLOCK_ONLY
@ 2026-03-20  9:42 Paul Louvel
  2026-03-25 12:26 ` Paul Louvel
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Louvel @ 2026-03-20  9:42 UTC (permalink / raw)
  To: linux-crypto

Hello,

I have stumbled across a flag defined in include/crypto/internal/hash.h : 
CRYPTO_AHASH_ALG_BLOCK_ONLY.
To get more information about what exact behavior this flag do, I read the 
crypto_ahash_update function.
 From the looks of it, it seems that the API will call the tfm update if there 
is enough bytes (and by enough I mean at least a block size), from the internal 
buffer and the incoming ahash_request.
In this case, I find the BLOCK_ONLY naming a bit of a misnomer, since it only 
guarantee you than req->nbytes will be at least a block size.
I initially though that the API would only give a request that are a multiple of 
the block size.

This flag, among others, are relatively recent.
I think adding documentation about these flags would be a great idea.

Regards,
Paul.

-- 
Paul Louvel, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


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

end of thread, other threads:[~2026-03-27  3:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-20  9:42 Need some clarification about CRYPTO_AHASH_ALG_BLOCK_ONLY Paul Louvel
2026-03-25 12:26 ` Paul Louvel
2026-03-26  8:27   ` Herbert Xu
2026-03-26  9:46     ` Paul Louvel
2026-03-27  3:39       ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox