fe

fe means field element. Here the field is \Z/(2^255-19). An element t, entries t[0]...t[9], represents the integer t[0]+2^26 t[1]+2^51 t[2]+2^77 t[3]+2^102 t[4]+...+2^230 t[9]. Bounds on each ti vary depending on context.

Constructors

this
this(uint[] v)
Undocumented in source.
this
this(uint v)
Undocumented in source.

Alias This

value

Members

Functions

negate
void negate()

Changes the sign.

opAssign
fe opAssign(uint[10] v)
Undocumented in source. Be warned that the author may not have intended to support it.
opBinary
fe opBinary(fe rhs)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(fe rhs)

Comparing in constant time.

opOpAssign
fe opOpAssign(fe rhs)
Undocumented in source. Be warned that the author may not have intended to support it.
opUnary
fe opUnary()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

cpow
fe cpow [@property getter]

Power by squaring in constant time. Returns f^power

inverse
fe inverse [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isNegative
bool isNegative [@property getter]

return 1 if f is in {1,3,5,...,q-2} return 0 if f is in {0,2,4,...,q-1}

isNonzero
bool isNonzero [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
sq
fe sq [@property getter]
sq2
fe sq2 [@property getter]
toBytes
ubyte[32] toBytes [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

fromBytes
fe fromBytes(ubyte[] bytes)

Create fe from 32 bytes.

Variables

one
enum fe one;
Undocumented in source.
zero
enum fe zero;
Undocumented in source.

Meta