Re: [Cfrg] Discuss/standardize Preview extension to AEAD abstraction?

Peter Gutmann <pgut001@cs.auckland.ac.nz> Fri, 04 December 2015 03:15 UTC

Return-Path: <pgut001@cs.auckland.ac.nz>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 07CA51B2B02 for <cfrg@ietfa.amsl.com>; Thu, 3 Dec 2015 19:15:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.21
X-Spam-Level:
X-Spam-Status: No, score=-4.21 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_MED=-2.3, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 dbPb0x5xHb1Q for <cfrg@ietfa.amsl.com>; Thu, 3 Dec 2015 19:15:16 -0800 (PST)
Received: from mx4.auckland.ac.nz (mx4.auckland.ac.nz [130.216.125.248]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 914D51B2AB3 for <Cfrg@irtf.org>; Thu, 3 Dec 2015 19:15:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=auckland.ac.nz; i=@auckland.ac.nz; q=dns/txt; s=mail; t=1449198916; x=1480734916; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=8wwZKawcFhSyKxUUCcFVM8CM2CPKXlHCHoBRIhAJnGo=; b=dhxsB2nov6kZQfr+Hmf8rsoyKyVNlV32f7dmhy14C5UnujCF++sI8mYs FK5p2ZM7PiURsWfzrNrsL+9yD6slmbriImXG1k7Ho0R9lszCMdZvCd+8q ynTBNFxMiMUV0v8b1Cd+px+zqED69agglGVSR2yCleqW1i/Ada/3lcJlL OOha/z9x4H4ii21l65x3v0DNW3YD8OuZDbuqTA0bBY9UhkwfSC4dYlGvb 0BaVb/8TBAzAvuwTLJUhRWwiymq9n+R943TplPbU3PRFeWTsFqCnX82xu UshO8inOZ5DpL9fFJ80FfCECTU5Xibw0ke4i3L1DZYVI+mtTRriDf9G16 w==;
X-IronPort-AV: E=Sophos;i="5.20,378,1444647600"; d="scan'208";a="57592286"
X-Ironport-HAT: MAIL-SERVERS - $RELAYED
X-Ironport-Source: 130.216.4.125 - Outgoing - Outgoing
Received: from uxchange10-fe3.uoa.auckland.ac.nz ([130.216.4.125]) by mx4-int.auckland.ac.nz with ESMTP/TLS/AES256-SHA; 04 Dec 2015 16:15:11 +1300
Received: from UXCN10-5.UoA.auckland.ac.nz ([169.254.5.153]) by uxchange10-fe3.UoA.auckland.ac.nz ([169.254.143.234]) with mapi id 14.03.0266.001; Fri, 4 Dec 2015 16:15:10 +1300
From: Peter Gutmann <pgut001@cs.auckland.ac.nz>
To: Damien Miller <djm@mindrot.org>, Bryan Ford <brynosaurus@gmail.com>
Thread-Topic: [Cfrg] Discuss/standardize Preview extension to AEAD abstraction?
Thread-Index: AQHRLWGSJg47BZwT+U6BjfAGSPRQ4p66KQwO
Date: Fri, 04 Dec 2015 03:15:09 +0000
Message-ID: <9A043F3CF02CD34C8E74AC1594475C73F4B9868A@uxcn10-5.UoA.auckland.ac.nz>
References: <8F1E4FEC-1FED-491B-BC6A-B00C27864414@gmail.com>, <alpine.BSO.2.20.1512031055120.12629@natsu.mindrot.org>
In-Reply-To: <alpine.BSO.2.20.1512031055120.12629@natsu.mindrot.org>
Accept-Language: en-NZ, en-GB, en-US
Content-Language: en-NZ
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [130.216.158.4]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/NYIVmefdVCgbJp361NwXdGGekvY>
Cc: "Cfrg@irtf.org" <Cfrg@irtf.org>
Subject: Re: [Cfrg] Discuss/standardize Preview extension to AEAD abstraction?
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Fri, 04 Dec 2015 03:15:17 -0000

Damien Miller <djm@mindrot.org> writes:

>At the other end, I want to, given enough of the header of that blob, be able
>to determine a) how many bytes I need to read to get the whole thing, b) how
>much space I'll need to extract the plaintext (if any) and c) how much space
>I'll need to extract the AAD (if any).

+1.  This is my big gripe with SSH, it doesn't allow you to do this.

(An elegant trick, mentioned to me by someone else off-list, is to
speculatively read ahead, or at least non-blocking over-read each block, by 5
bytes so you optionally get the info on the next TLS data block before you
need it.  Then you can read and decrypt in-place, for an overhead of close to
1 network I/O/kernel transition/whatever your TCP stack does per block).

Peter.