dcrypt.crypto.ecc.curved25519.fieldElement

Undocumented in source.

Members

Functions

SHL32
int SHL32(int val, uint shift)
Undocumented in source. Be warned that the author may not have intended to support it.
SHL64
long SHL64(long val, uint shift)
Undocumented in source. Be warned that the author may not have intended to support it.
SHL8
int SHL8(byte val, uint shift)
Undocumented in source. Be warned that the author may not have intended to support it.
fe_cmov
void fe_cmov(fe dest, fe src, bool condition)

// h = f + g // Can overlap h with f or g. // // Preconditions: // |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. // |g| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. // // Postconditions: // |h| bounded by 1.1*2^26,1.1*2^25,1.1*2^26,1.1*2^25,etc. Conditional move. Replace (f,g) with (g,g) if b == 1; replace (f,g) with (f,g) if b == 0.

fe_cswap
void fe_cswap(fe f, fe g, uint b)

Conditional swap. Replace (f,g) with (g,f) if b == 1; replace (f,g) with (f,g) if b == 0.

fe_mul121666
fe fe_mul121666(fe f)

Returns f * 121666

fe_pow22523
fe fe_pow22523(fe z)
load_3
ulong load_3(ubyte[] inp)
Undocumented in source.
load_4
ulong load_4(ubyte[] inp)
Undocumented in source.

Structs

fe
struct 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.

Meta