Replies: 1 comment 1 reply
-
cc. @yelhousni. I'm not sure we have backwards compatibility considerations? Maybe we could just follow the RFC without implementing options. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The source code of twisted Edwards curve points encoding points to RFC8032, which is based on the Ed25519 paper. It seems like gnark-crypto determines an x-coordinate of a point to be negative iff
x > (q-1)/2
whereq
is the order of the group the coordinate is defined.However, the Ed25519 paper suggests that the negative elements should instead be those whose integer representation in odd (see page 6 of the Ed25519 paper).
The test vectors in RFC8032 also suggests that the "odd encoding" is the correct one (at least for Ed25519 and Ed448).
Should there be an option to encode/decode the points with the alternative encoding instead?
Beta Was this translation helpful? Give feedback.
All reactions