Re: [TLS] shibboleth and the nonce

Adam Langley <agl@imperialviolet.org> Thu, 24 July 2014 19:05 UTC

Return-Path: <alangley@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CAA041A0A98 for <tls@ietfa.amsl.com>; Thu, 24 Jul 2014 12:05:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.278
X-Spam-Level:
X-Spam-Status: No, score=-1.278 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=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 SKCdprrWdZ6K for <tls@ietfa.amsl.com>; Thu, 24 Jul 2014 12:05:06 -0700 (PDT)
Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com [IPv6:2a00:1450:4010:c04::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 458D81A0B15 for <tls@ietf.org>; Thu, 24 Jul 2014 12:05:05 -0700 (PDT)
Received: by mail-lb0-f174.google.com with SMTP id c11so2649584lbj.33 for <tls@ietf.org>; Thu, 24 Jul 2014 12:05:03 -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:content-type; bh=cLxn2YVoDzrkuw1BuiQby0Bt/OBchWhS2qzh8NWkgwE=; b=cqs1hUZIR/EBZyKrEm7Pfne/T1FxQlZ23yG7oUPY82J1Q5HmOrzt0Ihe1Y/riHUmU9 HvWTUsT2XwjPu/9dCOqMoCJxMpQK8cAvs6iw5PGMh6FDiEjrXXq8w1YuauKlwG9dk6yJ wzaFwNaaXPS0QNPp9SlijdAqYoetqeQMrtig1XaeifSpUGua33rxgbfih4h5vbUXCWTq SrKIgElWUQh586JSkgFaQ7W/NeohuVan8XjmXkFIgEYLaK8Fj7eDJ6si8Out7l38NYn8 6r6Q7RKhHgdPVUdPeU/NlM6CTYcCg387eejz5mbj6cx0VrIbm/c0fF8r0Yi+QuXRgaYa a15g==
MIME-Version: 1.0
X-Received: by 10.152.3.65 with SMTP id a1mr11780340laa.76.1406228703573; Thu, 24 Jul 2014 12:05:03 -0700 (PDT)
Sender: alangley@gmail.com
Received: by 10.112.170.37 with HTTP; Thu, 24 Jul 2014 12:05:03 -0700 (PDT)
In-Reply-To: <CABkgnnXJ4c6DqZPG+Y5m1BRX+hCjVSg4xi40po4AOuU1F4TFQA@mail.gmail.com>
References: <CABkgnnXJ4c6DqZPG+Y5m1BRX+hCjVSg4xi40po4AOuU1F4TFQA@mail.gmail.com>
Date: Thu, 24 Jul 2014 12:05:03 -0700
X-Google-Sender-Auth: bTDCT9JUDMx1RzlXBsOkoNVBDVg
Message-ID: <CAMfhd9Uca1drheHFywqCE-ZE8tzRT3g03qBTZw7YpP8ECZeaiQ@mail.gmail.com>
From: Adam Langley <agl@imperialviolet.org>
To: Martin Thomson <martin.thomson@gmail.com>
Content-Type: text/plain; charset=UTF-8
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/S2AXwDDh9sqOfGI5FoI3iTRyT28
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] shibboleth and the nonce
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 Jul 2014 19:05:07 -0000

On Thu, Jul 24, 2014 at 11:21 AM, Martin Thomson
<martin.thomson@gmail.com> wrote:
> As far as I am aware, there are no concrete concerns about implicit
> nonces from a straight-up security perspective.  Is that right?

For polynomial MACs, no. (For CBC mode, yes.)

> The previous response to suggestions that the nonce was a required
> input was to have a counter produce the nonce input, with a matching
> counter and validation in the module.
>
> The new information yesterday was that David McGrew suggested that the
> nonce needed to be arbitrary.  In that case, do we actually need the
> input to be validated?  Does the certification process check that the
> module produces different output for different nonces by starting
> separate module instances with the same values for all other inputs
> (keys, ad, and plaintext) then varying the input nonces?
>
> I'm sure that there are other concerns, but it's hard for me to make
> an assessment based on the information made available thus far.

I'm not sure that I understand David McGrew's reported suggestion here.

I thought that the concern was that the "crypto module" (being the
thing that is validated) needs to ensure that nonces don't repeat
because the security of the system should be a property of the crypto
module alone.

In that case, the module can either generate random nonces itself, or
it can use a counter. In either case, the nonce isn't an input to the
module when encrypting. If it were then, in order to establish
uniqueness, the module would need to remember a list of all previous
nonces.

With AES-GCM, the nonces are explicit which allows the crypto module
to generate them itself and report them to the TLS layer for
transmission. With implicit nonces, the crypto module can use a
counter and the counter keeps in sync with the TLS sequence number.


Cheers

AGL

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