From: Felix Maurer <fmaurer@redhat.com>
To: Daniel Hodges <git@danielhodges.dev>
Cc: bpf@vger.kernel.org, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
ast@kernel.org, andrii@kernel.org, daniel@iogearbox.net,
vadim.fedorenko@linux.dev, song@kernel.org, yatsenko@meta.com,
martin.lau@linux.dev, eddyz87@gmail.com, haoluo@google.com,
jolsa@kernel.org, john.fastabend@gmail.com, kpsingh@kernel.org,
sdf@fomichev.me, yonghong.song@linux.dev,
herbert@gondor.apana.org.au, davem@davemloft.net
Subject: Re: [PATCH bpf-next v8 0/4] Add cryptographic hash and signature verification kfuncs to BPF
Date: Thu, 21 May 2026 18:30:16 +0200 [thread overview]
Message-ID: <ag8zGP5azt743BWc@thinkpad> (raw)
In-Reply-To: <20260225202935.31986-1-git@danielhodges.dev>
On Wed, Feb 25, 2026 at 03:29:31PM -0500, Daniel Hodges wrote:
> This patch series enhances BPF's cryptographic functionality by introducing
> kernel functions for SHA hashing and ECDSA signature verification. The changes
> enable BPF programs to verify data integrity and authenticity across
> networking, security, and observability use cases.
>
> The series addresses two gaps in BPF's cryptographic toolkit:
>
> 1. Cryptographic hashing - supports content verification and message digest
> preparation
> 2. Asymmetric signature verification - allows validation of signed data
> without requiring private keys in the datapath
Hi Daniel,
I found your series because I was about to implement something similar
like your hashing implementation. In other words, I'd be very happy to
see this patchset move forward.
Taking an initial look at your hashing patches, I'm wondering: the usual
interface to hash/digest algorithms is to have three functions: an
init() function to set up state, an update() function that can be called
multiple times to hash new bytes, and a finalize() function that creates
the actual hash. Depending on the algorithm, some of them (esp.
finalize) may be no-ops. Often, a fourth function, like hash(), is
provided as convenience, doing one init/update/finalize cycle when all
data to be hashed is already available.
I think we should provide the same init/update/finalize interface in bpf
as well to make the API more flexible. That would require splitting out
the shash_desc from the (mostly static) context. But doing so would also
address the review comment from bpf-ci bot to patch 1. WDYT?
Thanks,
Felix
next prev parent reply other threads:[~2026-05-21 16:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-25 20:29 [PATCH bpf-next v8 0/4] Add cryptographic hash and signature verification kfuncs to BPF Daniel Hodges
2026-02-25 20:29 ` [PATCH bpf-next v8 1/4] bpf: Add hash kfunc for cryptographic hashing Daniel Hodges
2026-02-25 21:06 ` bot+bpf-ci
2026-02-25 20:29 ` [PATCH bpf-next v8 2/4] selftests/bpf: Add tests for bpf_crypto_hash kfunc Daniel Hodges
2026-02-25 20:29 ` [PATCH bpf-next v8 3/4] bpf: Add signature verification kfuncs Daniel Hodges
2026-02-25 21:06 ` bot+bpf-ci
2026-02-25 20:29 ` [PATCH bpf-next v8 4/4] selftests/bpf: Add tests for " Daniel Hodges
2026-05-21 16:30 ` Felix Maurer [this message]
2026-05-22 10:57 ` [PATCH bpf-next v8 0/4] Add cryptographic hash and signature verification kfuncs to BPF Daniel Hodges
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=ag8zGP5azt743BWc@thinkpad \
--to=fmaurer@redhat.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eddyz87@gmail.com \
--cc=git@danielhodges.dev \
--cc=haoluo@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=john.fastabend@gmail.com \
--cc=jolsa@kernel.org \
--cc=kpsingh@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=sdf@fomichev.me \
--cc=song@kernel.org \
--cc=vadim.fedorenko@linux.dev \
--cc=yatsenko@meta.com \
--cc=yonghong.song@linux.dev \
/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