Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp307532iog; Fri, 17 Jun 2022 04:08:13 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ujxUB4Y7W9TOv68XZ07YV64tgN5wGYnfMZSE+mg/QLvmwFQqWZstXsgPB00Z51O0ZdA5EO X-Received: by 2002:a63:9547:0:b0:408:be53:b599 with SMTP id t7-20020a639547000000b00408be53b599mr8459360pgn.463.1655464093382; Fri, 17 Jun 2022 04:08:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655464093; cv=none; d=google.com; s=arc-20160816; b=le94pVmoPqCcp3SNL9y35s3UnaqZVk8Zej9N6U006FMyZQ+QpQZuKDigT5RBsIhxrd /jmJjc7iKv9wN48Mi2vHlPyLJkggn88/G4J/4aj87y6SXG9Me/Z9j1Pus2E5sNZNmddy s+7AQ1MqeYdeaqLQxtNowiYJYPXXKv8egaj68w2z3cy2uqM9FoOcgfb2GDwws/Otz82I RPtEOIRxrwSnAbYITRDdz+tMXqZwrCYZ6h00u053k5uNQpDP95pvJnXY//2gggdymSYL vnetHm7s48taNgDvpam7Py0aRsWPozGDt30DRq6SP4rqNpL1tH54mgibJGVe9UYgnOlD YJEQ== 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:dkim-signature; bh=ziFOWbv9by8WUWOuHr9i3fD+ni8iVbPClUxuq+yU6N4=; b=snE5GzWmBzZ/do0trB8ku50BEJRSl+5cvFgVIDexXEMhEt0oBbLI/A7/bSAmy/tozk VJ5/r2rv4S1xFfhfnIuA5KH6wDBlaDy/asXkuxCN70MVyWzRiHZSjZkQ9oyxEBXhK1P9 ubD9kEHuKF+M3J4BZ3GkxJnNP87IeWvkS9b6/q2YH8RSPjlTGDxaEkuvWUJGfXaY12b7 siGnFvZBJRCTGuAUVnt5GIQnAaGnDjvczQe2L+qATtPC2vU0g36+9S7mxOiRNMlhTLRM 9u+fWQQFG67gk2Skdkt1R4S3GoXcmlN5O0bmC73a/+A/BMP/DBZq20yilPNWBLhv+Wro tJDg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="dfL9y/qQ"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y5-20020a63e245000000b003f250fc5e17si5363280pgj.793.2022.06.17.04.07.38; Fri, 17 Jun 2022 04:08: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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="dfL9y/qQ"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1381539AbiFQLCp (ORCPT + 99 others); Fri, 17 Jun 2022 07:02:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1382299AbiFQLCb (ORCPT ); Fri, 17 Jun 2022 07:02:31 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2C2956CAA8 for ; Fri, 17 Jun 2022 04:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655463741; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=ziFOWbv9by8WUWOuHr9i3fD+ni8iVbPClUxuq+yU6N4=; b=dfL9y/qQwPUY299SmRJW/Dd2MjnVj3J3s70jh245B57fmYty6Pts9ZmphlCQ6BjoR7fDN1 r2WdWv2l11ZabIUwL6OW7nD/NhsFwGr6x+zrr7E6YC+XV7A6R6Ub545I6MZLgSjPHxuD1F ylwc7iZCzd2JJDjExUnRJgOip8fOrVY= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-518-zdANyfOzOMaw-H4c2HfTNA-1; Fri, 17 Jun 2022 07:02:20 -0400 X-MC-Unique: zdANyfOzOMaw-H4c2HfTNA-1 Received: by mail-wm1-f70.google.com with SMTP id be12-20020a05600c1e8c00b0039c506b52a4so3596964wmb.1 for ; Fri, 17 Jun 2022 04:02:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ziFOWbv9by8WUWOuHr9i3fD+ni8iVbPClUxuq+yU6N4=; b=Owxpxwr2yGPj+QYxhYFTcURJkHq3/8LG8EHnWL1Bgi7HGvbPIY67Qq302SFtS2mIei 8qEwNDe1gR51R0oSIVH9MYnmVlFuEuY4pbaf7A4OT+polGaZ4hNXH7HmP87gqhwpd4lt emMu+X4u3YRk/xvWAg7CpWcBTXwX0HIQbNqREPHnYgIIuNUeDsGrVNw+0nDwH1xPUvM4 FZZOVD+gWitP32W89SDIEjYDz9pkMsaiUarVny51RbCB3ECoAQLAomi8tmYoUc1Es0pg AxSaMtJrUKgF4du1Ys6Pdc7e0jHGhfefWmKjeLDqNE9UixcUMQnjR+9+3EVhz4VY7dz+ lZrg== X-Gm-Message-State: AOAM533iSkeAOnlyBBFTNDST68UvSLuR1eZTacmtV0I/s4xwb5cZRsqN /JZ5XoZZVxB6wGTsciCuSatzAoQZcjfEhAxaDOWpqEjzTlzBzo0a9IRuSvH8C3axQYKdoMd4Td5 ttu9YfDFWwr8lEmR58I+yUt93 X-Received: by 2002:a05:600c:1d94:b0:39c:68c0:403b with SMTP id p20-20020a05600c1d9400b0039c68c0403bmr20288841wms.125.1655463739485; Fri, 17 Jun 2022 04:02:19 -0700 (PDT) X-Received: by 2002:a05:600c:1d94:b0:39c:68c0:403b with SMTP id p20-20020a05600c1d9400b0039c68c0403bmr20288821wms.125.1655463739205; Fri, 17 Jun 2022 04:02:19 -0700 (PDT) Received: from redhat.com ([2.54.189.19]) by smtp.gmail.com with ESMTPSA id f15-20020a5d568f000000b00213b93cff5fsm4121938wrv.98.2022.06.17.04.02.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Jun 2022 04:02:18 -0700 (PDT) Date: Fri, 17 Jun 2022 07:02:13 -0400 From: "Michael S. Tsirkin" To: Lei He Cc: herbert@gondor.apana.org.au, davem@davemloft.net, dhowells@redhat.com, arei.gonglei@huawei.com, jasowang@redhat.com, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, pizhenwei@bytedance.com, f4bug@amsat.org, berrange@redhat.com Subject: Re: [PATCH 0/4] virtio-crypto: support ECDSA algorithm Message-ID: <20220617070201-mutt-send-email-mst@kernel.org> References: <20220617070754.73667-1-helei.sig11@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220617070754.73667-1-helei.sig11@bytedance.com> X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Fri, Jun 17, 2022 at 03:07:49PM +0800, Lei He wrote: > From: lei he > > This patch supports the ECDSA algorithm for virtio-crypto: > 1. fixed the problem that the max_signature_size of ECDSA is > incorrectly calculated. > 2. make pkcs8_private_key_parser can identify ECDSA private keys. > 3. implement ECDSA algorithm for virtio-crypto device virtio bits: Acked-by: Michael S. Tsirkin > lei he (4): > crypto: fix the calculation of max_size for ECDSA > crypto: pkcs8 parser support ECDSA private keys > crypto: remove unused field in pkcs8_parse_context > virtio-crypto: support ECDSA algorithm > > crypto/Kconfig | 1 + > crypto/Makefile | 2 + > crypto/akcipher.c | 10 + > crypto/asymmetric_keys/pkcs8.asn1 | 2 +- > crypto/asymmetric_keys/pkcs8_parser.c | 46 +++- > crypto/ecdsa.c | 3 +- > crypto/ecdsa_helper.c | 45 +++ > .../virtio/virtio_crypto_akcipher_algs.c | 259 ++++++++++++++++-- > include/crypto/internal/ecdsa.h | 15 + > include/linux/asn1_encoder.h | 2 + > lib/asn1_encoder.c | 3 +- > 11 files changed, 360 insertions(+), 28 deletions(-) > create mode 100644 crypto/ecdsa_helper.c > create mode 100644 include/crypto/internal/ecdsa.h > > -- > 2.20.1