dalek-cryptography / curve25519-dalek

A pure-Rust implementation of group operations on Ristretto and Curve25519
Other
867 stars 439 forks source link

Hashing to curve missing? #527

Closed deuszx closed 1 year ago

deuszx commented 1 year ago

I'm looking for an implementation of hash_to_curve (as suggested in https://substrate.stackexchange.com/a/987/3385 )

There's an implementation available in the fork of this lib but I guess it's not true hash_to_curve (as per spec)? https://github.com/zkcrypto/curve25519-dalek-ng/blob/763a0faaf54752b06702b39e2296173ab76c2204/src/ristretto.rs#L688

burdges commented 1 year ago

https://docs.rs/curve25519-dalek/latest/curve25519_dalek/edwards/struct.EdwardsPoint.html#method.hash_from_bytes

https://docs.rs/curve25519-dalek/latest/curve25519_dalek/ristretto/struct.RistrettoPoint.html#method.hash_from_bytes

deuszx commented 1 year ago

Thanks @burdges , I guess I was confused w/ the code that was referenced in the post from Substack Exchange which had comments about it not being up to the spec.