RE: [PATCH v2] hwrng: fix khwrng lifecycle

2021-02-15 Thread Luca Dariz
>On Wed, Dec 16, 2020 at 11:59:06AM +0100, Luca Dariz wrote: >> >> @@ -432,12 +433,15 @@ static int hwrng_fillfn(void *unused) { >> long rc; >> >> + complete(&hwrng_started); >> while (!kthread_should_stop()) { >> struct hwrng *rng; >> >> rng = get_curre

[PATCH v8 2/4] x509: Detect sm2 keys by their parameters OID

2021-02-15 Thread Stefan Berger
Detect whether a key is an sm2 type of key by its OID in the parameters array rather than assuming that everything under OID_id_ecPublicKey is sm2, which is not the case. Cc: David Howells Cc: keyri...@vger.kernel.org Signed-off-by: Stefan Berger Reviewed-by: Tianjia Zhang --- crypto/asymmetri

[PATCH v8 0/4] Add support for x509 certs with NIST p256 and p192 keys

2021-02-15 Thread Stefan Berger
This series of patches adds support for x509 certificates signed by a CA that uses NIST p256 or p192 keys for signing. It also adds support for certificates where the public key is a NIST p256 or p192 key. The math for ECDSA signature verification is also added. Since self-signed certificates are

[PATCH v8 4/4] ima: Support EC keys for signature verification

2021-02-15 Thread Stefan Berger
Add support for IMA signature verification for EC keys. Since SHA type of hashes can be used by RSA and ECDSA signature schemes we need to look at the key and derive from the key which signature scheme to use. Since this can be applied to all types of keys, we change the selection of the encoding t

[PATCH v8 3/4] x509: Add support for parsing x509 certs with ECDSA keys

2021-02-15 Thread Stefan Berger
This patch adds support for parsing of x509 certificates that contain ECDSA keys, such as NIST P256, that have been signed by a CA using any of the current SHA hash algorithms. Cc: David Howells Cc: keyri...@vger.kernel.org Signed-off-by: Stefan Berger --- v7->v8: - do not detect key algo usi

[PATCH v8 1/4] crypto: Add support for ECDSA signature verification

2021-02-15 Thread Stefan Berger
Add support for parsing the parameters of a NIST P256 or NIST P192 key. Enable signature verification using these keys. The new module is enabled with CONFIG_ECDSA: Elliptic Curve Digital Signature Algorithm (NIST P192, P256 etc.) is A NIST cryptographic standard algorithm. Only signature verif

Re: [RFC PATCH 4/5] arm64: fpsimd: run kernel mode NEON with softirqs disabled

2021-02-15 Thread Ard Biesheuvel
On Wed, 20 Jan 2021 at 16:44, Dave Martin wrote: > > On Tue, Jan 19, 2021 at 05:29:05PM +0100, Ard Biesheuvel wrote: > > On Tue, 19 Jan 2021 at 17:01, Dave Martin wrote: > > > > > > On Fri, Dec 18, 2020 at 06:01:05PM +0100, Ard Biesheuvel wrote: > > > > Kernel mode NEON can be used in task or sof