-
Notifications
You must be signed in to change notification settings - Fork 22
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
Refactor and add docs docs docs #18
Conversation
@@ -15,13 +18,12 @@ import ( | |||
|
|||
// FieldElement represents an element of the field GF(2^255-19). An element t | |||
// represents the integer t[0] + t[1]*2^51 + t[2]*2^102 + t[3]*2^153 + | |||
// t[4]*2^204. The zero value is a valid zero element. | |||
// t[4]*2^204. Each limb must not exceed 2^54 - 1 to be valid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Limbs are allowed to grow between operations, but must not exceed 54 bits to remain valid input for multiplications.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I shouldn't write docs about this without knowing what I'm doing.
We really need to figure out the input and output ranges for each operation, and either make it all self-consistent, or if that's not possible put the ranges in the docs.
It would return an invalid element if the input was greater than 2^54 - 1.
a26d1a3
to
73abf15
Compare
No description provided.