Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2669365ybn; Thu, 26 Sep 2019 15:49:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsXBBKf4ozx/u8+oxN4g4eBeGX5qC9koxWtrBYKRFoWLWxX7Ym49zp53hOf81KxmtLN9t8 X-Received: by 2002:a50:a8a2:: with SMTP id k31mr1318214edc.79.1569538139976; Thu, 26 Sep 2019 15:48:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569538139; cv=none; d=google.com; s=arc-20160816; b=c0XWxne4xh7vCDqpfI8fmaWIL+ThGAZf9SfuP7Sb8lNjiRHiFjlcRnPgqq52LB4yTL N1lYIG37t+XZXB/NJa3YPd5HDxRIVd09lOXMYWRJTv+p5G4UbmBVcI73yL3pVNzxACn7 rF42Q0R83KFBR9dS+ehzRR4ZUs66GJAxw0U3Yf0toDvH3s0D+GZi4BXLukjWIyOu8LUU XX+0gA/8WLHcq7h2m0Y7Z6xvLlFOFUjQNXKIKWYvpfVVyHZLQ8FVDSXPCPW0LA6gGoEq TWI9+ulZNzXGmCBBIQsTM8UwA+IkBwVkIo2CMoY0uzcLDK7OnfqQ0MLHACHCXEBSRlvT JOuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:dkim-signature; bh=SYDe/o2kLFR5SneKG6UQbh/y8tn28Z982DDnMOJdbek=; b=NigmYq+aoGLb0J9xrCP54jD1heQkkWrf7aEBw2riY84l33wgxh2vdCHOdqSBvBiAii I7JjBFUpFR9uUNZtAE8qOy3qqba3VzN+ckYBPm8+cI7pmSC/zO9xXmwzFSVx2hiX33Jj RXZpz9UiIvJ/oshrwTxS6F5jUxXjdEuYAcsxKMst2DqSSM9Jo99n1esoYHVxYPPddubS 8LX6IUDIoDiEapV5+PwTqMiPgS7xsrU8zQtRk468Wcdy6JO4HPphlV2zZrmODsILgtXG zNOGuefpkGHhkodgq4QXTFAeMV7k4jz4fh/KCNaoXZOktjQAedA5i0qmo5H9ki8V9wIs BAJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=mlrCBvUO; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ca4si1869950ejb.39.2019.09.26.15.48.26; Thu, 26 Sep 2019 15:48:59 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@netronome-com.20150623.gappssmtp.com header.s=20150623 header.b=mlrCBvUO; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727964AbfIZWrb (ORCPT + 99 others); Thu, 26 Sep 2019 18:47:31 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:43422 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727962AbfIZWrb (ORCPT ); Thu, 26 Sep 2019 18:47:31 -0400 Received: by mail-qt1-f196.google.com with SMTP id c3so4905955qtv.10 for ; Thu, 26 Sep 2019 15:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=SYDe/o2kLFR5SneKG6UQbh/y8tn28Z982DDnMOJdbek=; b=mlrCBvUOrlKqAzldrnB/bm30cDnNznI4nYgb+Kxyk+nhts4qaRjdCIK88d3kK0tks7 9GmIWZ7zNMf/jpG7cruBS8VC6I4UewCaQEk4Ax7zlSOIYWES2xe5wbAneHuAyHypHh/B mBSulXPxoCZzkkEoj+Ve1eSZhJXSJNxh2cRmSOA7v84gbtsO2tr4xYsOMwfuYTX6DeDZ ENbytWggHdbVj8eh4QHquj741T9lK1gXsSCievOJuXBAK4pZrIgPkcxueKsgSHfepWxb Ez6L2p+lUynes77n7sEd5BImBQsAwmJoj5xYKOupCvr4UM/7ghkhq8N5GLTluxj9ZpJV AINA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=SYDe/o2kLFR5SneKG6UQbh/y8tn28Z982DDnMOJdbek=; b=JX0arfedzPuPWTeXSR7DOraPKina4wylk5hGsoE2sUmBDX5fT58z5gmtg+WB5anB+k ztflqeMqyv34uvYDErN9wfi73VA7AhgVTG0i1i78Kf/SRmIcGpLZUo0E7KMS9EaYHdqa yLSRNF7mca0Yy7awfTgiOdaoEL0cKtVK1kE5m/r1cU86rugYKM1f6lxdQo7pewd/J4AI DD3cYReY/t6B0H42WPWW/9RmwvqT3iLwMYp6G0I8dV55+f3iPaav/pYeiPvAvabIiWyd 9RHQ6x+BlrAHGVUf0zulQqmU8mxkcVKCSQZM65hhTZ05OLZh3KY35wic2xR1yvJT9dMc 6tpg== X-Gm-Message-State: APjAAAXOeOvNSGqQ0E8pDVlWVEx+ruBLVUICumGA6JNikDPIemKNl6bs 89gE4CZ7F8EntnkgbQ+s4amkyQ== X-Received: by 2002:a0c:9846:: with SMTP id e6mr5221088qvd.114.1569538048482; Thu, 26 Sep 2019 15:47:28 -0700 (PDT) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id a11sm322826qkc.123.2019.09.26.15.47.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2019 15:47:28 -0700 (PDT) Date: Thu, 26 Sep 2019 15:47:21 -0700 From: Jakub Kicinski To: "Jason A. Donenfeld" Cc: Pascal Van Leeuwen , Ard Biesheuvel , Linux Crypto Mailing List , linux-arm-kernel , Herbert Xu , David Miller , Greg KH , Linus Torvalds , Samuel Neves , Dan Carpenter , Arnd Bergmann , Eric Biggers , Andy Lutomirski , Will Deacon , Marc Zyngier , Catalin Marinas , Willy Tarreau , Netdev , Toke =?UTF-8?B?SMO4aWxhbmQtSsO4cmdlbnNlbg==?= , Dave Taht Subject: Re: chapoly acceleration hardware [Was: Re: [RFC PATCH 00/18] crypto: wireguard using the existing crypto API] Message-ID: <20190926154721.094139b0@cakuba.netronome.com> In-Reply-To: References: <20190925161255.1871-1-ard.biesheuvel@linaro.org> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, 26 Sep 2019 13:06:51 +0200, Jason A. Donenfeld wrote: > On Thu, Sep 26, 2019 at 12:19 PM Pascal Van Leeuwen wrote: > > Actually, that assumption is factually wrong. I don't know if anything > > is *publicly* available, but I can assure you the silicon is running in > > labs already. And something will be publicly available early next year > > at the latest. Which could nicely coincide with having Wireguard support > > in the kernel (which I would also like to see happen BTW) ... > > > > Not "at some point". It will. Very soon. Maybe not in consumer or server > > CPUs, but definitely in the embedded (networking) space. > > And it *will* be much faster than the embedded CPU next to it, so it will > > be worth using it for something like bulk packet encryption. > > Super! I was wondering if you could speak a bit more about the > interface. My biggest questions surround latency. Will it be > synchronous or asynchronous? If the latter, why? What will its > latencies be? How deep will its buffers be? The reason I ask is that a > lot of crypto acceleration hardware of the past has been fast and > having very deep buffers, but at great expense of latency. In the > networking context, keeping latency low is pretty important. FWIW are you familiar with existing kTLS, and IPsec offloads in the networking stack? They offload the crypto into the NIC, inline, which helps with the latency, and processing overhead. There are also NIC silicon which can do some ChaCha/Poly, although I'm not familiar enough with WireGuard to know if offload to existing silicon will be possible.