Re: [Cfrg] Adopting "AES-GCM-SIV: Nonce Misuse-Resistant Authenticated Encryption" as a CFRG document ---- Some clarifications

Adam Langley <agl@imperialviolet.org> Tue, 26 April 2016 17:25 UTC

Return-Path: <alangley@gmail.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A025912D0A8 for <cfrg@ietfa.amsl.com>; Tue, 26 Apr 2016 10:25:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.4
X-Spam-Level:
X-Spam-Status: No, score=-2.4 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.199, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 40SbO4LMS1_9 for <cfrg@ietfa.amsl.com>; Tue, 26 Apr 2016 10:25:02 -0700 (PDT)
Received: from mail-ig0-x241.google.com (mail-ig0-x241.google.com [IPv6:2607:f8b0:4001:c05::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A5F2812B02A for <cfrg@irtf.org>; Tue, 26 Apr 2016 10:25:02 -0700 (PDT)
Received: by mail-ig0-x241.google.com with SMTP id c3so2872351igl.3 for <cfrg@irtf.org>; Tue, 26 Apr 2016 10:25:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=/oD5nNbJhGuvBN9hPpWNeSQiuMS8OzGOttKScr72TeU=; b=essntUzK1S5I4cCcqwhugDVhyA15+QDKDslhRt/+B+9qBOxeU73KHi75+ADYoMYYD0 2cscEJK8pBT5szimWJwfcSxxtKmsV325cPwYqxBs8+DhsnFj4tsING0qyP+iS19ZMFsx BrHOaZ87d5Ke/tJy6/+wF8qvFSBaVBe9c11gaM3FIhbuy4CzQjETTcmfLDNwSplenaMC g9NhxOpqIFmoTDVRnmXQPh4PGsflxsWOlzx/o4AMuA/Vp4r3Fl+pAZ0DyVK2XuXAYfxb vknhnCh945Ab2Uyr/TOt2WNKLwUPvproHwit/gnnWf5tUtWhzCHgbxMarvvdZoHMm74m r4mg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=/oD5nNbJhGuvBN9hPpWNeSQiuMS8OzGOttKScr72TeU=; b=jYPs75rKV9XwVKSNMOTvRGw2cc7T4hmB0vYr48lSWQkV1byh6P73SU7tFicXHIZMyr wZM3cWgOm0Uyv5PCIs9GIKHoXoeoz981jhxXrNJZMg9VcDKzDk3rWtn+CBTTpRcf3qrj Mt+O9NpMd0ha3CkwCafMHa/G6h4RHrykB8wqeosoC+lzN8B1eyBCPUURHOdy7VrlwrJU SCAuO9x/XIlGy+kOlMOaU33De58xSFaDaOn5LbOatz/+4nrm0/p4PKY1ASfiEuJL28uP g6ICoreStgz49gGA23bd2Ggq6Rrf2ycHzfr+qRfFFEhCYMdYQu1mMHcXFo1GPCHC22cb r+1w==
X-Gm-Message-State: AOPr4FUkQREhncMrMb7f7bXP3KZf8MzABzAobBlPETbuZwrCMTgwfjYW+S7Pi/DVqSlVVHoHLZnO8BwNUlcJWA==
MIME-Version: 1.0
X-Received: by 10.50.28.113 with SMTP id a17mr4923202igh.44.1461691502008; Tue, 26 Apr 2016 10:25:02 -0700 (PDT)
Sender: alangley@gmail.com
Received: by 10.79.117.133 with HTTP; Tue, 26 Apr 2016 10:25:01 -0700 (PDT)
In-Reply-To: <CALCETrWnuuhQGP7zLO9kh+EEsOXaDZycQVSge_=8R38cQj1-vQ@mail.gmail.com>
References: <D33EAB85.2AC03%uri@ll.mit.edu> <emd177ba4d-0be1-4293-afb1-fc0b1a9c54f9@sgueron-mobl3> <CALCETrWnuuhQGP7zLO9kh+EEsOXaDZycQVSge_=8R38cQj1-vQ@mail.gmail.com>
Date: Tue, 26 Apr 2016 10:25:01 -0700
X-Google-Sender-Auth: qRVvrnfW50iYCZ97NUkmb5U3ZgY
Message-ID: <CAMfhd9Xex0JLW8UWrUAjQb-bTizCp7XKCsgPB3R1k2eM3Pzuwg@mail.gmail.com>
From: Adam Langley <agl@imperialviolet.org>
To: Andy Lutomirski <luto@amacapital.net>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/cfrg/ePIFMvpdVCYH6_oHki6565Jzdt0>
Cc: Yehuda Lindell <yehuda.lindell@biu.ac.il>, "cfrg@irtf.org" <cfrg@irtf.org>, Adam Langley <agl@google.com>
Subject: Re: [Cfrg] Adopting "AES-GCM-SIV: Nonce Misuse-Resistant Authenticated Encryption" as a CFRG document ---- Some clarifications
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.17
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: Tue, 26 Apr 2016 17:25:06 -0000

On Tue, Apr 26, 2016 at 9:44 AM, Andy Lutomirski <luto@amacapital.net> wrote:
> Then you're violating one of the basic properties that even
> non-nonce-misuse-resistent schemes provide: when you encrypt two
> messages using different nonces, you shouldn't reveal whether they're
> the same message.  As proposed, this mode does *not* have that
> property.

Although the record encryption key may be the same for pairs of
messages in AES-256 mode, that doesn't lead to identical plaintexts
having identical ciphertexts because the nonce is xored into S_s,
which ends up controlling the tag and thus the initial counter.

Still, Shay and I chatted and the idea to XOR the nonce with 1 for the
second half seems like it might be cleaner. I believe that Shay and
Yehuda are working on updating the analysis and may incorporate this
change.


Cheers

AGL

-- 
Adam Langley agl@imperialviolet.org https://www.imperialviolet.org