Re: [Cfrg] Help with the use of contexts

Adam Langley <agl@imperialviolet.org> Mon, 16 January 2017 18:45 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 A36AB12960C for <cfrg@ietfa.amsl.com>; Mon, 16 Jan 2017 10:45:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.597
X-Spam-Level:
X-Spam-Status: No, score=-2.597 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=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 hpr7R0AXtVh5 for <cfrg@ietfa.amsl.com>; Mon, 16 Jan 2017 10:45:36 -0800 (PST)
Received: from mail-io0-x22a.google.com (mail-io0-x22a.google.com [IPv6:2607:f8b0:4001:c06::22a]) (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 DEAE3129609 for <cfrg@irtf.org>; Mon, 16 Jan 2017 10:45:35 -0800 (PST)
Received: by mail-io0-x22a.google.com with SMTP id l66so98127900ioi.1 for <cfrg@irtf.org>; Mon, 16 Jan 2017 10:45:35 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=ZtIhfe7O1K5sRrSAM6TGL2pTCcufR5/t3lEyMl40kNc=; b=UIry+Z4zBzlQci9KTskxeG3bQjMQB7XTBtOPDOTKY34YJROVJ4q4+VWVm2+2FvYo2+ 5SLGhyYb0xa5C+cB3KsSJgZcya9OySnTkGlMwUPXyBdO9evYMMZP/S183ReSaVyiNj88 aaiaUWtChRMlzn6kxFw/DeVEfiU0nQo4poay5QFtpwjZzihqQN2taKeVmmSKC65kMoDV myvrmjiXm1wjHJ8ZTyd+2SwA9EF1Bt7CNiZSl7MdKsExlcMoxkLcMh7zAyADI1884S9M eSPutOgSrR2qMEjJQgJyBCjWqI9q0ozRmw+qRt/bGIhdMgcKZ2Fl4B0ozYwgDUDBrVXj pmEw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=ZtIhfe7O1K5sRrSAM6TGL2pTCcufR5/t3lEyMl40kNc=; b=lU/RN6l7fZZqfnf+LOXwMytE09CF6RNjNP9An7K8Nze0Dih9ybmsNTqVDDr7Pxolyt 9rukBmPg1vYW6Tf0xt78mB3hU7AuiQn2xu0XsctqTTZ1c8WRTAppSigwwvbzLwtaTdxf jtThgRBRPIkPWD0BcE5NJloLgPTipE+KO7c9D14XV3RB26AIhMxM/eMPV/evMM3R/TlB TnX2X0uByOP/TcxB4Mcm8FtGpiAMUbEZApvDS5bumIz26pR+PePOfEjKHhYlV4xPjS/e e1PqQyIrD0n/6GF2pB/N+tEardjIj/yRWLppP9n6U9s2RJ3ALPun9K+pW/MrBxpyKfBA gagw==
X-Gm-Message-State: AIkVDXLd4PeLTYXHi9l/ri9Wr/za56onpYBmjSncgManqsKWbaMr1VB2uqg0JOwbgrMlVrugT0e5lP7xt0WR8Q==
X-Received: by 10.107.141.80 with SMTP id p77mr30812670iod.97.1484592335117; Mon, 16 Jan 2017 10:45:35 -0800 (PST)
MIME-Version: 1.0
Sender: alangley@gmail.com
Received: by 10.36.27.136 with HTTP; Mon, 16 Jan 2017 10:45:34 -0800 (PST)
In-Reply-To: <E3C4D457-2407-4295-9F45-B3CA0AE715DD@sn3rd.com>
References: <E3C4D457-2407-4295-9F45-B3CA0AE715DD@sn3rd.com>
From: Adam Langley <agl@imperialviolet.org>
Date: Mon, 16 Jan 2017 10:45:34 -0800
X-Google-Sender-Auth: mitSjflYPWgchKHW6TEEmrz2fnQ
Message-ID: <CAMfhd9WgPYfiCULuQpFOVeoLEEX__dZCa=ZoZuzdSJ_i9da5PQ@mail.gmail.com>
To: Sean Turner <sean@sn3rd.com>
Content-Type: multipart/alternative; boundary="94eb2c061a1cc562ab05463a96b4"
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/J1PRDJ3yHWzn9UaiEuTHe3cI6ZM>
Cc: IRTF CFRG <cfrg@irtf.org>
Subject: Re: [Cfrg] Help with the use of contexts
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: Mon, 16 Jan 2017 18:45:39 -0000

On Wed, Jan 4, 2017 at 1:55 PM, Sean Turner <sean@sn3rd.com> wrote:

> The TLS WG is nearing the end of our journey moving EC-based algorithms
> for TLS 1.2 (and earlier) from Informational to Standards track [0].  While
> we were doing that we also added in 25519 and x448 as well as EdDSA.
>
> I’d like to get some input from the CFRG on the use of contexts; the
> "context label" is a way to provide domain separation between signatures
> made in different contexts, avoiding cross-protocol attacks.  s10.3 of
> draft-irtf-cfrg-eddsa includes the following:
>
> Contexts SHOULD NOT be used opportunistically, as that kind of use
> is very error-prone.  If contexts are used, one SHOULD require all
> signature schemes available for use in that purpose support
> contexts.
>
> This is great advice for new protocols because it’s easy to make all the
> schemes the same, but for existing protocols like TLS where there’s zero
> chance of obsoleting the existing signature schemes and defining new
> signature schemes with contexts it makes you wonder what
> “opportunistically” means. I.e., would setting a context parameter for
> Ed448 and no other already defined signature scheme be considered
> opportunistic?
>

Domain separation for signed values is important and TLS already defines
context strings for signature operations:
https://tools.ietf.org/html/draft-ietf-tls-tls13-18#section-4.4.2

The way that this is constructed (due to me) is generic for any signature
scheme. (Basically just have the context string be NUL-terminated at the
beginning of the signed message.)

So for TLS I believe that the issue is already taken care of. It would also
probably just add pain for implementers if the context string were to be
duplicated as an input to the signature scheme where signature schemes
support it.


Cheers

AGL

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