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

Douglas Stebila <douglas@stebila.ca> Fri, 25 September 2020 14:16 UTC

Return-Path: <dstebila@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 7F9253A0B54 for <tls@ietfa.amsl.com>; Fri, 25 Sep 2020 07:16:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.421
X-Spam-Level:
X-Spam-Status: No, score=-1.421 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=no autolearn_force=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 p4u2cr2qy1MM for <tls@ietfa.amsl.com>; Fri, 25 Sep 2020 07:16:30 -0700 (PDT)
Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) (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 6C6E63A0C81 for <tls@ietf.org>; Fri, 25 Sep 2020 07:16:14 -0700 (PDT)
Received: by mail-ej1-f42.google.com with SMTP id lo4so3831756ejb.8 for <tls@ietf.org>; Fri, 25 Sep 2020 07:16:14 -0700 (PDT)
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=Jc/uAKZvgLVLEtHf1PrFVKYO6LaLfiMRMRypIsNObSg=; b=CeyzjcPaFr3TBXqP6y9pyqti+Yamd0yB1fblBU6nRd9rilyDUjqFMG+rJXSJ3pDqdw GORzZrBQuUdBPGS3y3J2c9dfcor17T9QmmL6keQPUwRpYgWjPAw+Xy6VtV/5RpDFpK3I vtuEdQy/kbjQjyHBILcX9IsoNhebAsR675Wxzzpm7+327aqmJRsbE0AYNvf3PMLKZv9u 8Ir0IoQYH/eZv7gKwesy0IH0wnL1lKChn8HzZ0oJhvKsk4XgQzH48zaDrX5/lA0iwqsH 5wlGIeXoHIHtk2dZ2K80aCc3w+LU8hpoS/M1j/cvVzhqM6PpXfoRIXn9YjMLqXP983HS dQ8w==
X-Gm-Message-State: AOAM532lKbZ8J5OMOIkFylLijPqlVrOo2MCEHVtCytKzJ28IXm0Nk/F6 ezK2H9ysfiGi0W6fKkSr8VvKQrvl24qBDeslvHjsMx9K
X-Google-Smtp-Source: ABdhPJwRm9IDHtP1BFUeWaaoPj/EwhgoM5fp7zhajAYqmdLcciQmwFso4ZcLn+sN6cIG2PscBqN9H/zvUSWj3WCnf/I=
X-Received: by 2002:a17:907:43f6:: with SMTP id mu6mr3042159ejb.244.1601043372276; Fri, 25 Sep 2020 07:16:12 -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> <CABiKAoRAD4pRio9CFdfwEujQFHWi3SVVTbTLCh2wmmdxRux7ig@mail.gmail.com>
In-Reply-To: <CABiKAoRAD4pRio9CFdfwEujQFHWi3SVVTbTLCh2wmmdxRux7ig@mail.gmail.com>
From: Douglas Stebila <douglas@stebila.ca>
Date: Fri, 25 Sep 2020 10:16:01 -0400
Message-ID: <CAFBh+STCnhB0f1DSmvrxc+1HvTxpRfgKYSTSOzq_LQVaCaQVnw@mail.gmail.com>
To: Nimrod Aviram <nimrod.aviram@gmail.com>
Cc: "<tls@ietf.org>" <tls@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/LljV7yEBkC6ng9I7MdRbhQDeOkk>
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 14:16:32 -0000

Thanks!  I've merged it in.

On Fri, Sep 25, 2020 at 4:48 AM Nimrod Aviram <nimrod.aviram@gmail.com> wrote:
>
> 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
>
> _______________________________________________
> TLS mailing list
> TLS@ietf.org
> https://www.ietf.org/mailman/listinfo/tls