Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1984881rwb; Sat, 24 Sep 2022 00:28:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7mrudptLwoYnivoCig5mEuiOABEzP53Cb48J7x76ki1L38kaaWGWH2pK2SAbHk5XyQ6JF1 X-Received: by 2002:a05:6402:4148:b0:440:cb9f:d10f with SMTP id x8-20020a056402414800b00440cb9fd10fmr12202473eda.77.1664004493689; Sat, 24 Sep 2022 00:28:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664004493; cv=none; d=google.com; s=arc-20160816; b=bDRqYBXI2wwN9gPvmjdEOolN3MlHpRFI6Httm8lB0Q5LV4lTqbdgIh75bAja4gkFAN ws+sDIZ1Tq4fpPLlrHsTKq2g8q4oLoE0U/hXIWlEM3a1DDDCxCbScf7TrS7eNateIYb3 bvZWhNYXzqFPrrIfPoOS6Du9XWIRaVMhsffCrjmPHFXopGXMDe6eDZovxvpPSf8dEZ/x fT5cRQeBN/KjSsk+7YUk8GKTLXTuMoANbZOLOk3igfgMMG36Z5Vf5BQmUpuC6YLpfQl+ kiSUPelQDW9YpTBdge2vWnYQNIcrbg/cnVLkLOhZogAWAKyeRTdKRmBQ9lQuvH5sTKFw QcYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=ipidzGT0b5MUb9Lh46Ws7p+9P3PzFlfsix6yCNbzcwY=; b=Z+tiDhATsMa3PeyxXx6/pq6613RLhD4Ps6Bkl2L9lRgvWSQoIF6wfcWrUWWhDUkuuY LdZwmTbav0ROYv6T6Z8KD2K2KftZWjnHyG4y7kDv9VuK+Bd+5aACYBvCQ3ihPJnAdHyc j/H+WHVwkPDWOXrBJbL5GIU2dJ0h0OanpXUorW6BZ9AG7xb0Zrq/kzh2oBYg40bvKfHk LhF/fuk3DhzAg+y+pmHicratKqWgoDqmuWfaKZGeq9t3UhANj9QfdPDt96CbNeRF/hyu mgZMH4HINrs707x5ZWKGaMJp8ARn/4+tLR8Idvz8O1vG07PGnCMuIPyMSxG105OCVUjM EM2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb24-20020a1709071c9800b0076f591c4692si10129093ejc.330.2022.09.24.00.27.38; Sat, 24 Sep 2022 00:28:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233551AbiIXHZp (ORCPT + 99 others); Sat, 24 Sep 2022 03:25:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233437AbiIXHZf (ORCPT ); Sat, 24 Sep 2022 03:25:35 -0400 Received: from fornost.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7781E12AE9; Sat, 24 Sep 2022 00:24:35 -0700 (PDT) Received: from gwarestrin.arnor.me.apana.org.au ([192.168.103.7]) by fornost.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1obzWU-007vmx-Ty; Sat, 24 Sep 2022 17:24:28 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Sat, 24 Sep 2022 15:24:26 +0800 Date: Sat, 24 Sep 2022 15:24:26 +0800 From: Herbert Xu To: Ignat Korchagin , David Howells Cc: "David S . Miller" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, lei he , kernel-team@cloudflare.com Subject: Re: [PATCH 0/4] crypto: add ECDSA signature support to key retention service Message-ID: References: <20220908200036.2034-1-ignat@cloudflare.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220908200036.2034-1-ignat@cloudflare.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Sep 08, 2022 at 09:00:32PM +0100, Ignat Korchagin wrote: > Kernel Key Retention Service[1] is a useful building block to build secure > production key management systems. One of its interesting features is > support for asymmetric keys: we can allow a process to use a certain key > (decrypt or sign data) without actually allowing the process to read the > cryptographic key material. By doing so we protect our code from certain > type of attacks, where a process memory memory leak actually leaks a > potentially highly sensitive cryptographic material. > > But unfortunately only RSA algorithm was supported until now, because > in-kernel ECDSA implementation supported signature verifications only. > > This patchset implements in-kernel ECDSA signature generation and adds > support for ECDSA signing in the key retention service. The key retention > service support was taken out of a previous unmerged patchset from Lei He[2] > > [1]: https://www.kernel.org/doc/html/latest/security/keys/core.html > [2]: https://patchwork.kernel.org/project/linux-crypto/list/?series=653034&state=* > > Ignat Korchagin (2): > crypto: add ECDSA signature generation support > crypto: add ECDSA test vectors from RFC 6979 > > lei he (2): > crypto: pkcs8 parser support ECDSA private keys > crypto: remove unused field in pkcs8_parse_context > > crypto/Kconfig | 3 +- > crypto/Makefile | 4 +- > crypto/asymmetric_keys/pkcs8.asn1 | 2 +- > crypto/asymmetric_keys/pkcs8_parser.c | 46 +++- > crypto/ecc.c | 9 +- > crypto/ecdsa.c | 373 +++++++++++++++++++++++++- > crypto/ecprivkey.asn1 | 6 + > crypto/testmgr.c | 18 ++ > crypto/testmgr.h | 333 +++++++++++++++++++++++ > include/crypto/internal/ecc.h | 11 + > 10 files changed, 788 insertions(+), 17 deletions(-) > create mode 100644 crypto/ecprivkey.asn1 > > -- > 2.36.1 I need acks for patches 3-4 from David. Thanks! -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt