Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp172675imm; Tue, 7 Aug 2018 16:21:16 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxDKU0xQdQbdgjSa1d29o276p7mcHSGlp+zI1ojAg2EUAw1gihmUJM+/ONO7sFmBEyibrlO X-Received: by 2002:a63:6cc8:: with SMTP id h191-v6mr297243pgc.359.1533684076647; Tue, 07 Aug 2018 16:21:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533684076; cv=none; d=google.com; s=arc-20160816; b=c9DBTWRJ+Io9hIkkyLQ+UCezoxPOfkHiUsrnTYIqtUIUpENx2R/0I6/jgRZlOHgP1T M/PY4Q34nwAWiBLxi+c7dEBAPnzpxUj9a0Sc8GpWbORNpAMh4k1oM/d5SnaTTE4I/gAK LLjbH1l3kX0/m21Gn2b9n8BldLdcROtw8XgXxA/Or+do5ZxhFJPfYYQRCqSxUA7jhMsD /FxZYj7X77iwuEvG/2/TwwL4jWYfojM3hlRSfco45tW9YUaIBvXwXtZvJUJJymspLK0y 3oioq2i4KtZ7u4S3KfQ8NcqrJwCRCz7sA+ZvTs/OTUxyIIe7wJkpkfGlzZoI9/f+LjJW PZ6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=0xKWW7rYLQM6UJPX1LrQr1lI+hOJvWZmdnakzWOhurw=; b=yElwDniQJYBN08sNjdL3RfT4JqJuXttgNtq3gRDJOgZ8Twgl5P5pZo9UQZr1wd6xRZ oN6COJsjc8DTSQNozNtw+u5t/VJntG75LfeGy6UBSh7UsQd/lYS/0O2kv1OOETVaxHVK pVMfoGYebq5gfKmVfPXv8VW87BcV48tMLjQuA8XJJUccNkS2hXmGw56mbL6bi+cRinbr 6YRi/rYZQ/9kFDCQ4NaXELZ6+eW3l4LafD5ALMJ49r5+b9502jowDJBDgkL6KZUdmUKF n9XI0KgoFk5vLlPwXSjM+KS947BBLQ0NomjJf3b534h10lSAvtyng6kGQP/7GdxwD82d lQAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=iCb0H3w6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c22-v6si2045146plo.271.2018.08.07.16.21.02; Tue, 07 Aug 2018 16:21:16 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@kernel.org header.s=default header.b=iCb0H3w6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727033AbeHHBgZ (ORCPT + 99 others); Tue, 7 Aug 2018 21:36:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:38088 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726680AbeHHBgZ (ORCPT ); Tue, 7 Aug 2018 21:36:25 -0400 Received: from gmail.com (unknown [104.132.51.88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6FEA621736; Tue, 7 Aug 2018 23:19:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1533683982; bh=KQo53lsxG2Qv89B8xS/HeA8vH7OtC4T/WpK8UHCCX98=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=iCb0H3w6csp/gsFIj3V5HVxq0VXqGJg8kHH+eRQcg8ZRzNqnCYsNqR9SLa6T00Z8s ctCuVsavxqD9bsTSQJEEOzmdj1FsghhiFl75WRStDgt277dfrMeyJgEyg1Vgly58A5 PVKiPBxSGrw5WAVVGwZMcyDFh5HPnpQv+jS87qkk= Date: Tue, 7 Aug 2018 16:19:41 -0700 From: Eric Biggers To: Ard Biesheuvel Cc: "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , linux-fscrypt@vger.kernel.org, linux-arm-kernel , Linux Kernel Mailing List , Herbert Xu , Paul Crowley , Greg Kaiser , Michael Halcrow , "Jason A . Donenfeld" , Samuel Neves , Tomer Ashur , Eric Biggers Subject: Re: [RFC PATCH 8/9] crypto: arm/poly1305 - add NEON accelerated Poly1305 implementation Message-ID: <20180807231941.GC25300@gmail.com> References: <20180806223300.113891-1-ebiggers@kernel.org> <20180806223300.113891-9-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1+60 (20b17ca5) (2018-08-02) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ard, On Tue, Aug 07, 2018 at 02:09:05PM +0200, Ard Biesheuvel wrote: > On 7 August 2018 at 00:32, Eric Biggers wrote: > > From: Eric Biggers > > > > Add the Poly1305 code from OpenSSL, which was written by Andy Polyakov. > > I took the .S file from WireGuard, whose author has made the needed > > tweaks for Linux kernel integration and verified that Andy had given > > permission for GPLv2 distribution. I didn't make any additional changes > > to the .S file. > > > > Note, for HPolyC I'd eventually like a Poly1305 implementation that > > allows precomputing powers of the key. But for now this implementation > > just provides the existing semantics where the key and nonce are treated > > as a "one-time key" that must be provided for every message. > > > > Signed-off-by: Eric Biggers > > Hi Eric, > > In the past, I worked with Andy on several occasions to get my kernel > changes incorporated into the upstream OpenSSL version of the > 'perlasm' .pl file. > > This achieves a number of things: > - we get a readable version of the code in the kernel tree, > - our changes are reviewed upstream > - upgrading involves grabbing the latest .pl file rather than merging > generated code (which requires careful review) > - GPLv2 permission is made explicit, rather than something someone > claims to have reached agreement on, > - no legal ambiguity whether the output of the perl script is covered > by the license (which is what we incorporate here) > > Note that the 'available under GPL depending on where you obtained the > code' in the CRYPTOGAMS license likely conflicts with the GPL itself, > but I am not a lawyer so I'd much prefer having the upstream copy > mention this explicitly. First, note that Jason is proposing adding this exact same .S file as part of his new "zinc" cryptography library, along with 7 other OpenSSL .S files. So it may really be him you need to convince. But yes, I don't really like the approach of just including the .S output of the .pl script either, as it loses semantic information that was in the .pl script. Ideally the source should either be the .pl script, or else a real hand written .S file with the proper comments and macros to make it readable -- not something in-between. Getting the license clarification and possibly other changes upstream is a good idea too. I noticed, though, that the actual wording used in some files upstream ("Permission to use under GPLv2 terms is granted") apparently still isn't considered sufficient by some, so a separate clarification from Andy was apparently still needed: see kernel commit c2e415fe75bbc83c1... - Eric