public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Louvel <paul.louvel@bootlin.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Need some clarification about CRYPTO_AHASH_ALG_BLOCK_ONLY
Date: Wed, 25 Mar 2026 13:26:16 +0100	[thread overview]
Message-ID: <b53feadd-8246-43cf-a768-740cb73d2553@bootlin.com> (raw)
In-Reply-To: <4f93481a-a0e5-4a9f-8aae-00d3189ccc58@bootlin.com>

Hello,

I forgot to include the maintainers in the initial e-mail.

Additional link to the source code :
https://elixir.bootlin.com/linux/v7.0-rc1/source/crypto/ahash.c#L467

Thank you,
Paul.

On 3/20/26 10:42 AM, Paul Louvel wrote:
> 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


  reply	other threads:[~2026-03-25 12:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-20  9:42 Need some clarification about CRYPTO_AHASH_ALG_BLOCK_ONLY Paul Louvel
2026-03-25 12:26 ` Paul Louvel [this message]
2026-03-26  8:27   ` Herbert Xu
2026-03-26  9:46     ` Paul Louvel
2026-03-27  3:39       ` Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b53feadd-8246-43cf-a768-740cb73d2553@bootlin.com \
    --to=paul.louvel@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox