Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add full Cairo pedersen hash #100

Open
CarloModicaPortfolio opened this issue Jun 3, 2024 · 1 comment
Open

Add full Cairo pedersen hash #100

CarloModicaPortfolio opened this issue Jun 3, 2024 · 1 comment

Comments

@CarloModicaPortfolio
Copy link

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

@lukaszcz
Copy link
Contributor

lukaszcz commented Jun 3, 2024

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).

@paulcadman paulcadman changed the title Add Cairo perdesen hash Add full Cairo perdesen hash Jun 19, 2024
@paulcadman paulcadman changed the title Add full Cairo perdesen hash Add full Cairo pedersen hash Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants