Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp537369iog; Thu, 30 Jun 2022 05:46:42 -0700 (PDT) X-Google-Smtp-Source: AGRyM1utwFvVR+AI0teeUFjw57Sg1Ue71Zl2ueSXjXZs0wDWKgSKIG1XY4lcI++KdguqTvJUgSYU X-Received: by 2002:a17:907:75d3:b0:72a:42a2:9d74 with SMTP id jl19-20020a17090775d300b0072a42a29d74mr6493623ejc.567.1656593202173; Thu, 30 Jun 2022 05:46:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656593202; cv=none; d=google.com; s=arc-20160816; b=FUoTewTD/m2dKFNIepWdrMCZS5ytGelnE6edGGmzzU+Nq0mWgtfPu9l1elPqumuctW ijVTnSZ8fBQllfJ/rqzJJujtha4wRHNXQvMT+HpMlEP+MQGxCPK/mRwK/H8UK/8wAXFm myq6dbUqvONnk9USQutmh9M01vJqzGHyEEC3HZSi7bRw0iTepM7td0bLp5CoCjo0SnBn kcpZB2z7PDlQ0HnZKcw2i8MgNOv8xlfXtZ8eIkmIIdK/T5L+jsUv+T2y+JkDD4jwY6Oj 7Ks3U+hmpLVJdMy0CQHDqw83T6odI0q/VUTYgfxNCBGjWImDoGxawG/qnsFW66z5+32D 1EkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=W7/sSIArA5vCU+4KRemTxV8HSmhG5DT2XBNoW9AstXY=; b=T/Xpq7Y1hCqnJvFljstVALybKRIHGxPgBy0Twr0EJWBjNkjm6F21c0xH/JLVKCLKmE ztIZXfZGf9G8UMpLUEo586BcgUwViaolEktjx4pjo1oKCVa6ZfVNRY0KUuq4Y40qdpMh z31oHIcyj3wLC1khLKuXQwqRX1kYsy9c4s7Z66j814eLysl9cyHzI97aEJ2L5y0fEyZO 06k73R0pL8vHOw8HojnLJ7Pkk/UTVGyMQJn/mA3lxynlvg8ZkA2haCW1NgAzP7jh8Hsy uiuvkMT4riSPQ8ayCH2y8G6urLvMjn1qr7yLbCL7x05EbZntV04x/rXX22HWO/05dgqw 6aJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=vLqN0wB6; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u16-20020a170906951000b007269a26e8a6si776988ejx.937.2022.06.30.05.46.13; Thu, 30 Jun 2022 05:46:42 -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=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=vLqN0wB6; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234376AbiF3Mnq (ORCPT + 99 others); Thu, 30 Jun 2022 08:43:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230363AbiF3Mnp (ORCPT ); Thu, 30 Jun 2022 08:43:45 -0400 Received: from mail-pg1-x529.google.com (mail-pg1-x529.google.com [IPv6:2607:f8b0:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7773918E28 for ; Thu, 30 Jun 2022 05:43:44 -0700 (PDT) Received: by mail-pg1-x529.google.com with SMTP id q140so18381239pgq.6 for ; Thu, 30 Jun 2022 05:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=W7/sSIArA5vCU+4KRemTxV8HSmhG5DT2XBNoW9AstXY=; b=vLqN0wB6DTGnBihe4yi3WrwwkWXWc5WUgrNtQ64rXpagC/OynSrfv3k/RccHONXbaV 5lCaLtelLoYegNsi5mVuBeJ/yC9DBBrJ3Rg3qzZzfaKlqWc+ZC6tiDVq25eT4nvS3uU8 IxhU4XTYi3NstizUARLlii4W8eFhTb/t5E6TqmCyyJqYAKa5y2ROSiIYF2DKxguIEdnL mXqcPMoypk2XK9qNEc1r2QP7/cPBDhGGknTy/tu4wNWQZbEoiMJgKxvu157+0MU7jwOh 60rYWnWnRPxG41zLQCKxVaEgbj0saViXiFXDzLEjL1+oKehz5z8BdjfSR9YJe5omcdIe 30ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=W7/sSIArA5vCU+4KRemTxV8HSmhG5DT2XBNoW9AstXY=; b=uQkaLHvz8cXNjAPMhAs3dBcHPsqTlLmI7bYLSRLg5ABDArFwlYwnWPNxzJAlqwTy1G ASwt2r7+rcBUz9zaPiWVvuVeAWC46sGm4Ehp5lsttWeM1nXAf8nKtt239B7mZc4AJKil YxOtb8IdsrV49X5imyYVHMdnXoovmBboJhfVnbcosBFHy/pSDOhS8bkg2zFmpOxgCG5n yDaFPUJ7cuhiHnTpT57R0quz7VHORxJ+qk2anHwqLFXU1xI9f68Hg41sqMCjW1/EZ5I6 QAxFc/V9wzAlU87/d4IONDJoNKX1RZzqJa6jcLlQpxJcI2XQJ9m5O49XiB0PxaELIgi7 4lGA== X-Gm-Message-State: AJIora9S5YLLMKm+85os24s9lUfQwkAQEqzs7vNqo4opEc5cG49IRx2O pBWznhfY7QvYcopoSbZ05kzYpg== X-Received: by 2002:a05:6a00:17a8:b0:525:537a:b0df with SMTP id s40-20020a056a0017a800b00525537ab0dfmr15544935pfg.71.1656593023974; Thu, 30 Jun 2022 05:43:43 -0700 (PDT) Received: from [10.76.43.148] ([61.120.150.78]) by smtp.gmail.com with ESMTPSA id jj22-20020a170903049600b001674d61c1c6sm13225370plb.272.2022.06.30.05.43.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Jun 2022 05:43:43 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: [PATCH v2 0/4] virtio-crypto: support ECDSA algorithm From: Lei He In-Reply-To: Date: Thu, 30 Jun 2022 20:43:37 +0800 Cc: Lei He , Herbert Xu , davem@davemloft.net, dhowells@redhat.com, "Michael S. Tsirkin" , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, pizhenwei@bytedance.com Content-Transfer-Encoding: quoted-printable Message-Id: References: <20220623070550.82053-1-helei.sig11@bytedance.com> To: =?utf-8?B?IkRhbmllbCBQLiBCZXJyYW5nw6ki?= X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Jun 30, 2022, at 5:48 PM, Daniel P. Berrang=C3=A9 = wrote: >=20 > On Thu, Jun 30, 2022 at 03:23:39PM +0800, Lei He wrote: >>=20 >>> On Jun 30, 2022, at 2:59 PM, Herbert Xu = wrote: >>>=20 >>> On Thu, Jun 23, 2022 at 03:05:46PM +0800, Lei He wrote: >>>> From: lei he >>>>=20 >>>> This patch supports the ECDSA algorithm for virtio-crypto. >>>=20 >>> Why is this necessary? >>>=20 >>=20 >> The main purpose of this patch is to offload ECDSA computations to = virtio-crypto dev. >> We can modify the backend of virtio-crypto to allow hardware like = Intel QAT cards to=20 >> perform the actual calculations, and user-space applications such as = HTTPS server=20 >> can access those backend in a unified way(eg, keyctl_pk_xx syscall). >>=20 >> Related works are also described in following patch series: >> = https://lwn.net/ml/linux-crypto/20220525090118.43403-1-helei.sig11@bytedan= ce.com/ >=20 > IIUC, this link refers to testing performance of the RSA impl of > virtio-crypto with a vhost-user backend, leveraging an Intel QAT > device on the host. What's the status of that depolyment setup ? > Is code for it published anywhere, and does it have dependancy on > any kernel patches that are not yet posted and/or merged ? Does it > cover both ECDSA and RSA yet, or still only RSA ? >=20 > The QEMU backend part of the virtio-crypto support for ECDSA looks = fine > to merge, but obviously I'd like some positive sign that the kernel > maintainers are willing to accept the guest driver side. >=20 1. We have now been able to provide offload capability for nginx=E2=80=99s= TLS handshake in the virtual machine(with the kctl-engine), and have achieved about 0.8~0.9 = times performance improvement.=20 But as you can see, when we were testing, both authentication and key = exchange only supported=20 RSA at the moment.=20 2. The code for the QAT offload backend is not posted now, it does not = support the ECDSA, so it also does not=20 depends on any other patches that have not been merged. To support = ECDSA, this patch is required. At present, I have only implemented and tested the ECDSA for the builtin = backend, and the ECDSA support for another backend that can offload is also in progress. By the way, the virtio part of QEMU( for support ECDSA) is also ready, = I will post it soon.=