Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp961461ybl; Thu, 12 Dec 2019 07:36:02 -0800 (PST) X-Google-Smtp-Source: APXvYqyT27F05nsXZyWC5hG3QD1Ilavp1FoiF1KIsPePZtkaRPbJ9NgCZEjFNCCun3iW41OzrKl8 X-Received: by 2002:a9d:630d:: with SMTP id q13mr8263140otk.31.1576164962547; Thu, 12 Dec 2019 07:36:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576164962; cv=none; d=google.com; s=arc-20160816; b=E6yuxebHNdkc+Rypj2Vxk1Ygpfc7pjOm2EhzIAhg5KdD6H2ReFe7dzuuB8JqBmk6k+ juvzNv50+KuZKw6NXAibDO2vgHgUXcDZpZ0jBLcZkeVBO1qORYh0DUhlDTAgnPsC/v5t E0H4ch8SSUUhlbD5iylHiHoXIkCO986nlUy4DMPY+sa3XXK34zfnS7QkYMmGWryegAkb oKoP6acbc1ZhOqKsJIt972ex3JuuPiOnhk57+kMTf6mkkdKAFa/Ztuoi2kZOe9JyKpU+ S7tH6ywfBtRdbBbn4gWJrTg1n8bfax7l82SouYX+6d5MjNQMhEPdKtGDC0VrHmgzb5Ao hPXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=MjE4T2DVPPWbHv5enXZC3qxSknJ2pg5vlrLUMAyxO20=; b=tzqP/PRMpt6wPA8OufhQS2/7wIbBfVZBAvODihh6v0yARO1b4Asg7KNUuXsck4fYmy 2c65obT9EaWSfmHkfhh7sRY2LFxJFO5tBb9P9SRfcrjua/dw8SOltaYYqxWlLM2oY6fz MmzLzn0CBSFdP3mThk3kR4UrQ5s3CkT1AXBYqPDwcW0N7siv/RmZAzkGNr7w7/n9zQHJ arYhxR8E9YCHZLPu0ScMUVVA08K+HETLfv2Tri4GG0sPjBwnnqLFz6UuhM9g3VTG1Xln ie975U1OQcm5ZW0X/V8X69Nfi8LjudKict+AozRe3T6KpBG9cUJ0m4eJf9CdZxdwxt4o IiCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=gVYdVOKd; 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 14si3158214oie.181.2019.12.12.07.35.49; Thu, 12 Dec 2019 07:36:02 -0800 (PST) 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=gVYdVOKd; 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 S1729013AbfLLPfS (ORCPT + 99 others); Thu, 12 Dec 2019 10:35:18 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:58369 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729467AbfLLPfS (ORCPT ); Thu, 12 Dec 2019 10:35:18 -0500 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 94dc94eb for ; Thu, 12 Dec 2019 14:39:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=zx2c4.com; h=mime-version :references:in-reply-to:from:date:message-id:subject:to:cc :content-type; s=mail; bh=zLTv40VoGYFkQaUW7aW/IfcqO8Q=; b=gVYdVO KdCSTbQnb5LgWbEh0q2/riiWvYI0XJ7BjejR3FvL5D3VuclpJpWOta0HVEDHLKdG IaU5Guk79+EqG6xuGKuQcuOY+KX4ck8oUYReOlbvAJEkLcHv2zHWU19uupF3rC5v /EqCCBG/UBsHLwrEulnW1ABWMeVG/051jRmzHQTaXkDcc6olSE/OULdgW9XQqHf5 IiOjTaejhT9EXhmM3hWQmUWlP0CZAGdkwPzkJzOShZKROrKtl/FpUMAt8wgqdpeP y8QEGwkMvEz2phB86KyI16O3M/LS2MpaCE/+HI/TEyI9VTGSI692zcDRcsem4t9w NRPABgeLar2DJhew== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 5fc12e04 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Thu, 12 Dec 2019 14:39:28 +0000 (UTC) Received: by mail-oi1-f182.google.com with SMTP id a124so722526oii.13 for ; Thu, 12 Dec 2019 07:35:16 -0800 (PST) X-Gm-Message-State: APjAAAUD4pA8NHXUIu8Dr+f01pLd2AOzjkOipPtOgEqIPDIMdqwDOcxa 8tPyNf2MalzXG5id2GhpScngXICCKgBsrRPQ0j4= X-Received: by 2002:aca:5143:: with SMTP id f64mr5146134oib.66.1576164915842; Thu, 12 Dec 2019 07:35:15 -0800 (PST) MIME-Version: 1.0 References: <20191211170936.385572-1-Jason@zx2c4.com> <20191212093008.217086-1-Jason@zx2c4.com> <7d30f7c912a5565b1c26729b438c1a95286fcf56.camel@strongswan.org> In-Reply-To: <7d30f7c912a5565b1c26729b438c1a95286fcf56.camel@strongswan.org> From: "Jason A. Donenfeld" Date: Thu, 12 Dec 2019 16:35:04 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH crypto-next v2 1/3] crypto: poly1305 - add new 32 and 64-bit generic versions To: Martin Willi Cc: Ard Biesheuvel , Linux Crypto Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Dec 12, 2019 at 4:30 PM Martin Willi wrote: > > The principle advantage of this patchset is the 64x64 code > > If there are platforms / code paths where this code matters, all fine. It does matter. > > But the 64-bit version adds a lot of complexity because of the > different state representation and the conversion between these states. > I just don't think the gain (?) justifies that added complexity. No, there's no conversion between the state representation, or any complexity like that added. I think if anything, the way this patch works, we wind up with something easier to audit and look at. You can examine poly1305-donna32.c and poly1305-donna64.c side-by-side and compare line-by-line, as clean and isolate implementations. And this is very well-known code too.