Re: [CFRG] Does OPRF/OPAQUE require full implementation of RFC 9380

Stefan Santesson <stefan@aaa-sec.com> Sat, 30 March 2024 14:53 UTC

Return-Path: <stefan@aaa-sec.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 7133CC14F68A for <cfrg@ietfa.amsl.com>; Sat, 30 Mar 2024 07:53:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.095
X-Spam-Level:
X-Spam-Status: No, score=-2.095 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=aaa-sec.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 N4bks6GnOTCy for <cfrg@ietfa.amsl.com>; Sat, 30 Mar 2024 07:53:14 -0700 (PDT)
Received: from smtp.outgoing.loopia.se (smtp.outgoing.loopia.se [93.188.3.37]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 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 4FEC2C14F6FE for <cfrg@irtf.org>; Sat, 30 Mar 2024 07:53:08 -0700 (PDT)
Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id AF4E32FFA3EF for <cfrg@irtf.org>; Sat, 30 Mar 2024 15:53:05 +0100 (CET)
Received: from s981.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 9E9422E2B107; Sat, 30 Mar 2024 15:53:05 +0100 (CET)
Received: from s472.loopia.se (unknown [172.22.191.6]) by s981.loopia.se (Postfix) with ESMTP id 9CBAD22B176D; Sat, 30 Mar 2024 15:53:05 +0100 (CET)
X-Virus-Scanned: amavisd-new at amavis.loopia.se
Authentication-Results: s472.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=aaa-sec.com
Received: from s899.loopia.se ([172.22.191.5]) by s472.loopia.se (s472.loopia.se [172.22.190.12]) (amavisd-new, port 10024) with LMTP id jOvq2Uo09PMj; Sat, 30 Mar 2024 15:53:05 +0100 (CET)
X-Loopia-Auth: user
X-Loopia-User: mailstore2@aaa-sec.com
X-Loopia-Originating-IP: 90.228.170.155
Received: from [10.10.0.158] (unknown [90.228.170.155]) (Authenticated sender: mailstore2@aaa-sec.com) by s899.loopia.se (Postfix) with ESMTPSA id ED35F2C8BA6F; Sat, 30 Mar 2024 15:53:04 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aaa-sec.com; s=loopiadkim1707241022; t=1711810385; bh=/7Skk7QS1WLRodkw/iPtYako7M5imwur1QHQYohuS70=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=Zi3gcSMxKmnzqmqGh6Bs36bGImcPn+CvtHBA9F4LFGtE/HhvPA7/lQmgm30Otbzs6 cPZnW3MrCkbPHQE8hr0pQdG4sHAmcDYi0bxKTstf8l95i7UH4NnuOvJDiu3byHi5DO PIJeu31c25n0CdXQINTaYpJUbfmeRyICG9lRGm5uXv3ILjPKhTmyOAQu1+dn4a7btJ QzGdSFC7shooBwJf9K/MtOYOufS1jvSWwItWKz5KOOr7VWGZPlhxrVFBXiG7HWyKX4 dC5a1gejNbSKXiAycEg22eQteBvBhBmjMn2NqMQE8QsuuAI+XGIyeE3mjUYW/yErHH D7LKA8fSe+yCA==
Message-ID: <69c770f4-ba21-4497-bccf-56f5357988ec@aaa-sec.com>
Date: Sat, 30 Mar 2024 15:53:04 +0100
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird Beta
To: stef <s@ctrlc.hu>
Cc: IRTF CFRG <cfrg@irtf.org>
References: <410a0800-78ff-422f-8ca3-5a0211478cbd@aaa-sec.com> <ZggEdsYNOnNmxcsb@localhost>
Content-Language: sv-SE, en-GB
From: Stefan Santesson <stefan@aaa-sec.com>
Autocrypt: addr=stefan@aaa-sec.com; keydata= xsDNBGB0SQwBDADRZIRQH2PciJEmsZ7noEFV8jdtUoB/3AiNPg5CYWJz3YlB1ZyqizIYRXlY EzhIcHRCdn+NrJvReq3Xi3kvycqvhUrrxMIxMYY7YZEripjrbyleFbbZjX4oCu+CTRj8y1Wo V6h9fLlpdqEriXwQ1brs1F/4KmHXTli4FIAmRTzdGBDWgD9sg2UmuloC4+A3d2Zoo6D6Tbjv Piyy3hwqdxjOF0tXSrtH9OXkyoIlmOdaHKLT3hB7nRlurq7dWZYGsnWIIg6YIMwA/eo6OHry nq9OpQ2Zktz40r6WaOARM4RTJgBI45BgR0IVXGJG3ie05lrORYxfLKJ9//JR+4VqY/6RC85C L5Ch6KH7smzraNZXZWPlDjrs25O0X2PwEwv676vJ9tDY7oLN0RHpVMYFx2GOKAYtH0K1BAwY yFlSNRmLbSjNPnGN4yk6ad5J6HB/Z9A0On/Ud2R8eXR5ZJVBNDdcCjM2L2WleRoTbh52DmhX yisi1loEROOZjaqfBf03jlsAEQEAAc0lU3RlZmFuIFNhbnRlc3NvbiA8c3RlZmFuQGFhYS1z ZWMuY29tPsLBDwQTAQgAORYhBKkgqX8QoC/CtVBH1S8bGjmXZjPRBQJgdEkMBQkFo5qAAhsD BQsJCAcCBhUICQoLAgUWAgMBAAAKCRAvGxo5l2Yz0S+7C/94cy3pZYEK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VLxsaOZdmM9EFAmB0SQ0FCQWjmoAC GwwACgkQLxsaOZdmM9Gc3wv/Wyquulv2Y7kUPXITDs/oLugd2Lx6KhFfPOhaoe2amQqhWk8H Hhauqb2Qx8rMFeDmaqzfxLsRpM0FMjtovH3XswPuZoZ3mLw0XuHGgU5QVS/zL6NrNVdwq8dv OV5m6QCm0RomI1cPRAB8P6/bbJy+FUBWvqqCUbQo5T5KXYgNwA/m1Y/S5cej/Wz3V7/Ixwkl 2t63TTrhnXBBGkAz5ApBT/YJ7L89eHLZJUMJJXaNewfhb3dIcZgza705BU5jHchpmJtTzgnS PaYqhKciMQUxd8/8jJ/XqlNVw7XxY77mNK+9BDf7y2EG6bRrzQExhS08vtuPexOE66IXdRId kENY+UQeopSb6EXU6eRD7BsXHLRfxzvs0+wMU7lRUigiONMUv54p6PqBa8PMFV4Jv8NcB9Qu Phy/7YtaBjmJn0FDTKpbDYILwh0WNoxjFqWI3jMo2ZTVjKY0aJMndJ0MxB3eAHjhQLkeKtIL 4831tbIM6eKC9gY3xUsE4vSV/CPdPKjV
Organization: 3xA Security AB
In-Reply-To: <ZggEdsYNOnNmxcsb@localhost>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/cfrg/p2EJIlx6CwLR2CKAoOqTpL74uls>
Subject: Re: [CFRG] Does OPRF/OPAQUE require full implementation of RFC 9380
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://mailman.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://mailman.irtf.org/mailman/listinfo/cfrg>, <mailto:cfrg-request@irtf.org?subject=subscribe>
X-List-Received-Date: Sat, 30 Mar 2024 14:53:19 -0000

Hey,

Thanks a lot for the answers.

Right now I'm more interested in the security analysis than interop. So 
right now I'm mostly interested if there is a distinct and important 
security requirement to implement hashToGroup a´la RFC 9380, of if a 
simpler approach as the one I showed would do the job. And if not, why?

Regarding library support I haven't found any libraries implementing 
P-256 OPRF in the platforms I'm looking for which is mobile development, 
Java and Python.
Where can I find all current implementations of OPRF/OPAQUE, and in 
particular hathToGroup and hashToScalar ?

/Stefan


On 2024-03-30 13:24, stef wrote:
> hey, Stefan.
>
> On Sat, Mar 30, 2024 at 12:56:10PM +0100, Stefan Santesson wrote:
>> Note that there are not even a "MUST" expressed here. Just a "must" and
>> therefore not a requirement according to section 1.1.
> nothing really is a must, but if you don't implement the hashtogroup as per
> the rfc you will not be able to satisfy the test vectors, and if you don't
> satisfy the test vectors it is difficult to claim compliance with the rfc. and
> also compatibility with all the other implementations. if that is ok with you,
> you should be doing whatever you want.
>
> tbh i also think this is overkill since for some groups, like ristretto255 for
> example there is a widely used hashtogroup available in most big
> implementations (like crypto_scalarmult_ed25519 and
> crypto_core_ristretto255_from_hash in libsodium). but i do understand that for
> other curves this might be more involved, and seems to be also problematic as
> - afaik - there has been for 20 years attempts made at defining a hashtogroup
> that applies to all widely used - standardized - groups be it curves or dlog...
>
>> Finally, is there any support for G.hashToGroup being planned in any major
>> libraries supporting OPRF/OPAQUE?
> i don't quite understand what you mean with "being planned", as as far as i
> know all of the implementations that satisfy the test vectors have this
> implemented, and liboprf
> https://rad.ctrlc.hu/nodes/rad.ctrlc.hu/rad:z3P9keM4KFAMp8wZuULi71VS7cWwp/tree/src/oprf.h#L105
> exports this also via the .h file. i suppose all others conforming to
> testvectors do so too.
>
> greets,
> stefan