lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAADnVQJKjv5fZ0suJkOKtybMNsrDr9d+Au8T08AvHCPzP3z8sw@mail.gmail.com>
Date: Tue, 3 Feb 2026 10:44:05 -0800
From: Alexei Starovoitov <alexei.starovoitov@...il.com>
To: Daniel Hodges <git@...ielhodges.dev>
Cc: bpf <bpf@...r.kernel.org>, Alexei Starovoitov <ast@...nel.org>, 
	Andrii Nakryiko <andrii@...nel.org>, Daniel Borkmann <daniel@...earbox.net>, 
	Vadim Fedorenko <vadim.fedorenko@...ux.dev>, Song Liu <song@...nel.org>, 
	Mykyta Yatsenko <yatsenko@...a.com>, Martin KaFai Lau <martin.lau@...ux.dev>, Eduard <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 Mailing List <linux-crypto@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>, 
	"open list:KERNEL SELFTEST FRAMEWORK" <linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH bpf-next v7 3/4] bpf: Add signature verification kfuncs

On Mon, Feb 2, 2026 at 6:48 AM Daniel Hodges <git@...ielhodges.dev> wrote:
>
> Add a bpf_crypto_sig module that registers signature verification
> algorithms with the BPF crypto type system. This enables signature
> operations (like ECDSA) to use the unified bpf_crypto_ctx structure.
>
> The module provides:
>    - alloc_tfm/free_tfm for crypto_sig transform lifecycle
>    - has_algo to check algorithm availability
>    - setkey for public key configuration
>    - verify for signature verification
>    - get_flags for crypto API flags
>
> Introduce bpf_sig_verify, bpf_sig_keysize, bpf_sig_digestsize,
> and bpf_sig_maxsize kfuncs enabling BPF programs to verify digital
> signatures using the kernel's crypto infrastructure.
>
> Add enum bpf_crypto_type_id for runtime type checking to ensure
> operations are performed on the correct crypto context type. The enum
> values are assigned to all crypto type modules (skcipher, hash, sig).
>
> The verify kfunc takes a crypto context (initialized with the sig
> type and appropriate algorithm like "ecdsa-nist-p256"), a message
> digest, and a signature. These kfuncs support any signature algorithm
> registered with the crypto subsystem (e.g., ECDSA, RSA).
>
> Signed-off-by: Daniel Hodges <git@...ielhodges.dev>
> ---
>  MAINTAINERS                |   1 +
>  crypto/Makefile            |   3 +
>  crypto/bpf_crypto_sig.c    |  89 ++++++++++++++++++++++++++++
>  include/linux/bpf_crypto.h |   4 ++
>  kernel/bpf/crypto.c        | 117 +++++++++++++++++++++++++++++++++++++
>  5 files changed, 214 insertions(+)
>  create mode 100644 crypto/bpf_crypto_sig.c

Other than the issue spotted by AI the patches look fine,
but we need Ack from crypto maintainers.

pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