Open CarloModicaPortfolio opened 1 month ago
The simplified version is already in main
: https://github.com/anoma/juvix-stdlib/blob/main/Stdlib/Cairo/Pedersen.juvix. Check if you have the latest version of Juvix (and do git submodule update
and juvix clean --global
before installing the new one).
Pedersen hash to curve can be found here: https://docs.starkware.co/starkex/crypto/pedersen-hash-function.html
-- pedersen_hash_to_curve : (x y: Field) : Ec.Point := -- Init the five constant points P0, P1, P2, P3, P4 -- Split x and y to (x_low, x_high) and (y_low, y_high) -- H(x, y) = P0 + x_low P1 + x_high P2 + y_low P3 + y_high P4