Skip to content

Commit

Permalink
chore: clarify map_to_curve type
Browse files Browse the repository at this point in the history
  • Loading branch information
LesterEvSe authored and NikitaMasych committed Sep 18, 2024
1 parent 7024889 commit 1d42795
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/plume/src/map_to_curve.nr
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ fn xy2_selector(x1: Secpk1Fq, x2: Secpk1Fq, gx1: Secpk1Fq, gx2: Secpk1Fq) -> (Se
if s1 { (x1, gx1_sqrt) } else { (x2, gx2_sqrt) }
}

// As a result, we get a point not on the Secp256k1 curve, but a point E' that isogeny to this curve
// Formula from https://www.ietf.org/archive/id/draft-irtf-cfrg-hash-to-curve-13.html#name-simplified-shallue-van-de-w
pub fn map_to_curve(u: Secpk1Fq) -> Point {
let z = Secpk1Fq::from_le_bytes(get_z());
Expand Down

0 comments on commit 1d42795

Please sign in to comment.