-
Notifications
You must be signed in to change notification settings - Fork 466
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
Implement Reduce
trait
#688
Comments
See also: #492 |
It could potentially be implemented, although |
can i take on this ? |
I'm not working on it, so you can go for it! |
oky thanks , can i be assigned to it ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Inconsistent scalar reduction across different curve implementations
Context
I'm developing a threshold signing library that needs to be generic over different elliptic curves, specifically targeting
k256
andcurve25519-dalek
. The library currently uses theGroup
trait for most operations, but I've encountered an issue with scalar reduction from U256.Problem
When implementing generic operations like Discrete Log proofs, I need to reduce a U256 value to a curve scalar. However, there's inconsistency in how different curve implementations handle this:
k256::Scalar
implements theReduce
trait.curve25519_dalek::Scalar
doesn't implementReduce
. Instead, it provides:from_bytes_mod_order
FromUniformBytes
traitThere's no common trait that both curves implement for modular reduction, which complicates writing generic code.
Questions
Reduce
trait forcurve25519-dalek::Scalar
?Additional Information
0.13.2
4.1.3
usinggroup
feature.Any guidance or suggestions would be greatly appreciated. Thank you!
The text was updated successfully, but these errors were encountered: