jedisct1 / libsodium

A modern, portable, easy to use crypto library.
https://libsodium.org
Other
12.06k stars 1.72k forks source link

is hashtocurve (rfc9380) implemented (especially for ristretto255?) #1377

Closed stef closed 1 month ago

stef commented 1 month ago

Hey,

i was wondering, see subject. i was investigating if and to what extent https://datatracker.ietf.org/doc/rfc9380/ is implemented, according to https://github.com/cfrg/draft-irtf-cfrg-hash-to-curve/blob/main/README.md it seems to be in libsodium. and indeed i found https://github.com/jedisct1/libsodium/blob/master/src/libsodium/crypto_core/ed25519/core_h2c.c and https://github.com/jedisct1/libsodium/blob/4a15ab7cd0a4b78a7356e5f488d5345b8d314549/src/libsodium/crypto_core/ed25519/core_ristretto255.c#L83 - but i am a bit confused it doesn't quite look like the hash-to-group that is used in the voprf irtf/cfrg draft - which i have implemented here https://github.com/stef/liboprf/blob/master/src/oprf.c#L160

so my questions, does libsodium:

thanks for all! <3 s