Re: [TLS] Record header size?

Eric Rescorla <ekr@rtfm.com> Tue, 17 November 2015 17:10 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 4FE701A1B40 for <tls@ietfa.amsl.com>; Tue, 17 Nov 2015 09:10:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.677
X-Spam-Level:
X-Spam-Status: No, score=-0.677 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, J_CHICKENPOX_84=0.6] 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 sMqORCZTXIk4 for <tls@ietfa.amsl.com>; Tue, 17 Nov 2015 09:10:10 -0800 (PST)
Received: from mail-yk0-x22a.google.com (mail-yk0-x22a.google.com [IPv6:2607:f8b0:4002:c07::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 B3DF21A1B5A for <tls@ietf.org>; Tue, 17 Nov 2015 09:10:10 -0800 (PST)
Received: by ykfs79 with SMTP id s79so17042787ykf.1 for <tls@ietf.org>; Tue, 17 Nov 2015 09:10:10 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm_com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=UL27LThAhTefllEFPNJSnvtWSFya8Sh94ouIYAo+tiU=; b=0tCipm6ylYW/T+nz/OWfH4/FfLREOy7BbbUz6K/C/7Qm/QprNYpMlsKOJHKAXWJgwe BOkUZmW5pl4+XVhrwNL5LJe7ZbGqFVYR0PaG4X3kkxfA4dVvDfjqVHhPRywvC6OLiadI dj++wTuGoZoJT92WPQZDg2PuuRQRaNssJlUxMlyG3DRnJ0kNj8O/KPgU/AZK+l+7rr+M akrWjdWm4ntcmsb1A71/XqntM0ykx++7HJSIIXXiwHHoQ4OBHg0xE1yTwCEaSiGSLJXi rrKd1716XOef4OBax0E4cCaGgaJvo+5tu0gJlQST9XdV75s9MyqKkoFKr14pwJ5+265+ ay5A==
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=UL27LThAhTefllEFPNJSnvtWSFya8Sh94ouIYAo+tiU=; b=RXOzvXNWLBb4PY5eJZBPzN8Q7iejhCdtpLH+JApbSZbKM+8h4K5YcmlHAuZ+J9bSfg 5MgHodkatmPBJjMjvekYDB7pCrLrZkZwAjB4STMq7IVQP1L4Ix3bdoDT+vqHEuONSO2k Uk8CIFL4eZRNRFYaKLskLeYdFL+0+EOFq1bsRvAgVu6jPnM2dBEl6O7M+Zr2uae7blOF T60LiGZGRdE2/iJR9IZGzmzCI6z1sBcD5rgJ0lF86xXP+joabW1HB612tyc1ny2k2QMN ccZBlZ4O3ddZhMlfJd87ZNG4+dIKNlPHB+waIvcTw2zB8KKWXN7pti+X5r2mmKFfwAT+ 0FKg==
X-Gm-Message-State: ALoCoQkdVPLt8e8G2aeQcbhCi11M+oE8UmsUcjdMdryOwz4PSEA4Z6JMuJhspLU0/3RcWK58i5t0
X-Received: by 10.13.212.9 with SMTP id w9mr17512083ywd.192.1447780209916; Tue, 17 Nov 2015 09:10:09 -0800 (PST)
MIME-Version: 1.0
Received: by 10.13.221.203 with HTTP; Tue, 17 Nov 2015 09:09:30 -0800 (PST)
In-Reply-To: <C5F506DC-F814-4C0B-AFAA-86CF790817A7@akamai.com>
References: <C5F506DC-F814-4C0B-AFAA-86CF790817A7@akamai.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Tue, 17 Nov 2015 09:09:30 -0800
Message-ID: <CABcZeBP5QPQAXKvM_oEAzex0-vrVWMvOW0yZuamvF5hxAHtmtw@mail.gmail.com>
To: "Short, Todd" <tshort@akamai.com>
Content-Type: multipart/alternative; boundary="001a114fa63820362c0524bf9941"
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/67ktzhyuPOnrFbcvdLQhHl4lnVA>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Record header size?
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: <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, 17 Nov 2015 17:10:12 -0000

The concern here is backward compatibility with inspection middleboxes which
expect the length field to be in a particular place. We agreed in Seattle to
wait for early deployment experience before modifying the header to move
the length.

-Ekr


On Tue, Nov 17, 2015 at 7:25 AM, Short, Todd <tshort@akamai.com> wrote:

> Apologies if this has been brought up before.
>
> Has there been any consideration to changing the record header for
> encrypted traffic to be 4 bytes (i.e. 32-bits)? 5 bytes is a very awkward
> size, and some processors do not handle odd byte offsets well (it was a
> complaint I heard from Cisco router/switch engineers).
>
> The latest TLS1.3 draft indicates that the record_version is deprecated
> and must be ignored. If TLSv1.3 is negotiated, then I propose that the
> record_version value must be { 4 } for encrypted records, making the
> version field is a single byte, such that the length of the record_header
> is reduced to 4 bytes.
>
> Alternatively, a TLS extension could be added to negotiate the size of the
> record_header.
>
> Yes, this creates a serious backwards compatibility issue, but if the
> record_version field is deprecated, then perhaps a change to the
> record_header could be made.
>
> Thus:
>
>    struct {
>        uint8 major;
>        uint8 minor;
>    } ProtocolVersion;
>
>    struct {
>        ContentType type;
>        ProtocolVersion record_version = { 3, 1 };    /* TLS v1.x */
>        uint16 length;
>        opaque fragment[TLSPlaintext.length];
>    } TLSPlaintext;
>
>    struct {
>        ContentType opaque_type = application_data(23); /* see
> fragment.type */
>        uint8 record_version = { 4 };    /* TLS v1.3 4-byte record header */
>        uint16 length;
>        aead-ciphered struct {
>           opaque content[TLSPlaintext.length];
>           ContentType type;
>           uint8 zeros[length_of_padding];
>        } fragment;
>    } TLSCiphertext;
>
> --
> -Todd Short
> // tshort@akamai.com
> // "One if by land, two if by sea, three if by the Internet."
>
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls
>
>