[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1a7abd3c-5ab4-4d38-a89f-78cb5b6ca14c@linux.dev>
Date: Tue, 6 Jan 2026 23:11:55 +0000
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: Daniel Hodges <git@...ielhodges.dev>, bpf@...r.kernel.org
Cc: Alexei Starovoitov <ast@...nel.org>, Andrii Nakryiko <andrii@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>, Song Liu <song@...nel.org>,
Mykyta Yatsenko <yatsenko@...a.com>, Martin KaFai Lau
<martin.lau@...ux.dev>, Eduard Zingerman <eddyz87@...il.com>,
Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>, Yonghong Song
<yonghong.song@...ux.dev>, Herbert Xu <herbert@...dor.apana.org.au>,
"David S . Miller" <davem@...emloft.net>, linux-crypto@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH bpf-next v4 5/6] bpf: Add ECDSA signature verification
kfuncs
On 05/01/2026 17:37, Daniel Hodges wrote:
> Add support for ECDSA signature verification in BPF programs through
> the unified bpf_crypto_ctx API.
>
> Changes:
> - Add enum bpf_crypto_type_id for efficient type checking
> - Update all crypto type modules to set type_id field
> - Implement bpf_ecdsa_verify() for signature verification
> - Add bpf_ecdsa_keysize(), bpf_ecdsa_digestsize(), bpf_ecdsa_maxsize()
> helper functions for querying context properties
> - Add type_id checks in all ECDSA kfuncs for type safety
> - Register ECDSA kfuncs for SCHED_CLS and XDP program types
>
> ECDSA contexts are created using bpf_crypto_ctx_create() with
> type="sig" and appropriate algorithm (e.g., "p1363(ecdsa-nist-p256)").
> The public key is passed via the key/key_len fields in bpf_crypto_params.
>
> This enables BPF programs to perform cryptographic signature verification
> for use cases such as packet authentication and content validation.
>
> Signed-off-by: Daniel Hodges <git@...ielhodges.dev>
> @@ -57,6 +58,7 @@ struct bpf_crypto_ctx {
> refcount_t usage;
> };
>
> +
> int bpf_crypto_register_type(const struct bpf_crypto_type *type)
> {
> struct bpf_crypto_type_list *node;
This chunk is extra empty line - no need for it
Powered by blists - more mailing lists