Re: [TLS] Signed messages should be prefixed with a NUL-terminated context string.

Eric Rescorla <ekr@rtfm.com> Mon, 22 December 2014 21:39 UTC

Return-Path: <ekr@rtfm.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 A831B1A8769 for <tls@ietfa.amsl.com>; Mon, 22 Dec 2014 13:39:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7] 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 Wqc4JwEtkDfa for <tls@ietfa.amsl.com>; Mon, 22 Dec 2014 13:39:18 -0800 (PST)
Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id CC1C61A8758 for <tls@ietf.org>; Mon, 22 Dec 2014 13:39:17 -0800 (PST)
Received: by mail-wg0-f51.google.com with SMTP id x12so7663344wgg.10 for <tls@ietf.org>; Mon, 22 Dec 2014 13:39:16 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=3qiykTTmIfaDxtNIiJ7mOrMApSySkThE31Xl4g+lkYQ=; b=Xx7Evzj38Y0c5L9JqDUg+wsagL7Ip0B5t0uL38NHWXFbD+AGEqrXrqe1ghRRwuNdW9 AqfKYXvlrFP+2LgBsLrx8n3nLPVCL/CsZyM3yiMZG12x1X8K5D6WQaA8mkwptzSqZDAk /YHwPwwpNzLbqR3jTAhTgxoLW+k+DESCo9XsArzAWFBz4TEznOyjBJzoW2G3Cbg6hVw3 sc2DSCQywuFRQkm0Ge/KrBWMMosP7CaGVTwLsQ3pW1u+NW/rGglNbaZc/RiE1SBYGBGn qmf+GCDbEGFnXwPXVVxzxhFGL6+4+FQBsP14P65JXxnIB5cwOFJ23qglSS58rBbkt8Od XFZQ==
X-Gm-Message-State: ALoCoQlEJds2WCzCEamWZ9ROOtRbbfU4HLo2mOe1D9lOLVv4QvlyHXx5l7dSsyONLN7zkM70bW5R
X-Received: by 10.194.108.98 with SMTP id hj2mr46208300wjb.102.1419284356602; Mon, 22 Dec 2014 13:39:16 -0800 (PST)
MIME-Version: 1.0
Received: by 10.27.130.34 with HTTP; Mon, 22 Dec 2014 13:38:36 -0800 (PST)
In-Reply-To: <CAL9PXLwrZCgDUqd8ugqhcpYEBwLOcQXSLg8Kx8fgCq6tzLvO4A@mail.gmail.com>
References: <CAMfhd9XgR-N6BZVLojfyf6E2+0fhYVHopp5FKALoup_GjTji5A@mail.gmail.com> <CABcZeBMmFWOoh6Av=eAaMi6AA1Kb7X41Efie-0PuRZWwPPVz_A@mail.gmail.com> <860778484.3559563.1416987612674.JavaMail.zimbra@redhat.com> <CABcZeBPHQGMNYU1QbG=oeuVZYG71BqVaJU9E9e2Kh+rEWq=RXA@mail.gmail.com> <CAL9PXLwrZCgDUqd8ugqhcpYEBwLOcQXSLg8Kx8fgCq6tzLvO4A@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 22 Dec 2014 13:38:36 -0800
Message-ID: <CABcZeBPY8Jrg_ou_=frs9O2-0nrfL+V-H-jBCxDgQ4Ora55kvQ@mail.gmail.com>
To: Adam Langley <agl@google.com>
Content-Type: multipart/alternative; boundary=089e010d8a8ce92830050ad4e353
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/cKohnB3JU55P0FMV4psqWXq4sJc
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Signed messages should be prefixed with a NUL-terminated context string.
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: Mon, 22 Dec 2014 21:39:19 -0000

Adam updated his PR to sign the prefix concatenated with the handshake
hashes, which makes it easier to have a single hash context.

https://github.com/tlswg/tls13-spec/pull/100

I haven't seen any objections to this idea, so I'll merge this on Wednesday
unless I hear an objection before then.

-Ekr

P.S. I note that this doesn't address
Nikos's issue (
https://www.ietf.org/mail-archive/web/tls/current/msg14764.html)
but that seems separable, and I'd encourage those who think that's a good
idea to weigh in on a different thread.


On Mon, Dec 1, 2014 at 2:28 PM, Adam Langley <agl@google.com>; wrote:

> On Wed, Nov 26, 2014 at 6:09 AM, Eric Rescorla <ekr@rtfm.com>; wrote:
> > If someone wants to contribute a PR so that we can have something
> > concrete to look at that would be even better.
>
> I have submitted a PR for the padding and context-string changes:
> https://github.com/tlswg/tls13-spec/pull/100
>
> I did not change the CertificateVerify structure in the same commit
> because I'm not quite sure that I follow the reasoning. The
> CertificateVerify implicitly contains the client and server nonce
> because it contains all the preceding handshake messages. What's the
> motivation for duplicating them at the beginning? Is it simply to
> avoid having the opaque signer understand the TLS structure? If so,
> does the padding and context strings that I've just proposed break
> that?
>
>
> Cheers
>
> AGL
>