Re: [TLS] Comments on nonce construction and cipher text size restriction.

Martin Thomson <martin.thomson@gmail.com> Tue, 24 May 2016 16:13 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 A8FDA12D7A8 for <tls@ietfa.amsl.com>; Tue, 24 May 2016 09:13:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 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_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 u1mBHr3M_V3D for <tls@ietfa.amsl.com>; Tue, 24 May 2016 09:13:48 -0700 (PDT)
Received: from mail-ig0-x22c.google.com (mail-ig0-x22c.google.com [IPv6:2607:f8b0:4001:c05::22c]) (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 1C4D512D14C for <tls@ietf.org>; Tue, 24 May 2016 09:13:48 -0700 (PDT)
Received: by mail-ig0-x22c.google.com with SMTP id fh2so13500296igd.1 for <tls@ietf.org>; Tue, 24 May 2016 09:13:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-transfer-encoding; bh=3AeesWy2FSulBQ4IwTSlclaq5AmthoRt+0yhiwF+TyY=; b=cH/gHZt6dEUta4VYhmJrXcBBy31sRXSWGM0S9cEKOcEbRCTEi0/E0Quu37ininGX9h omkG6BK5qyElVQJHfs1ZwUHYF0r77QkQ5JWtPaAcje0bGtjgouyyRaYgOK+/v4GThFjV ZSKrXpCsq58LsspBx/y7j4esfRcWFWJd8+4MllPGUD47kuIS4vEXbxIadxnIWPA2ivBz BMtBNLJuiq+AK/VvOUJZbVRQbJZ1+5IJXLSPw1BTeGpX+aHBzyT2i/5OXqecToz4qitl AVY5UaydxxSxbXzZJ4Opl6feDZgMS22KhRoIGpD2+0m0NPlwHZGIikD/TnBuslVlFVeo bwWg==
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:date :message-id:subject:from:to:cc:content-transfer-encoding; bh=3AeesWy2FSulBQ4IwTSlclaq5AmthoRt+0yhiwF+TyY=; b=OF2Z/8LhMKGfBMQVNveWvglfLOZeKnPRyi6D3Gktk3RqHEz0RGQ0ZR/2h8UhzySPbG NgffGOb2IbJh0QAW5I/bYX60ikF61dbX5tEX38uzh3JnGukOaocQi4pV7mhDb7lz34Lv lg5A0tz5CqZKej2ENQ+mbb2qC2Ez+k2O8hQj8OTCCvb5IcimwJAJoppV/BkxpbxRjMQW h9ql6wSg3zWaFx3Os8cWDYlMTr4amxl+YErJavL2mnSNDVeYWOGMhaTRdm2262Xh3n+o DWGkLUoVuUVpwA1GP96VZXkz1VD+/1/DB03XmNpETNMVg7vvYDs9uLKr7HHXsgleZDw4 THEw==
X-Gm-Message-State: AOPr4FVUh7JaZFIdGBKyTf4x6O2ibRwxgt47NwGxd4w6YCn4r4HhmItutXlvZ763TCwWcHUVtIbvGTqLUtkbMg==
MIME-Version: 1.0
X-Received: by 10.50.122.68 with SMTP id lq4mr18961864igb.77.1464106425941; Tue, 24 May 2016 09:13:45 -0700 (PDT)
Received: by 10.36.43.23 with HTTP; Tue, 24 May 2016 09:13:45 -0700 (PDT)
In-Reply-To: <D369E95C.267A5%qdang@nist.gov>
References: <D369E95C.267A5%qdang@nist.gov>
Date: Tue, 24 May 2016 09:13:45 -0700
Message-ID: <CABkgnnVAVYDuWUV0EJ=9iJ69KOwYxR=tzRRB+A96qwKmco8qEg@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
To: "Dang, Quynh (Fed)" <quynh.dang@nist.gov>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/ud_QFkAy7HjV_6Ez1Ov8rWHTI_o>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Comments on nonce construction and cipher text size restriction.
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.17
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: Tue, 24 May 2016 16:13:50 -0000

On 24 May 2016 at 08:20, Dang, Quynh (Fed) <quynh.dang@nist.gov> wrote:
> 1. For this text:  "plus the length of the output of the signing algorithm.
> " in the last paragraph of Section 4.8.1, did you mean "plus the output of
> the signing algorithm.” ?

The text is correct.  It is talking about the length of the structure,
not its contents.

> 2. "The length (in bytes) of the following TLSCiphertext.fragment. The
> length MUST NOT exceed 2^14 + 256. An endpoint that receives a record that
> exceeds this length MUST generate a fatal "record_overflow" alert. " . There
> could be a cipher that generates ciphertext longer than plaintext in some
> cases plus the tag. If the tag was 256 bits, then this requirement would
> disallow that cipher unnecessarily when a record size is 2^14.

The value 256 is octets, not bits.  If you are aware of a need for an
authentication tag longer than 256 octets, now would be a great time
to tell all of us.


> 3. "The padded sequence number is XORed with the static client_write_iv or
> server_write_iv, depending on the role.” I think the ivs are not needed.

We discussed this at quite some length.  I originally took your
position, but the IVs add an extra layer of safety at very little
cost.