Re: [TLS] Eric Rescorla's No Objection on draft-ietf-tls-tls13-vectors-06: (with COMMENT)

Martin Thomson <martin.thomson@gmail.com> Thu, 02 August 2018 02:01 UTC

Return-Path: <martin.thomson@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 288B5130DCA; Wed, 1 Aug 2018 19:01:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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 nPaYmAuE1Z4a; Wed, 1 Aug 2018 19:01:16 -0700 (PDT)
Received: from mail-oi0-x243.google.com (mail-oi0-x243.google.com [IPv6:2607:f8b0:4003:c06::243]) (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 521F0124D68; Wed, 1 Aug 2018 19:01:16 -0700 (PDT)
Received: by mail-oi0-x243.google.com with SMTP id w126-v6so1098244oie.7; Wed, 01 Aug 2018 19:01:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=D4uwgYaDCB7ldbTCFDFPlNCw63Nsaexf+LhadJ5vzYc=; b=t2R0vCwcDX+ZWo1lnaE5JPuJWazJFibpSSz8mfBhbYXwGIIoMMa6tX7qYuRAbRkB8q 5MwZyRwGfe4SVwgPaIo6aIOYXF1fjq6+HLQqu3vCGjWByWZKkEnKwo2Bjr41HSRxJLhW ac3ka2uDnosmfw/gHdnjQhEjlgKRmSNG9isI7q8/sFOPpuhCTZY6uebtZwS6p1WZmkDz 0tG/KXFYZMA3IVTSJTAx9SF/7KUf+HgZs9Ibup/B99Zhz4/8EnGJXF0jTyZfiZ/eLAyk CGsn1P9KZZrCQENLn4M6qjIU3+q6K4ec1+N+6xXreZwJLULUWzzBaPBFSyadIhQyEjd4 s1yA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=D4uwgYaDCB7ldbTCFDFPlNCw63Nsaexf+LhadJ5vzYc=; b=Exza7oyZ+VYLNsyoB+8WTzDaG9IysHv/BRzzWeA5lZxgWzegAFT5qzqRsEfnbQizf0 gHgsrJScGivq9/PqFh98u6tpblTAJ1+c8ZoUAwo0T4IOigl3IEYQ+u6KHG9JoaiQLd9T SpTU3wtWoymsMPpRTKT6vZnNSs+UVd+g4Ytb3pcyr2BNtoTx5py7mkx1bFdyWOA8xIS+ k/o37BkluAMWTgGogH3yHAdC+Zo6iKLOX9XBZVc2+59mb9oiyVRyxD7CAEWHZrQwp25i IO4aJH+xheSV+MWgFChWZm88NOyRrTNCnlgFFp5O/DZd6GWDhzhF09lexfOhipg5ctn3 yckw==
X-Gm-Message-State: AOUpUlFkgtcuOo2JNacgvOmUt1z85Zrs8UNxbOyEhjhobn7RY/7eDXsh 5RueH0YKceZHTnAFHdrLPkhW0+2v1My1oBzZhXY=
X-Google-Smtp-Source: AAOMgpeFGOVdaEpCUwq1tVHnbGVkrLQz1t0szrp/koysO/NMJZN6X5JldAnL4wb6XTy/f+F1btXg9tdNA+ZXiZ9ccIA=
X-Received: by 2002:aca:3d56:: with SMTP id k83-v6mr749228oia.166.1533175275478; Wed, 01 Aug 2018 19:01:15 -0700 (PDT)
MIME-Version: 1.0
References: <153307887249.3105.12827768403582747815.idtracker@ietfa.amsl.com> <CABkgnnUDBN0fW-ZXiyqwzxqXjsSaYmX=Tev8KcKQqaqO4doV9A@mail.gmail.com> <CABcZeBPCqkakU313mHT2e+yxZOnMQUQYjkYBtE-i43i8mvoE2Q@mail.gmail.com>
In-Reply-To: <CABcZeBPCqkakU313mHT2e+yxZOnMQUQYjkYBtE-i43i8mvoE2Q@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Thu, 02 Aug 2018 12:01:06 +1000
Message-ID: <CABkgnnWgCozu2Hb4md8-iTJ1SeSs6HQg6hUtDWgws5KoL02SSQ@mail.gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
Cc: The IESG <iesg@ietf.org>, Sean Turner <sean@sn3rd.com>, tls-chairs <tls-chairs@ietf.org>, draft-ietf-tls-tls13-vectors@ietf.org, "<tls@ietf.org>" <tls@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/APp8Az-6MFvh5UdHX6i9HDP936g>
Subject: Re: [TLS] Eric Rescorla's No Objection on draft-ietf-tls-tls13-vectors-06: (with COMMENT)
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.27
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: <https://mailarchive.ietf.org/arch/browse/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, 02 Aug 2018 02:01:18 -0000

I'm not excited by editing this, but can do so later.  Until all
comments have been addressed, I'd like to retain the ability to
regenerate the draft as necessary.

I've changed the 0 thing, and am OK with the occasional ordering oddity.
On Wed, Aug 1, 2018 at 10:16 PM Eric Rescorla <ekr@rtfm.com> wrote:
>
>
>
> On Tue, Jul 31, 2018 at 10:03 PM, Martin Thomson <martin.thomson@gmail.com> wrote:
>>
>> Thanks for checking on this.  I had a couple of bugs with
>> deduplication that made some of the values unnecessarily repetitious.
>> There are a few values around Finished calculation that I added (the
>> values were there already, but you had to extract them from other
>> values).
>>
>> A preview is available (though that uses the draft version numbers and
>> it doesn't have the Finished values because those changes haven't made
>> it into NSS yet):
>> https://tlswg.github.io/draft-ietf-tls-tls13-vectors/draft-ietf-tls-tls13-vectors.html
>>
>> The diff isn't particularly enlightening because the handshakes are
>> completely different each time, but you should be able to find the
>> specific changes if you look for them.
>>
>> On Wed, Aug 1, 2018 at 9:14 AM Eric Rescorla <ekr@rtfm.com> wrote:
>> > Has anyone checked these besides MT?
>>
>> I wasn't aware that openssl was using them, but Kazu provided a ton of
>> feedback when building this.
>>
>> > COMMENTS
>> > >         salt:  (absent)
>> >
>> > ARen't we using the convention 0?
>>
>> Yes, but "salt: 0" is hard to distinguish from "salt (1 octet): 00",
>> so I decided to be more explicit.  I built special code for this, so
>> it could say anything; what would you prefer it to say?   "(zero)"?  I
>> tend to think that this is OK, but I don't care what it says.
>
>
> Yes, I think 0 would be better.
>
>>
>> > S 3.
>> > >      {server}  extract secret "handshake":
>> > >
>> > >         salt (32 octets):  6f 26 15 a1 08 c7 02 c5 67 8f 54 fc 9d ba b6 97
>> > >            16 c0 76 18 9c 48 25 0c eb ea c3 57 6c 36 11 ba
>> > >
>> > >         IKM (32 octets):  81 51 d1 46 4c 1b 55 53 36 23 b9 c2 24 6a 6a 0e
>> >
>> > You should specify Z above with the DH.
>>
>> The IKM is Z.  I didn't see much point in repeating it.  Besides,
>> because this is driven from logging, it would require a whole bunch of
>> new logging to support recording of the key exchange.
>
>
> I'm suggesting you manually edit the draft.
>
>
>>
>> > S 3.
>> > >      {server}  send a Finished handshake message
>> >
>> > Maybe include more of the finished computaitons.
>>
>> Yeah, the computed HMAC wasn't logged, so I missed it.  If you are
>> willing to review the change to NSS to log the result
>> (https://phabricator.services.mozilla.com/D2589), I can include that
>> in the block explicitly, which is better.
>>
>> > S 3.
>> > >         key output (16 octets):  26 79 a4 3e 1d 76 78 40 34 ea 17 97 d5 ad
>> > >            26 49
>> > >
>> > >         iv info (12 octets):  00 0c 08 74 6c 73 31 33 20 69 76 00
>> > >
>> > >         iv output (12 octets):  54 82 40 52 90 dd 0d 2f 81 c0 d9 42
>> >
>> > This is kind of an odd order.
>>
>> I don't know how else to order this.
>
>
> It's odd that we're computing the handshake keys after the application keys.
> It's just an oddity in NSS.
>
>>
>> > S 4.
>> > >         secret (32 octets):  04 8b 40 aa 09 ff d4 c6 76 9c 54 1a 2f 46 e2
>> > >            84 66 06 f7 0d 62 a6 15 97 77 29 c5 b2 81 c7 e7 15
>> > >
>> > >      {client}  send a ClientHello handshake message
>> > >
>> > >      {client}  calculate finished "tls13 finished":
>> >
>> > You should label this as the binder.
>>
>> Done.  I've added the other inputs to this as well.
>>
>> > S 4.
>> > >         output (32 octets):  a8 19 28 e3 08 5c 3a 85 63 ed 82 2d a9 af 7a
>> > >            b7 1a c5 43 2a 5f 9d 1e 6f 71 32 f1 8b 36 e2 c7 05
>> > >
>> > >      {client}  send handshake record:
>> > >
>> > >         payload (512 octets):  01 00 01 fc 03 03 88 09 d2 a3 9b f9 ae b3
>> >
>> > You should explain why this is 512
>>
>> I don't think that it's appropriate to document all the design choices
>> here; that this is padded is one from many.  (It's also very hard to
>> pick this sort of exceptional condition out for special treatment.)
>
>
> What's relevant is that the previous one is padded and this is not. I think
> that's a very appropriate thing to note. As for special treatment, again,
> you can edit the output. Once this is approved by the IESG, you're not
> going to be able to regenerate it anyway.
>
>
> -Ekr
>