From patchwork Fri Sep 14 16:22:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jason A. Donenfeld" X-Patchwork-Id: 146709 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp897074ljw; Fri, 14 Sep 2018 09:22:47 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaZ5cGuA6S2a6r8uvgFvrJkiSbrPzQjoi0ny8+x64fo1s+vUQyNlqMsoksPwXeqvNq+xzjV X-Received: by 2002:a17:902:8345:: with SMTP id z5-v6mr12806537pln.147.1536942167839; Fri, 14 Sep 2018 09:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536942167; cv=none; d=google.com; s=arc-20160816; b=c34csdXbeJ50dQMvsjBEiIBZbr3jrWwXCmrftIn+5WQA8ajVbwpMBz5848rG9SRTSl zQsgqIYbtvk3WeLXWq64FoNsAIhYg9a4IrSuqSwKh3Hlk8bLh9GcQt9cc2GAyGpXbRhv kg+evRVf8Jw4SnGE0XhMwF8SwygBSxgDEtA2xmMP7bxEEwRylcJAYvJYROYxeuzbicT+ fAvmnAs90HYMuBv8i2TGoUc2tErngtnFW+BjckcvpciB7n1s84zsI4iBnozfZIek43rI 8gJy7/9Iyanl9lnJ17Vku4wo82BUAgNaeAueBmBplYYkx0VGAzIo9gYXT+mbpKZDRp9C ksJA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=652Vys45D0QNnEG/rfBvTECqU196g74aEeOqhVSRxb4=; b=UAxKozmKHUJgwGm6ndxfgIs5qjDKmyKhwkI+UHyOxrvacyCC+kc3WwE3aybp/H/AaW UuKmgCj3UnOfG/fO/oBIKRBEjyetQFm5x8/M2pbsGOhmvbr6qOc/Y7Ptyh/L869/7NPA 4crR6QwcMT3FSDK4CgnCOcp/xufNabZ6BQIP9NfNtqJOOAmK5CXyDZiBktzSNYAKpU1K vIM+Cjf4hhhjV4iNl10nraaqpEKkXCh0v2bmIK7Jtf39E/SdHtQTZo4jrpZUHfxNp6AU RQmWcDFdrNHFXt6TsUuUQClKW946IH2paqw49jBRy8uZTlKoQb9E80pzvOm0sIXsR9ZD KxRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b="21O/+C2D"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 123-v6si7252187pfd.201.2018.09.14.09.22.47; Fri, 14 Sep 2018 09:22:47 -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=@zx2c4.com header.s=mail header.b="21O/+C2D"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=zx2c4.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727966AbeINVh6 (ORCPT + 2 others); Fri, 14 Sep 2018 17:37:58 -0400 Received: from frisell.zx2c4.com ([192.95.5.64]:58315 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbeINVh6 (ORCPT ); Fri, 14 Sep 2018 17:37:58 -0400 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 6098c2e2; Fri, 14 Sep 2018 16:05:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=from:to:cc :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=mail; bh=2BM4AahMtlNuHnmkXOxU0Sr3/ kY=; b=21O/+C2D+JKIaLQfks2fvkavfintZyD+JaeyUwaqC0BYCG4NI2OzR58e9 775mfbAx2VxJxyZfGCyN8bGENs6ntJjoJeOOIAShPezwmPpwLhGgk+p4rrfk5WpT gTNHDJI/+k8BOykyjBoU+XUyeLdhSCqWXZ9sJpaZx9Rv5SiHXfv2DuHR7teDgTmy vnJgWqhr1A1r3mqeIv8Nndk/1eS0fZVnANTmo4/g7cy+zltE7DKcfY05j6Zy+K5x g60FkaXi1iwUC3vGr60UAY1K8UBVLB3TwhC4z3MD7lKSgCZVQlUbmd9AivPLcEHk wfVQnr56SrQTOxmM6PTVx09Mapy1A== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id b207425d (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Fri, 14 Sep 2018 16:05:40 +0000 (UTC) From: "Jason A. Donenfeld" To: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-crypto@vger.kernel.org, davem@davemloft.net, gregkh@linuxfoundation.org Cc: "Jason A. Donenfeld" Subject: [PATCH net-next v4 00/20] WireGuard: Secure Network Tunnel Date: Fri, 14 Sep 2018 18:22:20 +0200 Message-Id: <20180914162240.7925-1-Jason@zx2c4.com> MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Changes v3->v4: - Remove mistaken double 07/17 patch. - Fix whitespace issues in blake2s assembly. - It's not possible to put compound literals into __initconst, so we now instead just use boring fixed size struct members. - Move away from makefile ifdef maze and instead prefer kconfig values, which also makes the design a bit more modular too, which could help in the future. - Port old crypto API implementations (ChaCha20 and Poly1305) to Zinc. - Port security/keys/big_key to Zinc as second example of a good usage of Zinc. - Document precisely what is different between the kernel code and CRYPTOGAMS code when the CRYPTOGAMS code is used. - Move changelog to top of 00/20 message so that people can actually find it. ----------------------------------------------------------- This patchset is available on git.kernel.org in this branch, where it may be pulled directly for inclusion into net-next: * https://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/linux.git/log/?h=jd/wireguard ----------------------------------------------------------- WireGuard is a secure network tunnel written especially for Linux, which has faced around three years of serious development, deployment, and scrutiny. It delivers excellent performance and is extremely easy to use and configure. It has been designed with the primary goal of being both easy to audit by virtue of being small and highly secure from a cryptography and systems security perspective. WireGuard is used by some massive companies pushing enormous amounts of traffic, and likely already today you've consumed bytes that at some point transited through a WireGuard tunnel. Even as an out-of-tree module, WireGuard has been integrated into various userspace tools, Linux distributions, mobile phones, and data centers. There are ports in several languages to several operating systems, and even commercial hardware and services sold integrating WireGuard. It is time, therefore, for WireGuard to be properly integrated into Linux. Ample information, including documentation, installation instructions, and project details, is available at: * https://www.wireguard.com/ * https://www.wireguard.com/papers/wireguard.pdf As it is currently an out-of-tree module, it lives in its own git repo and has its own mailing list, and every commit for the module is tested against every stable kernel since 3.10 on a variety of architectures using an extensive test suite: * https://git.zx2c4.com/WireGuard https://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/WireGuard.git/ * https://lists.zx2c4.com/mailman/listinfo/wireguard * https://www.wireguard.com/build-status/ The project has been broadly discussed at conferences, and was presented to the Netdev developers in Seoul last November, where a paper was released detailing some interesting aspects of the project. Dave asked me after the talk if I would consider sending in a v1 "sooner rather than later", hence this patchset. A decision is still waiting from the Linux Plumbers Conference, but an update on these topics may be presented in Vancouver in a few months. Prior presentations: * https://www.wireguard.com/presentations/ * https://www.wireguard.com/papers/wireguard-netdev22.pdf The cryptography in the protocol itself has been formally verified by several independent academic teams with positive results, and I know of two additional efforts on their way to further corroborate those findings. The version 1 protocol is "complete", and so the purpose of this review is to assess the implementation of the protocol. However, it still may be of interest to know that the thing you're reviewing uses a protocol with various nice security properties: * https://www.wireguard.com/formal-verification/ This patchset is divided into four segments. The first introduces a very simple helper for working with the FPU state for the purposes of amortizing SIMD operations. The second segment is a small collection of cryptographic primitives, split up into several commits by primitive and by hardware. The third shows usage of Zinc within the existing crypto API and as a replacement to the existing crypto API. The last is WireGuard itself, presented as an unintrusive and self-contained virtual network driver. It is intended that this entire patch series enter the kernel through DaveM's net-next tree. Subsequently, WireGuard patches will go through DaveM's net-next tree, while Zinc patches will go through Greg KH's tree. Enjoy, Jason