We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
If I have two edwards25519.ExtendedGroupElement, how do I add them on the curve? I don't see a function for it, but it would be very useful.
edwards25519.ExtendedGroupElement
Here is an implementation of it in Python: https://github.com/vbuterin/ed25519/blob/5b4f873bc88de51a3999994e30cb3a3759948308/ed25519.py#L170
I would port it, but I don't know what D is.
D
The text was updated successfully, but these errors were encountered:
This seems to be working:
func Add(p, q *edwards25519.ExtendedGroupElement) *edwards25519.ExtendedGroupElement { var r edwards25519.CompletedGroupElement var qCached edwards25519.CachedGroupElement q.ToCached(&qCached) edwards25519.GeAdd(&r, p, &qCached) var result edwards25519.ExtendedGroupElement r.ToExtended(&result) edwards25519.FeNeg(&result.X, &result.X) return &result }
I have no idea why the negation of the X is necessary in the end, but without it, the linearity does not hold:
sk1*B + sk2*B = (sk1+sk2)*B
(while taking care that sk1+sk2 has still the first three and the last two bits set correctly).
Sorry, something went wrong.
No branches or pull requests
If I have two
edwards25519.ExtendedGroupElement
, how do I add them on the curve? I don't see a function for it, but it would be very useful.Here is an implementation of it in Python:
https://github.com/vbuterin/ed25519/blob/5b4f873bc88de51a3999994e30cb3a3759948308/ed25519.py#L170
I would port it, but I don't know what
D
is.The text was updated successfully, but these errors were encountered: