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

Sage script for dlog precomp constants calculation #359

Open
advaita-saha opened this issue Feb 12, 2024 · 2 comments
Open

Sage script for dlog precomp constants calculation #359

advaita-saha opened this issue Feb 12, 2024 · 2 comments
Labels
documentation 📖 enhancement :shipit: New feature or request

Comments

@advaita-saha
Copy link
Collaborator

The PR #354 adds the pre-comp optimisation for sqrt, which has the constants prepared only for

  • Banderwagon Curve
  • Bandersnatch Curve

A sage script is supposed to be added for the calculation of the these constants for other curves. The algorithm for the calculation of the constants can be found here
https://github.com/crate-crypto/go-ipa/blob/408dbffb2041271c95979a3fb79d98b268bf2880/bandersnatch/fp/sqrt.go#L45-L89

A corresponding sage script is supposed to be created and added inside the sage folder

@rupam-04
Copy link

@mratsim As far as I know, sage only supports Weierstrass curves and doesn't support Twisted Edwards curves like Banderwagon and Bandersnatch. So is there any way around this?

@mratsim
Copy link
Owner

mratsim commented Apr 22, 2024

@mratsim As far as I know, sage only supports Weierstrass curves and doesn't support Twisted Edwards curves like Banderwagon and Bandersnatch. So is there any way around this?

We're working at the field level so we only need

Fp = GF('0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation 📖 enhancement :shipit: New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants