Re: [Cfrg] AES GCM SIV analysis

Brian Smith <brian@briansmith.org> Thu, 19 January 2017 03:53 UTC

Return-Path: <brian@briansmith.org>
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 C2A231294A7 for <cfrg@ietfa.amsl.com>; Wed, 18 Jan 2017 19:53:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.601
X-Spam-Level:
X-Spam-Status: No, score=-2.601 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, 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=briansmith-org.20150623.gappssmtp.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 s7lYitFbdOlu for <cfrg@ietfa.amsl.com>; Wed, 18 Jan 2017 19:53:11 -0800 (PST)
Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (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 48159127071 for <cfrg@irtf.org>; Wed, 18 Jan 2017 19:53:11 -0800 (PST)
Received: by mail-it0-x230.google.com with SMTP id 203so132318151ith.0 for <cfrg@irtf.org>; Wed, 18 Jan 2017 19:53:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=briansmith-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=pnPzCYDQaq5MNGYp2OEg7+HkdBLwkHXeKMAqb36klzk=; b=a/3PMMlIq4cOTSyw7snr8ADOB0DlNd04bTMtqUY1Y4lhKZXztFyHjyeKBcuM7tepmW 6wQBSZzhPbEk9YnCXFUaWjcqP0IoYpBw/kCGLblDXs13Iyu/dJiFIZ+hc9vUeBj/ZrJN cF5JmTTP+OHy0H/U1UrBPNsgB4t8Ae6MeCgWubk+gEx0A1HoV2v+qQuJidnm81rzz5tL FgtlaBog8Y3V3GbSoiDfUevhGOmvpooQOuYswEyzs3dWUNjJQtm+b0wLEEfXyzRNgCS3 3a3GCBzEorlVgLaFM+zeVh2qDrGQff8vNKx+nib365E3/URX5pzE1Y3P8ASsegU98/N8 bWYg==
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=pnPzCYDQaq5MNGYp2OEg7+HkdBLwkHXeKMAqb36klzk=; b=oRYMKw/k3YaW8ihhStOzzeaSZj/0EDW03+lwlsRkO4PO7pzSJvUk6u0G9pJ9RxCIIi yHZ3/zqd3g6SqOSQ/0gDiU7kB6+salgdD0WdhucWhgpil+g4iI6pmQCQYg3NSSEt59ny DeXy5XvNxXxU8aWF+J6fhtvEqrdDsA3r3mMgGKPuB7Ahn1SanfLAsa+9CJnKCnXgGH3C 0ezKzJiuCrninMY/c/mUtA6e2SRqZL8PlsUBcjmH/a5+p772x+SJHKD707tLV5OvLde/ ujut0dq3gVHzkjaJeZGxbM487/flkiTgZAL1ECVn3Tf0cE5FfSJ/FokLjRt2ztFCSpci YxJQ==
X-Gm-Message-State: AIkVDXIxGkocgCEBZkf6WzPUe/1ofy/+wgVmHwtqSFr//oGLtSoxvMaVD0cJPZVrXN5YW4EppFaszaoVPqhq0A==
X-Received: by 10.36.40.195 with SMTP id h186mr14331709ith.117.1484797990491; Wed, 18 Jan 2017 19:53:10 -0800 (PST)
MIME-Version: 1.0
Received: by 10.36.65.206 with HTTP; Wed, 18 Jan 2017 19:53:09 -0800 (PST)
In-Reply-To: <CAMfhd9VNXAO=c2zw0UoVLDSL=BQL0JYVf8qVFLguoVv0ADsoWg@mail.gmail.com>
References: <D120A224329B7F4CA6F000FB5C0D964C01EBE26F73@MSMR-GH1-UEA07.corp.nsa.gov> <D120A224329B7F4CA6F000FB5C0D964C01EBE26F86@MSMR-GH1-UEA07.corp.nsa.gov> <D120A224329B7F4CA6F000FB5C0D964C01EBE26FEA@MSMR-GH1-UEA07.corp.nsa.gov> <CAMfhd9V77LN41QTt4YvNs-bjUan_PtdrEiQeHvKXY+G+k2z1kw@mail.gmail.com> <CAFewVt5VVpEKVGCt_c6UhG5sJ66xFfLUdOs4EZdnbgbTNPrFjA@mail.gmail.com> <CAMfhd9VNXAO=c2zw0UoVLDSL=BQL0JYVf8qVFLguoVv0ADsoWg@mail.gmail.com>
From: Brian Smith <brian@briansmith.org>
Date: Wed, 18 Jan 2017 17:53:09 -1000
Message-ID: <CAFewVt7kXyUcDATZ4yjvC0OOBE3-NLh9rGkHvLm1z4K9YQEBhg@mail.gmail.com>
To: Adam Langley <agl@imperialviolet.org>
Content-Type: text/plain; charset=UTF-8
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/g1nrA7JD6lffkcA48ByWh6UYM_A>
Cc: "Cooley, Dorothy E" <decoole@nsa.gov>, "cfrg@irtf.org" <cfrg@irtf.org>
Subject: Re: [Cfrg] AES GCM SIV analysis
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: Thu, 19 Jan 2017 03:53:13 -0000

Adam Langley <agl@imperialviolet.org> wrote:
> Brian Smith <brian@briansmith.org> wrote:
>> The actual text in the draft is "Thus with AES-GCM-SIV we recommend
>> that, for a specific key, a nonce not be repeated more than 2^8
>> times."
>>
>> Is this a meaningful recommendation? How would one go about following
>> this recommendation in a practical implementation? In particular,
>> AES-GCM-SIV is mostly interesting in implementations that cannot
>> reliably and/or consistently save state, and it seems like any attempt
>> to write code to enforce this relies on saving state [snip]

> [snip] With a random, 96-bit nonce you don't have to worry
> about the probability of having repeated a single value > 2^8 times
> until you have a staggering number of plaintexts: greater than 2^100
> of them. Since that vastly exceeds our current recommendation for
> number of plaintexts per key (2^50), it's basically not a concern.
>
> If that makes sense, what could we have written to be clearer?

Perhaps: "We recommend instead that an implementation try to avoid
repeating a nonce for a specific key, just like it would it would do
for an AEAD that isn't nonce-misuse-resistant." This shifts the
emphasis away from the 2^8 number to where it belongs, IMO. Note that
"256" and how it is derived and why it is safe is explained in the
next paragraph anyway.

> I agree that large AEAD messages have several problems. But I don't
> think that we have any need for a larger nonce (see above). (And the
> nonce is used with a counter only in the KDF phase, so it's unrelated
> to the maximum plaintext size.)

Is there any way that a larger nonce (e.g. 120 bits) hurts, other than
being inconsistent with existing IETF AEADs?

Cheers,
Brian
-- 
https://briansmith.org/