-
Is there any way to invert a scalar like the |
Beta Was this translation helpful? Give feedback.
Answered by
paulmillr
Oct 12, 2024
Replies: 1 comment 7 replies
-
import { ed25519 } from '@noble/curves/ed25519';
import { Field } from '@noble/curves/abstract/modular';
const Fn = Field(ed25519.CURVE.n); // create finite field over ed scalar
const inverted = Fn.inv(1238591829n); // invert value within the field
// 325201530887118780669252250777832982124283878931670096979534483829543322257n |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
25519 field is little-endian, a bit painful
So, the scalars you're seeing are actually swapped: