Re: [CFRG] [Crypto-panel] Request for review: OPAQUE

Julia Hesse <juliahesse2@gmail.com> Fri, 15 September 2023 08:37 UTC

Return-Path: <juliahesse2@gmail.com>
X-Original-To: cfrg@ietfa.amsl.com
Delivered-To: cfrg@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BF778C14CE4C; Fri, 15 Sep 2023 01:37:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.947
X-Spam-Level:
X-Spam-Status: No, score=-6.947 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_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, NICE_REPLY_A=-0.091, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hQm_6WCxiq0H; Fri, 15 Sep 2023 01:37:41 -0700 (PDT)
Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 69345C14F747; Fri, 15 Sep 2023 01:37:41 -0700 (PDT)
Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-9ad8bedb245so47799966b.1; Fri, 15 Sep 2023 01:37:41 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694767059; x=1695371859; darn=ietf.org; h=content-transfer-encoding:in-reply-to:from:cc:references:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=sl/APinEt1jXWslaPt1ZJH1eBSQObCJnuMCPWtA7FsE=; b=BH9dumakmAVGfTQH/zeQaAbT3yp66wdz2dpDfwNW54DfL2t8AODtoapskbFDEIVf+V RBLuux9nMAcC3UbA56SbUGKpUDjE++UJ+j8ZpzBd8sDaw5+ciM+xnJog480JZro+wSg+ nkLYySVmxJHYzufu2Y6cIS3CNognRXvUEXL42berXhrmBWrXLCc3sqLZEchK7nGNxzp8 ZRbNeLVa1YpiaL38dtBkTz3a5GKM99PIYTJ6r0owHwp9N2CavNgTW6DI0s770oeHJpAS TbuvpOJy2dBW4b+cTe15OQMmeTKGzwvWWKRSv9WWCLcGM/0s79b/y5tW7NXQmkJYYAmr 1hoQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694767059; x=1695371859; h=content-transfer-encoding:in-reply-to:from:cc:references:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=sl/APinEt1jXWslaPt1ZJH1eBSQObCJnuMCPWtA7FsE=; b=bTascMkyFMHNzUG/P1tdPh6AXGkX5jHSXtI7Tt27f5BR1jFe4HHajfnvsltPVoYMo6 7HZbbYa8Mk516FYkEbfw5zKTYhhpHpp3ORCs3EbZCB6OuJdJn8LfdpZ47JA/Hi1IJQEz btO3OlaqFDveKvmUq439/mWPt1P6BKF49DWSv8NtZ7VWPgma6sdGQjyBIaFk7uLLhCuX j8QVEPo/bxU3+IcYGbv2xTBhyRjKO783wU8h+A8QT8ykHeeiCTvg+z6feLYNqC5NAdtQ kjm8M4xPQCPnqeMdbU79Q+zHoB1TFp6p46Miv9cyMcTC2gZELgK8R+2MwgOBUb3zjJqo SVRA==
X-Gm-Message-State: AOJu0YxUqhft6t1irMqWqfDY5sYVVKsqMR86ObiKIG5i8HxwIvoszhxJ lZvct5cydI0gSaDdkFYkRk8=
X-Google-Smtp-Source: AGHT+IExp/R81t6amfQhbePDasrZUVOStFY2cA6/Bw0csFW9KkkqgQm4ifXpwIIHT6/8at1UVmyU8g==
X-Received: by 2002:a17:906:7485:b0:9a1:aea8:d7d1 with SMTP id e5-20020a170906748500b009a1aea8d7d1mr880673ejl.4.1694767058955; Fri, 15 Sep 2023 01:37:38 -0700 (PDT)
Received: from ?IPV6:2a02:aa12:a77d:1700:fcf6:980e:61d6:8480? ([2a02:aa12:a77d:1700:fcf6:980e:61d6:8480]) by smtp.gmail.com with ESMTPSA id gu18-20020a170906f29200b0099bc0daf3d7sm2077129ejb.182.2023.09.15.01.37.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Sep 2023 01:37:38 -0700 (PDT)
Message-ID: <f4dd3fb7-7394-9e1c-500b-0bdaefb2879d@gmail.com>
Date: Fri, 15 Sep 2023 10:37:35 +0200
MIME-Version: 1.0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1
To: crypto-panel@irtf.org
References: <CAMr0u6mQXUk+DiJpKg1vLYMrPw_eMMH_Y0ohLLZU_gGEo7A-jA@mail.gmail.com>
Cc: cfrg-chairs@ietf.org, draft-irtf-cfrg-opaque@ietf.org, cfrg@ietf.org
From: Julia Hesse <juliahesse2@gmail.com>
In-Reply-To: <CAMr0u6mQXUk+DiJpKg1vLYMrPw_eMMH_Y0ohLLZU_gGEo7A-jA@mail.gmail.com>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/Bwo7jab6ifEG7a9KiDkXhayFgkk>
Subject: Re: [CFRG] [Crypto-panel] Request for review: OPAQUE
X-BeenThere: cfrg@irtf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Crypto Forum Research Group <cfrg.irtf.org>
List-Unsubscribe: <https://www.irtf.org/mailman/options/cfrg>, <mailto:cfrg-request@irtf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/cfrg/>
List-Post: <mailto:cfrg@irtf.org>
List-Help: <mailto:cfrg-request@irtf.org?subject=help>
List-Subscribe: <https://www.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Fri, 15 Sep 2023 08:37:45 -0000

Hi,

