Skip to content

Expose field arithmetic #29

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

Closed
omershlo opened this issue May 3, 2020 · 3 comments
Closed

Expose field arithmetic #29

omershlo opened this issue May 3, 2020 · 3 comments
Assignees

Comments

@omershlo
Copy link

omershlo commented May 3, 2020

Is there a plan to expose FieldElement for P-256?
(motivation: I am looking to implement a Trait in Curv)

@str4d
Copy link
Contributor

str4d commented May 3, 2020

I don't think that FieldElement should be exposed in arbitrary generic code, because there are very few reasons to be operating directly on curve point coordinates outside of the curve implementation.

  • ECDSA is unfortunately one of them 😞 but that can be handled with an ECDSA-specific trait implemented by curves themselves (which is the direction we are likely to go for the ecdsa crate).
  • Representing curve points in ZKP circuits requires access to coordinates, but only for nested curves, so it seems more appropriate to have traits implemented only on those nested curves.

What is the use case you have that requires access to FieldElement?

@omershlo
Copy link
Author

omershlo commented May 4, 2020

Thanks for clarifying !

@omershlo omershlo closed this as completed May 4, 2020
@tarcieri
Copy link
Member

tarcieri commented May 4, 2020

@omershlo you might check out fiat-rust if you'd like a p256 implementation that exposes its internals:

arkworks-rs/snark#176

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

3 participants