Re: Packet Number Encryption Performance

Willy Tarreau <w@1wt.eu> Fri, 22 June 2018 05:57 UTC

Return-Path: <w@1wt.eu>
X-Original-To: quic@ietfa.amsl.com
Delivered-To: quic@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B3077130DDE for <quic@ietfa.amsl.com>; Thu, 21 Jun 2018 22:57:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.901
X-Spam-Level:
X-Spam-Status: No, score=-1.901 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1M_2XtovTSf3 for <quic@ietfa.amsl.com>; Thu, 21 Jun 2018 22:57:48 -0700 (PDT)
Received: from 1wt.eu (wtarreau.pck.nerim.net [62.212.114.60]) by ietfa.amsl.com (Postfix) with ESMTP id 71CFC130DEB for <quic@ietf.org>; Thu, 21 Jun 2018 22:57:48 -0700 (PDT)
Received: (from willy@localhost) by pcw.home.local (8.15.2/8.15.2/Submit) id w5M5vjjk004896; Fri, 22 Jun 2018 07:57:45 +0200
Date: Fri, 22 Jun 2018 07:57:45 +0200
From: Willy Tarreau <w@1wt.eu>
To: Kazuho Oku <kazuhooku@gmail.com>
Cc: Nick Banks <nibanks@microsoft.com>, "quic@ietf.org" <quic@ietf.org>
Subject: Re: Packet Number Encryption Performance
Message-ID: <20180622055745.GA4889@1wt.eu>
References: <DM5PR2101MB0901FCB1094A124818A0B1FEB3760@DM5PR2101MB0901.namprd21.prod.outlook.com> <CANatvzxVBq1-UKiuixWGFfFyWMh8SYpp=y2LqYwiF=tHT6oOOQ@mail.gmail.com> <DM5PR2101MB0901C834F1FDFEC6D0D50781B3750@DM5PR2101MB0901.namprd21.prod.outlook.com> <CANatvzz0u=oy1j2_6=bn6bcuwzQv_6fVqe3WkBtjwaAZ8Bfh=w@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CANatvzz0u=oy1j2_6=bn6bcuwzQv_6fVqe3WkBtjwaAZ8Bfh=w@mail.gmail.com>
User-Agent: Mutt/1.6.1 (2016-04-27)
Archived-At: <https://mailarchive.ietf.org/arch/msg/quic/v7LYzpc52vROSlzzjLliQmElRMQ>
X-BeenThere: quic@ietf.org
X-Mailman-Version: 2.1.26
Precedence: list
List-Id: Main mailing list of the IETF QUIC working group <quic.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/quic>, <mailto:quic-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/quic/>
List-Post: <mailto:quic@ietf.org>
List-Help: <mailto:quic-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/quic>, <mailto:quic-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 22 Jun 2018 05:57:51 -0000

Hi Kazuho,

On Fri, Jun 22, 2018 at 12:22:39PM +0900, Kazuho Oku wrote:
> As stated in my previous mail, the 10% of overhead consists of three parts,
> each consuming comparable number of CPU cycles. The two among the three is
> related to the abstraction layer and how CTR is implemented, while the
> other one is the core AES-ECB operation cost.
> 
> It should be able to remove the costly abstraction layer.
> 
> It should also be possible to remove the overhead of CTR, since in PNE, we
> need to XOR at most 4 octets (applying XOR is the only difference between
> CTR and ECB). That cost should be something that should be possible to be
> nullified.
> 
> Considering these aspects, and by looking at the numbers on the OpenSSL
> source code (as well as considering the overhead of GCM), my expectation
> goes to 2% to 4%.

Well, probably that we don't need the 10 full AES rounds and could
have enough of 2 like some of the SHA3 proposals did, or even maybe
just one. These ones take a few tens of CPU cycles on modern CPUs,
possibly less, and are probably more than enough to prevent the
linkability people are concerned with.

Just my two cents.
Willy