Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp2006128ybl; Sat, 14 Dec 2019 04:22:03 -0800 (PST) X-Google-Smtp-Source: APXvYqweWSPk9z9RWjPqGNdEIZj8b3jg2gXM+rJA8o+VO3eyveZ/fl6YydmmGDyRJN2TD3n1ESPH X-Received: by 2002:a9d:6654:: with SMTP id q20mr19981631otm.284.1576326123496; Sat, 14 Dec 2019 04:22:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576326123; cv=none; d=google.com; s=arc-20160816; b=sONwcxQAcF+OBYj2/Mpnqt8SXIzkX+HV5X+dBmQhMy8rnWAo8L5+zuiwXej1OZ2keQ R/IBcuDY3BubXRfH34gFORR7UzkmZBoKWOk88rEwl2Uo8G0wfn6fRTVIU642grND89Y2 gR/2+5sqqLIPP7T5bPLHlKKORhF2wsf+9nzU32R7VPmSpVeXmvS7YmpUk3+hR2j33Cvq Yxg/nrnldoFuUg9EciGg3Tmr0LqgmLIEKckWvTDqqhr34dS1Np0CDHUiV2qlUvSj+l+O AR3yTOJhedEkXqa2XgmjnYMUIWG3259ljK8SIOfaGEoT4IIdpjr+6myZD2DmSKsm8IgJ NZ4A== 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=dNwC8BK5YHGiybSjq4k+Cc3IEhy4Soe8jK1AvS4D3M4=; b=tU3S8CserKyJJgAptP0aAs/tekw5OdDDJ01MCHvmACk80wcDeEYc2VPDDrKGUUZneG MrJ80PMNe/+6aG4mpwZ3BGn8vmtABY3MU4pfRTLLCMLs9uVDcNEI3eAs65uHoKg7BDCz RLXvD1gIJbvljtUlLbHs0ecHP7fQqJCA0nNpek9HVVzhVMNYAMdq44ToyHvurDV7sn3r aVpjf7mjwBIK5Lhe1/LK1DO6A9wTUZjergHwpS9SulToy/SX6PrSo7uH/7cJeQRLDAUg IHokNWfRzL9vfg9sfRAEX5kYk8JIVVL3H8tBufjn3YpHjMzlq7iWvKH16N5I/mV5JkZu 86lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@zx2c4.com header.s=mail header.b=NoPXyBKH; 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 q16si7837215otk.226.2019.12.14.04.21.38; Sat, 14 Dec 2019 04:22:03 -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=NoPXyBKH; 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 S1725872AbfLNMVi (ORCPT + 99 others); Sat, 14 Dec 2019 07:21:38 -0500 Received: from frisell.zx2c4.com ([192.95.5.64]:48683 "EHLO frisell.zx2c4.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725809AbfLNMVh (ORCPT ); Sat, 14 Dec 2019 07:21:37 -0500 Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTP id c6ff35cf for ; Sat, 14 Dec 2019 11:25:33 +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=ojweuQz62vOngeheg6Nx+3FJJho=; b=NoPXyB KHPu0yiMDStcsqchdntSiPi5vE90CqLoJOb5wTTJdtnXr+i1o6pibdtaqJBlqgzi E4EYs6aVv+E1rlahKySo/tXsb0RnAaXgnPWtKEahJ361yYR7vyX0xx/INkIRq19F V86e/atkUqDwz0ErRUJznvfvLYy7E1jPBmPnZm3nSESrsocEDhafh/UQphYhnDGj Oyyr5HNy5JWNOmqEwBhNafqfirSu3h2mDypNBgHzc1jf6SnHC43gOJ4gsI8LsI5/ /nl5Fzd7UE2kzx9oZ21DxVSxAmMJXo+Y3D2Tdf7kwJ0Lwp/Mfvi8EY8fpy1W/lkH Bi4ZKejAiAjSxjnQ== Received: by frisell.zx2c4.com (ZX2C4 Mail Server) with ESMTPSA id 7eedbdd7 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Sat, 14 Dec 2019 11:25:33 +0000 (UTC) Received: by mail-ot1-f44.google.com with SMTP id 59so2588782otp.12 for ; Sat, 14 Dec 2019 04:21:35 -0800 (PST) X-Gm-Message-State: APjAAAWi78sDHiGV1p/BFBZochRj4ZRBjW/fK8nMdNhB4vJoL7xZzB4p 5ktYV8YG1bR8BwTOdraEqKCzoT6k3hhnxYpFj2M= X-Received: by 2002:a9d:674f:: with SMTP id w15mr20599877otm.243.1576326095185; Sat, 14 Dec 2019 04:21:35 -0800 (PST) MIME-Version: 1.0 References: <20191213032849.GC1109@sol.localdomain> <20191214085608.b53yiogf432zxyw7@gondor.apana.org.au> In-Reply-To: <20191214085608.b53yiogf432zxyw7@gondor.apana.org.au> From: "Jason A. Donenfeld" Date: Sat, 14 Dec 2019 13:21:23 +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: Herbert Xu Cc: 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 Hi Herbert, On Sat, Dec 14, 2019 at 9:56 AM Herbert Xu wrote: > > Eric Biggers wrote: > > > > Now, it's possible that the performance gain outweighs this, and I too would > > like to have the C implementation of Poly1305 be faster. So if you'd like to > > argue for the performance gain, fine, and if there's a significant performance > > gain I don't have an objection. But I'm not sure why you're at the same time > > trying to argue that *adding* an extra implementation somehow makes the code > > easier to audit and doesn't add complexity... > > Right. We need the numbers not because we're somehow attached > to the existing code, but we need them to show that we should > carry the burden of having two C implementations, 32-bit vs 64-bit. This info is now in the commit message of the version in my tree, rather than sprinkled around casually in these threads. I also did a bit more benchmarking this morning. From : > Testing with kbench9000, depending on the CPU, the update function for > the 32x32 version has been improved by 4%-7%, and for the 64x64 by > 19%-30%. The 32x32 gains are small, but I think there's great value in > having a parallel implementation to the 64x64 one so that the two can be > compared side-by-side as nice stand-alone units. I'll resubmit this on Monday. Regards, Jason