Re: [TLS] Negotiated Finite Field Diffie-Hellman shared secret calculation

David Benjamin <davidben@chromium.org> Wed, 20 February 2019 19:08 UTC

Return-Path: <davidben@google.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 DD35D130E7B for <tls@ietfa.amsl.com>; Wed, 20 Feb 2019 11:08:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.5
X-Spam-Level:
X-Spam-Status: No, score=-9.5 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
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 vopd5W7xN2uf for <tls@ietfa.amsl.com>; Wed, 20 Feb 2019 11:08:21 -0800 (PST)
Received: from mail-qt1-x82e.google.com (mail-qt1-x82e.google.com [IPv6:2607:f8b0:4864:20::82e]) (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 9A2C4130E7A for <tls@ietf.org>; Wed, 20 Feb 2019 11:08:21 -0800 (PST)
Received: by mail-qt1-x82e.google.com with SMTP id z39so28584211qtz.0 for <tls@ietf.org>; Wed, 20 Feb 2019 11:08:21 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=GnJ4CGT3gk5j3PrBruiREC1jlnPB0uO8qYipMPdQnDc=; b=MeSNtfTaVgZmrDnQ8sT4pLL5yeH6IJq06XVsOKKhwv7oM19aECY42PnIXAKZm0KuGk 1ZWR6CZZou9KVxFVqshXwnPdsyWnsgPyfImdyBCrizOwjHJoT8V5eTSlRhouYmusIcx3 /QpF1ACxHmEb+ovitDoDdJSTlQkOO5/ACqybQ=
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=GnJ4CGT3gk5j3PrBruiREC1jlnPB0uO8qYipMPdQnDc=; b=VkAEGCtkd8Y+xaP0v6Dh7JBeKIRNme/iJAIKT4y8HRg/lbCV1DQIHsvZBXDbHpdhoP YX26ZcNCPsG2nJ6TlXlRiI0hfTA4OqgvoBoJ0LNgj/hH2o2jI1tf4CTQKNtmoqIdjvmY AVuIsqP+iQskWGx0O/ka2SHwepntapkUUqk4UJOgP0yx4BhJrTMIYFJHME1JYFrleV3g yr/BJfSdwCsymCmUYsAI0DBFqxItG4QMUR1XchhL22GBwIhS8XWU4YKvJOzeZaD22SpA Y+94W0vkKylk7cgH3VgOMaaIOXD3XFRQJyzn/5ZbY2QWcsX4oQXTptlvSBbdJ2NCOavX P3GQ==
X-Gm-Message-State: AHQUAuaIIdmz09ywFx9V9mXIv+pz/teTKRBWoEPE5YqHe94MgOXqH75p eZqWKFKQdo7xK9AG991FQqrIaIV70a7vLLNLhzLI
X-Google-Smtp-Source: AHgI3IZEE3FL/ZNQaYBut3DprLrELyUPDyJSPGHGSFIa8wZyhtHalxuYibKj3gzfsJhI+a6182zdBcduDYodS+6uMSA=
X-Received: by 2002:ac8:3775:: with SMTP id p50mr15379128qtb.202.1550689700535; Wed, 20 Feb 2019 11:08:20 -0800 (PST)
MIME-Version: 1.0
References: <6fff39d3-649d-867a-db71-b0faa18185a5@brainhub.org> <CAF8qwaCMhfsndABga55gpauX6=WhknNXija=nUU2xr93wYLaQA@mail.gmail.com> <797b3723-3257-1b08-6f78-5752922fb7d3@brainhub.org>
In-Reply-To: <797b3723-3257-1b08-6f78-5752922fb7d3@brainhub.org>
From: David Benjamin <davidben@chromium.org>
Date: Wed, 20 Feb 2019 13:08:09 -0600
Message-ID: <CAF8qwaBYBG7HTm2rj1msAQFVTYYs=jB2PQcVyNYsr1KknZEuHw@mail.gmail.com>
To: Andrey Jivsov <crypto@brainhub.org>
Cc: "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000c24a4005825814bd"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/HMuN0q1YLYOGOx7qo-M84bc3fzY>
Subject: Re: [TLS] Negotiated Finite Field Diffie-Hellman shared secret calculation
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
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: Wed, 20 Feb 2019 19:08:24 -0000

It is some evidence, but the server may have been configured with that
group anyway. Regardless, the specification doesn't say anything, so I
think the only reasonable interpretation is the existing TLS 1.2 mechanism,
sadly.

On Wed, Feb 20, 2019 at 12:48 PM Andrey Jivsov <crypto@brainhub.org> wrote:

> Why isn't the
>
> "The server indicates
> the choice of group to the client by sending the group's parameters
> as usual in the ServerKeyExchange"
> https://tools.ietf.org/html/rfc7919#section-4
>
> an evidence that the server supports RFC 7919?
>
> On 2/20/19 10:29 AM, David Benjamin wrote:
> > (We haven't actually implemented RFC 7919 and have no plans to, so I'm
> > just going by the document.)
> >
> > RFC 7919 doesn't say anything, so I think the only reasonable
> > interpretation is to continue with the legacy option for TLS 1.2 and
> > below. It's also the only interoperable option given how the document is
> > set up. RFC 7919 repurposed the existing DHE scheme with no directly
> > visible server differences, so the client cannot tell if it is talking
> > to a post-7919 server, or a pre-7919 server that happened to use a
> > well-known parameter. That means 7919 cannot change how DHE works. (This
> > isn't the only consequence of that decision.
> > See
> https://mailarchive.ietf.org/arch/msg/tls/bAOJD281iGc2HuEVq0uUlpYL2Mo.
> > DHE in TLS 1.2 is a mess and RFC 7919 failed to repair it.)
> >
> > Note all this only applies to TLS 1.2. TLS 1.3 is free to use the more
> > sound method and does:
> > https://tools.ietf.org/html/rfc8446#section-7.4.1
> >
> > On Tue, Feb 19, 2019 at 6:10 PM Andrey Jivsov <crypto@brainhub.org
> > <mailto:crypto@brainhub.org>> wrote:
> >
> >     Greetings.
> >
> >     it's unclear to me how is the shared secret g^xy calculated for
> groups
> >     in https://tools.ietf.org/html/rfc7919 .
> >
> >     If you recall, the TLS 1.1 uses this method the
> >     https://tools.ietf.org/html/rfc4346#section-8.1.2 , causing some
> >     interoperability problems that are hard to fix.
> >
> >     The RFC 7919 doesn't specify what to do here.
> >
> >     So, the question is, assuming that ffdhe2048 is negotiated,
> >
> >     - is g^xy padded to 256 bytes (more sound method) or
> >     - the leading zero bytes of g^xy must be stripped (legacy method,
> used
> >     for historic reasons)?
> >
> >     Thank you.
> >
> >     _______________________________________________
> >     TLS mailing list
> >     TLS@ietf.org <mailto:TLS@ietf.org>
> >     https://www.ietf.org/mailman/listinfo/tls
> >
>
>