dcrypt.ecc.curved25519.fieldElement

Members

Functions

fe_cmov
void fe_cmov(ref fe dest, in ref fe src, in 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(ref fe f, ref fe g, in 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(in ref fe f)

Returns f * 121666

fe_pow22523
fe fe_pow22523(in ref fe z)

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