Re: [Cfrg] OPAQUE at Facebook

Bill Cox <> Sun, 08 September 2019 19:18 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 30F641200B8 for <>; Sun, 8 Sep 2019 12:18:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.998
X-Spam-Status: No, score=-1.998 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id eiLw6Kb7_L2E for <>; Sun, 8 Sep 2019 12:18:23 -0700 (PDT)
Received: from ( [IPv6:2a00:1450:4864:20::132]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id BE1961200A1 for <>; Sun, 8 Sep 2019 12:18:22 -0700 (PDT)
Received: by with SMTP id r134so8762813lff.12 for <>; Sun, 08 Sep 2019 12:18:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Du2NjwynRTC3lx8Gg959YRGYQ+wv5UegWbSbapPCk1I=; b=elnHwVBU6+naylE0zQsRoQpksmzmbmOR7JVK3tiRIl4V63EkpPoB035N0l7AuCQLph Sd5hwbWXkf1Vr3Bdkd5Lxjey52cV8EdFTPml8AB/1JXf/Nw1WrRJboTYJAByG6PtpZfT wCNgbcUvISK5aJb9q1Q6gLIVNnby6WknMCLmmiWG9hTdssfqFMSutm3HoKc85l05wXWo b+HGp9XooRhFhJpCkl/TgbAAYsDp2i4S0bLTyqhz/YzlTKPYed51mbAFoOSCSoiDJSLO wpcTyglAx+ca4LAJfeV4KV+hpvxuEV5edJwcTOe955PHmvorQqmsKEB71ADqJKurVFs4 RYYg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Du2NjwynRTC3lx8Gg959YRGYQ+wv5UegWbSbapPCk1I=; b=PX41ex5NJScNxQfsO/3iopOrD71TZ/wR+8CfRGVfyH7avefpGrahAB1f48CVYkXCVw eqjE2iZJguZmSvh9wtuF71YuEtx7BH/XQhT5LttTusFiLZgjJz92kPWymS8o5BT7g2ov MPdwNI78JvmMBcfuiLmIjY0yaBB9Nh6sy75PDdr3NCjj6fmKdrGwwLe7KUckVuTlantu DetBPCbbDBhTdy83zSs/Gl9Lbdia0KboCWXrBAdeIFhhH+PcU7NM7LRE3h4Xqjr/2gQP VWYsg6nvZNylqdkncdbN1nO+bSdsU3bImEnqXlzHEYhaVxOu1nFM+X1RY3vEGcSk85DG lWOg==
X-Gm-Message-State: APjAAAV/EKQ14LzMoEvijYQI/WMKJX5DEDyCTtLY7shDSPalMqlilOo5 8XRXQT9i3yoWtx4EfPRzwdp13JadfOGSFJVeUDo=
X-Google-Smtp-Source: APXvYqyX7obtPuu08CevbPZvV9zq9H2g0ORAi3rIm90N3jnQ33w1ZgFo61Um5c3VCqykXInY0hMsHJwWGnUWB05JqsI=
X-Received: by 2002:a19:ef05:: with SMTP id n5mr13309817lfh.192.1567970300845; Sun, 08 Sep 2019 12:18:20 -0700 (PDT)
MIME-Version: 1.0
References: <> <> <> <> <> <>
In-Reply-To: <>
From: Bill Cox <>
Date: Sun, 8 Sep 2019 12:18:09 -0700
Message-ID: <>
To: Kevin Lewi <>
Cc: Kathleen Moriarty <>, Stephen Farrell <>, IRTF CFRG <>
Content-Type: multipart/alternative; boundary="000000000000cce46c05920f8839"
Archived-At: <>
Subject: Re: [Cfrg] OPAQUE at Facebook
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Crypto Forum Research Group <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 08 Sep 2019 19:18:25 -0000

On Wed, Aug 28, 2019 at 9:44 PM Kevin Lewi <> wrote:

> Although the primary motivation is to avoid logging of plaintext
> passwords, we still want to use a login protocol that provides good
> security guarantees and models the same user experience that exists
> today. We want to allow users to log in with a password, as opposed to
> a private key -- so I believe this would make HOBA a less suitable
> option.

I agree HOBA doesn't look like a near-term solution.

Eliminating the problem of logging plaintext passwords can be done by
encrypting the password to a backend key sent in the login form.  For
clients that cannot run Javascript, the plaintext password can be encrypted
by the front-end machine (where where TLS terminates), minimizing the
chance of accidental logging.  IMO, this is a reasonable short-term
solution for this problem.

Various security upgrades are possible over this simple scheme.  OPAQUE is

In SCRAM, the salt is sent to the client upon the server's
> first message, which would mean that an attacker could build an
> offline dictionary based on this salt (a precomputation attack).
> OPAQUE gets around this through the use of an oblivious PRF, which
> allows the client to keep its password secret, and the server to keep
> the client-specific salt secret as well.

It also has the potentially cool property that the OPRF server and password
verification service can be in different security domains.

> On the topic of client-side password hashing for OPAQUE: one advantage
> this offers over the traditional plaintext passwords over TLS login
> mechanism is that we can force the client to solve a challenge on each
> password attempt. This may be useful in defending against "password
> spraying" attacks, in which an attacker picks a single common password
> and tries to log in to a large number of accounts using this password.
> However, it is not clear if we can balance the thresholds for the
> password hashing challenge to be significant enough to deter attackers
> executing password spraying, while still allowing for a reasonable
> user experience for the regular user attempting to log in. Thoughts?

If you switched initially to the simple scheme of encrypting the password
to a public key in the login form, you also have the opportunity to do do
client-side hashing.  You can do rounds of hashing: Catena calls this
"pepper".  For example, the client could start with a 1MiB hash, then a
4MiB hash, and if it feels a 16MiB hash is too hard, the server could do
the 16MiB hash for the client.  The real salt should not be used: instead
just a userID of some sort on the client.  The final hash. after the
required rounds of pepper, is done server-side with secret salt, maybe just
HMAC(hardenedHash, secretSalt).

With this sort of adaptive client-side hashing, you can begin to gather
stats on what your client devices can do.