Re: [TLS] CPU cost of 1RTT handshake

Eric Rescorla <ekr@rtfm.com> Mon, 11 August 2014 04: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 9E8581A02CF for <tls@ietfa.amsl.com>; Sun, 10 Aug 2014 21:10:21 -0700 (PDT)
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 C7OharXHMXZD for <tls@ietfa.amsl.com>; Sun, 10 Aug 2014 21:10:20 -0700 (PDT)
Received: from mail-we0-f180.google.com (mail-we0-f180.google.com [74.125.82.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 110311A01B0 for <tls@ietf.org>; Sun, 10 Aug 2014 21:10:19 -0700 (PDT)
Received: by mail-we0-f180.google.com with SMTP id w61so7912353wes.25 for <tls@ietf.org>; Sun, 10 Aug 2014 21:10:18 -0700 (PDT)
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=QmJHFx2xRTPE3qYGQZlBBXjfsixgjwNep/6LOljUCWQ=; b=nJEqySRsB6EssK9VTuWdq9m1kMtPSsdHRdsbcXw8vf4IjRBD8R+DxSikyl447tJP6n 8Ar45h+kcovzisDvB63PPFGoiJWPqti9yPA87S4LwOqQRZznIbtdS89VweNzCB2paWi9 0GxBDmC+BkU6h7MVpFko1P1OUcDoyxlS3sQi2qhk8/qz4TYbFneop6g0wKxbJhI7tyMq xPcNZf81NiqRUWyqE/x0AoOjF6MIXDw9GlXqajEUSe17z4G7JCmuvbo8FlpEJFEAsgZn TMdqKRx8hfpu+nse6hGT6Dz8sDbM/6HUx2pdoPU6fVJbbPrAqUXOML3vjLzO05+D5FeD 2+8Q==
X-Gm-Message-State: ALoCoQmSb4sSsZrjyiAlE0Zr8JlZlp3Yq8GCldYV/CY/blk6k0D8My8U4EjrRB7Hbosiw7ZRhy6w
X-Received: by 10.194.184.166 with SMTP id ev6mr17265071wjc.61.1407730218671; Sun, 10 Aug 2014 21:10:18 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.217.128.12 with HTTP; Sun, 10 Aug 2014 21:09:38 -0700 (PDT)
X-Originating-IP: [74.95.2.168]
In-Reply-To: <CACsn0cmxi5DdJz=XosLe3Kw=NYQnpm7PbzyPtqZAQrinzTsgAQ@mail.gmail.com>
References: <CACsn0cmxi5DdJz=XosLe3Kw=NYQnpm7PbzyPtqZAQrinzTsgAQ@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Sun, 10 Aug 2014 21:09:38 -0700
Message-ID: <CABcZeBOfaWM=nVAcGu_TV2yM7C95Xf6UFhWx1jBPAGYM8+Dkqg@mail.gmail.com>
To: Watson Ladd <watsonbladd@gmail.com>
Content-Type: multipart/alternative; boundary="047d7bae49329fb85f050052bbd1"
Archived-At: http://mailarchive.ietf.org/arch/msg/tls/JZwv4d5l8EEHXAn7F5smpPkEDLk
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] CPU cost of 1RTT handshake
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, 11 Aug 2014 04:10:22 -0000

On Sun, Aug 10, 2014 at 1:35 PM, Watson Ladd <watsonbladd@gmail.com> wrote:

> Dear all,
>
> Right now, instead of the server defining the group to be used and
> sending a key in the group, the client computes multiple keys, and the
> server selects one. This is very bad for embedded devices with
> constrained CPU, especially if they are connecting to a server over
> high-latency, low-bandwidth links.
>
> The justification for the current behavior is similarity to 0-RTT. But
> I'm not convinced that this actually makes the protocol or
> implementations any simpler, and it has real costs for many devices
> that will otherwise not adopt TLS or try to invent their own encrypted
> protocols.
>

I'm not sure I would phrase the protocol behavior exactly as you have
above. Rather, the client sends a list of the groups it supports  (as in
TLS 1.2). It can also send any number of (EC)DHE shares that match
those groups. If the server selects a group that matches one of those
shares, the handshake proceeds. Otherwise, the server tells the
client which group it has selected and the client then adds a share
from that group to the list.

In other words:

1. The server does get to select the group as  it can reject all the
client's shares (thougb of course it cannot force the client to use
a group it does not accept or know about)..

2. The client is not forced to send any shares. It can simply send
an empty ClientKeyExchange (See S 7.4.2) and then wait for the
server to select a group. In other words, it can act as you suggest
above, but at the cost of a round trip. It's a explicit computation/
latency tradeoff.

-Ekr