RustCrypto / elliptic-curves

Collection of pure Rust elliptic curve implementations: NIST P-224, P-256, P-384, P-521, secp256k1, SM2
673 stars 187 forks source link

Expose field arithmetic #29

Closed omershlo closed 4 years ago

omershlo commented 4 years ago

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

str4d commented 4 years ago

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.

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

omershlo commented 4 years ago

Thanks for clarifying !

tarcieri commented 4 years ago

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

https://github.com/scipr-lab/zexe/pull/176