Re: [TLS] Hybrid key exchange in TLS 1.3 and variable-length secrets

Nimrod Aviram <nimrod.aviram@gmail.com> Fri, 25 September 2020 08:47 UTC

Return-Path: <nimrod.aviram@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 CF4283A09E3 for <tls@ietfa.amsl.com>; Fri, 25 Sep 2020 01:47:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 AeqVa0wjme3j for <tls@ietfa.amsl.com>; Fri, 25 Sep 2020 01:47:51 -0700 (PDT)
Received: from mail-qt1-x82c.google.com (mail-qt1-x82c.google.com [IPv6:2607:f8b0:4864:20::82c]) (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 DCFE03A0995 for <tls@ietf.org>; Fri, 25 Sep 2020 01:47:50 -0700 (PDT)
Received: by mail-qt1-x82c.google.com with SMTP id g3so1236673qtq.10 for <tls@ietf.org>; Fri, 25 Sep 2020 01:47:50 -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=N683IY15OIXV5mIhruOUeKxvFymK3zSDUlPVW1y9eO8=; b=MDX1Jw19b4psI5433pHub/Nrfr45yO0oHOwWMIzd9iDMsVHAqjFBIJmbDvPSroma3k TX8GrQwQtF/+VMWHDeBJ314oLHWnsLSZVgbMFluneYWFIN+Nly2kZpGlvaAjoCL1HXkr vDiIO9HFmlSyHadLmkf2550q2CIMBnEq6AvO4RWrTc9jjXjodFYT1qeId9FDDJnXOZgM xhaURWgSKVH3Suw4FMbM/RWO3+5BEEW8VzYXVJQCuWoMykgKIxHRp0JmHvwoq8wYXUSv tMSrbQdneVCU5WcKlsQkONzZSljdiVQbj5KQATpDxrCJbY60Hq56JY1cVPRy75MdBKhq fqMw==
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=N683IY15OIXV5mIhruOUeKxvFymK3zSDUlPVW1y9eO8=; b=MVzysz9OQ71s+QkQ7qk0zmKf80rKKCD8r/aNkdjAKkMb42b0qvDCLvzIQ7gkC0vdsN fIrrj+1MzmzLEIcOwoDwOUIyLPlBf077lCnPATP4/OLhJTcIw0G6Uy7j6dKMHvSlfiRi T/EEMiAZ/a+bhYiPj65ODCOAPstLT5sBflyXW+VmV+aRAQGdDCYpYAa5ebUOQrajFLMT ywA1iHpQVc8poZZUaaAirZH2lAiThRqTIxRTMWJ4FPOPR0K2OIpIrOQpCZ3pYfSiJVeD /c7Kxs2Hz/5qlnhGTSzUzm4oSYr0LNR0SHGLL8kjx+SVEoJZM9+KUqN+T04k2WE1bK8X 90Dw==
X-Gm-Message-State: AOAM533lyxkTfd3mpkzFoXQnM1BGRc6x13K3NptTd3QknczUbN0OZHRc k7OkRUipNJQ7emR8Qc2xBnxkISKSWh/O6DLw018=
X-Google-Smtp-Source: ABdhPJwWYYYnFEqvswD1b4dYPnRZA7t8dducEdQHNrtF+vjmB9oF6I0TlUFx6P+34EgFPeM8Hwn4ARBv/ZN7EmUqjRA=
X-Received: by 2002:ac8:7145:: with SMTP id h5mr3450787qtp.110.1601023669685; Fri, 25 Sep 2020 01:47:49 -0700 (PDT)
MIME-Version: 1.0
References: <CABiKAoSGpodvQAegOhDxKxvDWoUsZBZL2JFWbtyseH+19cj6VQ@mail.gmail.com> <CAFBh+SQmzEyoFZS70W3btSS41yr4H4+vMV24fBBwsQsi5G0pbA@mail.gmail.com> <CABiKAoRixi6pEZFJGMUt=k+wo8qvY3c_1QD=fZ18f+ghKNyxng@mail.gmail.com>
In-Reply-To: <CABiKAoRixi6pEZFJGMUt=k+wo8qvY3c_1QD=fZ18f+ghKNyxng@mail.gmail.com>
From: Nimrod Aviram <nimrod.aviram@gmail.com>
Date: Fri, 25 Sep 2020 11:47:38 +0300
Message-ID: <CABiKAoRAD4pRio9CFdfwEujQFHWi3SVVTbTLCh2wmmdxRux7ig@mail.gmail.com>
To: Douglas Stebila <douglas@stebila.ca>
Cc: "<tls@ietf.org>" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000001bd31705b01f5f82"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/_JzvNOgFfaevaxr1-T6Sog7Xw2c>
Subject: Re: [TLS] Hybrid key exchange in TLS 1.3 and variable-length secrets
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: Fri, 25 Sep 2020 08:47:53 -0000

Thanks!
The PR is here, happy to hear comments and corrections:
https://github.com/dstebila/draft-ietf-tls-hybrid-design/pull/1

best,
Nimrod


On Fri, 18 Sep 2020 at 12:04, Nimrod Aviram <nimrod.aviram@gmail.com> wrote:

> Sounds good to me.
> I'm happy to send a PR making these changes, but couldn't find the
> repository for the document.
> Could you please point me to it?
>
> best,
> Nimrod
>
>
> On Thu, 17 Sep 2020 at 17:12, Douglas Stebila <douglas@stebila.ca> wrote:
>
>> Given that all the finalists and alternate candidates have fixed
>> length shared secrets, and your observations on the potential for
>> timing attacks, I'm fine with dealing with only fixed length secrets,
>> removing the paragraph discussing the possibility for variable-length
>> shared secrets from the TLS 1.3 hybrid KEX draft, and adding a note
>> regarding the risks as identified by the Raccoon attack.
>>
>> Douglas
>>
>>
>> On Wed, Sep 16, 2020 at 12:27 PM Nimrod Aviram <nimrod.aviram@gmail.com>
>> wrote:
>> >
>> > Dear all,
>> >
>> > We are writing to ask about the possible security impact of
>> > variable-length secrets on the "Hybrid key exchange in TLS 1.3" RFC
>> > [1].
>> >
>> > As you probably know, when using key material of variable length
>> > and processing this material using hash functions, a timing side
>> > channel may arise. In broad terms, when the secret is longer, the hash
>> > function may need to process more blocks internally. In some unfortunate
>> > circumstances, this has led to timing attacks, e.g. Lucky Thirteen [2]
>> > and the newly-disclosed Raccoon Attack [3]. To be clear, we are not
>> > aware of any attack on the proposed standard. Rather, we view this as
>> > an opportunity to defend-in-depth against such attacks, while work on
>> > the standard is in progress.
>> >
>> > Our proposal is to add language to the RFC explaining that
>> variable-length
>> > secrets may enable such attacks, and should therefore be avoided when
>> > possible.  Currently, the language seems to allow for variable-length
>> > secrets, should the need arise:
>> > "Variable-length shared secrets ... if it is envisioned that this
>> specification
>> > be used with algorithms which do not have fixed-length shared secrets
>> ..."
>> >
>> > We also note that a related RFC exists, "Hybrid Post-Quantum Key
>> > Encapsulation Methods (PQ KEM) for Transport Layer Security 1.2"
>> > [4]. However, that RFC apparently only uses BIKE, Kyber or SIKE as the
>> > PQ KEM. To our knowledge, all three KEMs have fixed-length secrets. It
>> > may be prudent to add cautionary language to that document as well,
>> > in case other KEMs are used in the future.
>> >
>> > Kind regards,
>> > The Raccoon Team
>> >
>> > [1]
>> https://www.ietf.org/id/draft-ietf-tls-hybrid-design-00.html#name-open-questions
>> > [2] https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6547131
>> > [3] https://raccoon-attack.com/
>> > [4]
>> https://tools.ietf.org/id/draft-campagna-tls-bike-sike-hybrid-05.html#name-key-exchange-algorithms
>> >
>> >
>> > _______________________________________________
>> > TLS mailing list
>> > TLS@ietf.org
>> > https://www.ietf.org/mailman/listinfo/tls
>>
>