[PATCH 3/5] crypto: virtio - Drop superfluous ctx->tfm backpointer

2025-02-03 Thread Lukas Wunner
from there to crypto_[as]kcipher. Drop the superfluous backpointer. Signed-off-by: Lukas Wunner --- drivers/crypto/virtio/virtio_crypto_akcipher_algs.c | 5 - drivers/crypto/virtio/virtio_crypto_skcipher_algs.c | 4 2 files changed, 9 deletions(-) diff --git a/drivers/crypto/v

[PATCH 5/5] crypto: virtio - Drop superfluous [as]kcipher_req pointer

2025-02-03 Thread Lukas Wunner
The request context virtio_crypto_{akcipher,sym}_request contains a pointer to the [as]kcipher_request itself. The pointer is superfluous as it can be calculated with container_of(). Drop the superfluous pointer. Signed-off-by: Lukas Wunner --- I've considered introducing a static inli

[PATCH 4/5] crypto: virtio - Drop superfluous [as]kcipher_ctx pointer

2025-02-03 Thread Lukas Wunner
() combos. Drop the superfluous pointer. Signed-off-by: Lukas Wunner --- drivers/crypto/virtio/virtio_crypto_akcipher_algs.c | 8 drivers/crypto/virtio/virtio_crypto_skcipher_algs.c | 5 + 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/virtio

[PATCH 2/5] crypto: virtio - Simplify RSA key size caching

2025-02-03 Thread Lukas Wunner
instead of the integer n, thus simplifying the code and reducing the memory footprint. Signed-off-by: Lukas Wunner --- .../virtio/virtio_crypto_akcipher_algs.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/crypto/virtio

[PATCH 1/5] crypto: virtio - Fix kernel-doc of virtcrypto_dev_stop()

2025-02-03 Thread Lukas Wunner
It seems the kernel-doc of virtcrypto_dev_start() was copied verbatim to virtcrypto_dev_stop(). Fix it. Signed-off-by: Lukas Wunner --- drivers/crypto/virtio/virtio_crypto_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/virtio/virtio_crypto_mgr.c b

[PATCH 0/5] crypto virtio cleanups

2025-02-03 Thread Lukas Wunner
. I've also verified that a KEYCTL_PKEY_ENCRYPT operation using virtio-pkcs1-rsa produces correct output. Thanks! Lukas Wunner (5): crypto: virtio - Fix kernel-doc of virtcrypto_dev_stop() crypto: virtio - Simplify RSA key size caching crypto: virtio - Drop superfluous ctx->tfm

Re: [PATCH v2 00/19] Migrate to sig_alg and templatize ecdsa

2024-10-01 Thread Lukas Wunner
Hi Herbert, On Tue, Sep 10, 2024 at 04:30:10PM +0200, Lukas Wunner wrote: > The original impetus of this series is to introduce P1363 signature > decoding for ecdsa (patch [18/19]), which is needed by the upcoming > SPDM library (Security Protocol and Data Model) for PCI device > au

Re: [PATCH] integrity: prevent deadlock during digsig verification.

2024-09-11 Thread Lukas Wunner
On Wed, Jun 27, 2018 at 04:33:42PM +0300, Mikhail Kurinnoi wrote: > +int integrity_kernel_module_request(char *kmod_name) > +{ > + if (strncmp(kmod_name, "crypto-pkcs1pad(rsa,", 20) == 0) > + return -EINVAL; > + > + return 0; > +} Just a heads-up: The above was applied as comm

[PATCH v2 09/19] crypto: virtio - Drop sign/verify operations

2024-09-10 Thread Lukas Wunner
at least one rudimentary driver for such chips (atmel-ecc.c for ATECC508A), but it doesn't implement the sign operation. The kernel would first have to grow support for a hardware asymmetric_key_subtype and at least one driver implementing the sign operation before exposure to guests via vir

[PATCH v2 00/19] Migrate to sig_alg and templatize ecdsa

2024-09-10 Thread Lukas Wunner
d "algo" definitions from ecdsa_nist_p{192,256,384,521}_tv_template[]. * Introduce and use struct ecdsa_raw_sig in . * [PATCH 18/19] crypto: ecdsa - Support P1363 signature decoding * Drop unnecessary "params", "param_len" and "algo" definitions from p

Re: [PATCH] virtio-crypto: support crypto engine framework

2024-08-29 Thread Lukas Wunner
On Tue, Dec 27, 2016 at 02:49:07PM +0800, Gonglei wrote: > crypto engine was introduced since 'commit 735d37b5424b ("crypto: engine > - Introduce the block request crypto engine framework")' which uses work > queue to realize the asynchronous processing for ablk_cipher and ahash. > > For virtio-cr

Re: [PATCH v12 02/10] crypto: Add support for ECDSA signature verification

2024-07-22 Thread Lukas Wunner
On Mon, Jul 22, 2024 at 08:19:41AM -0400, Stefan Berger wrote: > On 7/17/24 12:17, Lukas Wunner wrote: > > On Tue, Mar 16, 2021 at 05:07:32PM -0400, Stefan Berger wrote: > > > +/* > > > + * Get the r and s components of a signature from the X509 certificate. &

Re: [PATCH v12 02/10] crypto: Add support for ECDSA signature verification

2024-07-17 Thread Lukas Wunner
Hi Stefan, On Tue, Mar 16, 2021 at 05:07:32PM -0400, Stefan Berger wrote: > +/* > + * Get the r and s components of a signature from the X509 certificate. > + */ > +static int ecdsa_get_signature_rs(u64 *dest, size_t hdrlen, unsigned char > tag, > + const void *value

Re: [PATCH] treewide: Add SPDX identifier to IETF ASN.1 modules

2023-10-22 Thread Lukas Wunner
On Sat, Oct 21, 2023 at 09:23:55AM -0400, Richard Fontana wrote: > On Sat, Oct 21, 2023 at 7:25???AM Lukas Wunner wrote: > > > > Per section 4.c. of the IETF Trust Legal Provisions, "Code Components" > > in IETF Documents are licensed on the terms of the BSD-

[PATCH] treewide: Add SPDX identifier to IETF ASN.1 modules

2023-10-21 Thread Lukas Wunner
isions requests that each Code Component identify the RFC from which it is taken, so link that RFC in every ASN.1 module. Signed-off-by: Lukas Wunner --- I'm adding a new IETF ASN.1 module for PCI device authentication, hence had to research what the correct license is. Thought I'd fix