this is my review of draft-irtf-cfrg-opaque-11. Disclaimer: I have 
recently published a paper with two of the authors (Hugo, Chris) on a 
related topic, which is also mentioned in the draft.

Overall the draft seems pretty mature to me. I have a few presentational 
comments and some comments regarding the security proof of the specified 
version of OPAQUE. I did not attempt to implement from the draft, and I 
did not verify any test vectors.

Editorial:
- Sec 2.1, DeriveKeyPair: maybe assign names to the output of this API? 
It is also unclear what happens with the public key. Is that needed 
anywhere else?
- Sec 3.1, "The server can use this single pair of keys with multiple 
clients and can opt to use multiple seeds (so long as they are kept 
consistent for each client)." - WhatsApp's usage of OPAQUE is one 
example where *reusing* a key among several clients is devastating for 
the security of the overall scheme. It should be made super clear in 
this draft that *individual* keys have to be used per client. There are 
other parts in the draft where this is actually taken care of, but the 
cited paragraph here is too ambiguous, imo. What is a "client"? And is 
it really okay to use the same key and same seed for many clients?
- I had a hard time following the modularization of the protocol. In 
Section 3, the phases are described as Setup, Offline registration, and 
online AKE. That is decoupled from 4, which describes client credential 
storage and key recovery. This touches both offline registration and 
online AKE phases. I do not want to suggest to do any large changes, but 
2-3 clarifying sentences about the structure of the 
sections/explanations of the different protocol phases could be added.

Security:
- The export key export_key is (if I understood correctly), 
deterministically derived from PRF_K(pw). I simplify a bit here. This 
means the server can brute-force export_key. export_key is *not* as 
secure as a key that is, e.g., generated by the client running some 
keygen locally. This should be made super clear in the draft, imo. In 
particular, 10.1 states that export_key is a "pseudorandom value 
independent of other values in the protocol", and 10.5 says that it can 
be used to encrypt client secrets and store them on the server. The 
latter I find particularly alarming: the server can run long-term 
password guessing attempts against this encryption key, so I would 
specifically recommend to *not* use export_key as an encryption key when 
storing things on the server. Not sure if I'm too careful here, but 
people do tend to choose weak passwords...
- Sec 4, "Future variants of OPAQUE may use different key recovery 
mechanisms. See Section 4.1 for details." - Section 4.1 does not specify 
any framework/constraints on what such mechanism need to fulfill, and I 
would downtone this "invitation" to design one's own recovery mechanism.
- Sec 10.1, first bullet. The "upcoming paper" is here: 
https://eprint.iacr.org/2023/220
- Sec 10.1, second bullet. It is not true that this variant is analyzed 
in "the new paper", i.e., the paper mentioned in the first bullet. I 
have discussed this already with Hugo and he agrees.
- Sec 10.2 Security Analysis. This section mentions that the security of 
OPAQUE was proven in [JKX18]. However, the protocol proven there differs 
in many ways from the protocol specified in this draft. As a starting 
point, https://eprint.iacr.org/2023/843.pdf points out differences 
between the proven version and the draft versions v03 and v09 (I did not 
check whether all these still apply to v11). Most importantly, [JKX18] 
requires session identifiers not only for the overall OPAQUE protocol 
but also for the VOPRF building block. However, the VOPRF as currently 
specified in draft-irtf-cfrg-voprf-21 does not add unique session 
identifiers to, e.g., hash inputs (which would be required for the 
security analysis of both [JKK14] and [JKX18] to apply to a multi-user 
VOPRF, and a multi-client OPAQUE). I discussed this with Chris and he 
added the following disclaimer to the VOPRF security considerations 
section of draft-irtf-cfrg-voprf-21:

"In [JKK14], these properties are proven for one instance (i.e., one 
key) of the VOPRF protocol, and without batching. There is currently no 
security analysis available for the VOPRF protocol described in this 
document in a setting with multiple server keys or batching."

The same should be done in the OPAQUE draft, because for the specified 
protocol, multi-client security is not proven anywhere in the 
literature, afaik.

Nits:
- the voprf draft is now a RFC and could be cited as such
- "describes the details of these stages in detail"
- Sec 4, Create CleartextCredentials: client_public_key missing from the 
inputs?

Best,
Julia

Am 18/08/2023 um 08:17 schrieb Stanislav V. Smyshlyaev:
> Dear Crypto Panel Experts,
>
> The chairs would like to ask the Crypto Panel to provide three (or 
> more) reviews for the OPAQUE draft, "The OPAQUE Asymmetric PAKE 
> Protocol", draft-irtf-cfrg-opaque-11 
> (https://datatracker.ietf.org/doc/draft-irtf-cfrg-opaque/)
>
> The OPAQUE protocol was selected as a result of the PAKE selection 
> process in CFRG; there were a lot of reviews of the protocol and the 
> early versions of the draft, see https://github.com/cfrg/pake-selection
> There were several important questions in those reviews which had to 
> be addressed during the evolution of the draft in CFRG: some of them 
> are underlined in the following paper: 
> https://eprint.iacr.org/2021/839.pdf
>
> Hence we would like to ask the reviewers to pay a lot of attention to 
> reviewing this draft, trying to take into account as many 
> considerations provided in the previous reviews as possible.
>
>
> Stanislav (on behalf of the CFRG Chairs)
>
> _______________________________________________
> Crypto-panel mailing list
> Crypto-panel@irtf.org
> https://www.irtf.org/mailman/listinfo/crypto-panel