Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp165094imm; Fri, 19 Oct 2018 20:25:09 -0700 (PDT) X-Google-Smtp-Source: ACcGV62cOHKAPA/Xo+w9kY9jwV8np3XFgMHg6HnDRleE982bUW+PYhsnVBoMrO5buFnMDrG04Amg X-Received: by 2002:a63:e601:: with SMTP id g1-v6mr35434934pgh.290.1540005909448; Fri, 19 Oct 2018 20:25:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540005909; cv=none; d=google.com; s=arc-20160816; b=PJoH7IaJeglXiLTGyW6T/dIwMLuPNZq/Dfrm4KEV9dxaxLsSxEi5ADv1xM4OkMIu5w dCYQUkNX9IViedHfdPjBCBD++iNlRI25WUrJdgI2xcZiTUOcJHTt4kXc6BBsjdygSTV7 wLQAxP3Sc35Vt921ZdxI9Zb4j18QbsWsCPIu0eI/xvbcnH6nPKDpMzvLL9XZ7CPF8uNx VfKwuonh0EhtQWBfWnU1lHbMsEAmd08GXO+F83ENFZD/zJSWIfWz2CkqCkSGqRiorGFQ AUPmZQvLBVM0FHcvnUYLLrWnevKmSaTNd2y191pvlFGgjXWyiM0+GwLSrsBputYZhzeJ mlDw== 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 :references:in-reply-to:mime-version:dkim-signature; bh=NZ10Ylsl3AN9EZ+hzni4RNeIwZbU1+s0IaMEe6oKYpE=; b=pgQCm34cbQAhyrI5vpY3MKVyG/V/b2KdSUrcQKaVeOwD8qyUUPcKAWvKpXhQv3tyu1 SRpW7lolLCwpNZoR4d0LIg6FOFAGj+ups7d79Pgu/vzp/kLzLUonyUwUj0Qj9ciUcxJi aDSPzlh/CMcfiT2sYWIPSKUBWgWfTsmBVAjQ20JEWm0goCGN/guxYm3I1redNs88XSNe TwOY5iUQNeig+gg37EnaDNpAcSpX8nBzijcmvHiSZjg7nm3uKqH4sNnvOIBsVGOygNA2 xtwcJ/1/dLwR6kQ42DA89UYJL8Gr8tQQf7eo01mmniW3q4hWUbMOYpRtL4mEHYCuBGr1 /utg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="J86Z/P/2"; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v2-v6si26880277pfa.103.2018.10.19.20.24.40; Fri, 19 Oct 2018 20:25:09 -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=@linaro.org header.s=google header.b="J86Z/P/2"; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726509AbeJTLdA (ORCPT + 99 others); Sat, 20 Oct 2018 07:33:00 -0400 Received: from mail-it1-f195.google.com ([209.85.166.195]:52053 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726069AbeJTLdA (ORCPT ); Sat, 20 Oct 2018 07:33:00 -0400 Received: by mail-it1-f195.google.com with SMTP id 74-v6so6500677itw.1 for ; Fri, 19 Oct 2018 20:24:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NZ10Ylsl3AN9EZ+hzni4RNeIwZbU1+s0IaMEe6oKYpE=; b=J86Z/P/2z/3W7yX8WtBchlG5ztpgIn7z4W/TkWWKZzU435tHiUxDFI/pW7epzelYPE /Si7PHgJ21R5uU1R9fSb4fUixr6xVkukHYyWGk8IM2orf+nEgL9KiwEy10sEHNMnKhSO xUfyl/4y2foq5DlHF8YAEHCz2ci72B/m6V9kY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NZ10Ylsl3AN9EZ+hzni4RNeIwZbU1+s0IaMEe6oKYpE=; b=I7YJ+TN3Iw893foYBluuk552ownguuTA5pPwIS6J+Q7Ggan0Bm/WlSvoR+1aCWfnI+ 5dpMPp+3gF3XO5VW9JCwy1lc5CpX+Z1TY8hZONf7kXeNlXVthuBKPMW/M4ixCMFXtesI 8HVU+ngWU+EKwmbeVm9nZipkE2wMvGHOE0wM/I3U3vEMH4QYYE8aU4OZz1wuNqzfuqw+ o6o3z9nwGJiHPhbNCYnoHIzTslK2nSFe7Byuz0n5jBrp7XIHQUkytTZcBJgx42Oe1Ood lCK6XjF6+DYoutdS2NA4FogNr/fkRy8wP131CyZKUJUFWqWaPO6Vk2POlYOU8UPAGNWQ Jchg== X-Gm-Message-State: ABuFfoi2HjqprOGbT09bmpZDnVEZMpAL0WXJYA8Mt2TVZpgpjwT/Cs7z EK4MXBCOzyQW+dvS2wVVIj2bSt5Lqg6DAxZLaPPtrA== X-Received: by 2002:a24:e08f:: with SMTP id c137-v6mr4998647ith.71.1540005846200; Fri, 19 Oct 2018 20:24:06 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a6b:5910:0:0:0:0:0 with HTTP; Fri, 19 Oct 2018 20:24:05 -0700 (PDT) In-Reply-To: References: <20181015175424.97147-1-ebiggers@kernel.org> From: Ard Biesheuvel Date: Sat, 20 Oct 2018 11:24:05 +0800 Message-ID: Subject: Re: [RFC PATCH v2 00/12] crypto: Adiantum support To: Paul Crowley Cc: "Jason A. Donenfeld" , Eric Biggers , "open list:HARDWARE RANDOM NUMBER GENERATOR CORE" , linux-fscrypt@vger.kernel.org, linux-arm-kernel , Linux Kernel Mailing List , Herbert Xu , Greg Kaiser , Michael Halcrow , Samuel Neves , Tomer Ashur Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20 October 2018 at 02:19, Paul Crowley wrote: > On Fri, 19 Oct 2018 at 08:58, Jason A. Donenfeld wrote: >> Before merging this into the kernel, do you want to wait until you've >> received some public review from academia? > > I would prefer not to wait. Unlike a new primitive whose strength can > only be known through attempts at cryptanalysis, Adiantum is a > construction based on > well-understood and trusted primitives; it is secure if the proof > accompanying it is correct. Given that (outside competitions or > standardization efforts) no-one ever issues public statements that > they think algorithms or proofs are good, what I'm expecting from > academia is silence :) The most we could hope for would be getting the > paper accepted at a conference, and we're pursuing that but there's a > good chance that won't happen simply because it's not very novel. It > basically takes existing ideas and applies them using a stream cipher > instead of a block cipher, and a faster hashing mode; it's also a > small update from HPolyC. I've had some private feedback that the > proof seems correct, and that's all I'm expecting to get. Hi Paul, Eric, The Adiantum paper claims "On an ARM Cortex-A7 processor, Adiantum decrypts 4096-byte messages at 11 cycles per byte, five times faster than AES-256-XTS, with a constant-time implementation." which is surprising to me. The bit slicing NEON AES core runs at ~14 cycle per byte on a Cortex-A15 (when encrypting), so 55 cycles per byte on A7 sounds rather high. Is it really that bad? Also, the paper mentions that the second hash pass and the stream cipher en/decryption pass could be executed in parallel, while your implementation performs three distinct passes. Do you have any estimates on the potential performance gain of implementing that? In my experience (which is mostly A53 rather than A7 based, mind you), removing memory accesses can help tremendously to speed up the execution on low end cores.