Kind: global class
this: {FF}
Creates an instance of FF.
set to integer
Kind: instance method of FF
this: {FF}
Param | Description |
---|---|
m | Integer value to be set to |
copy from FF b
Kind: instance method of FF
this: {FF}
Param | Description |
---|---|
b | FF element to copy from |
copy from FF b
Kind: instance method of FF
this: {FF}
Param | Description |
---|---|
b | FF element to copy from |
x=y<<n
Kind: instance method of FF
this: {FF}
x=y
Kind: instance method of FF
this: {FF}
x=y>>n
Kind: instance method of FF
this: {FF}
test equals 0
Kind: instance method of FF
this: {FF}
shift right by BIGBITS-bit words
Kind: instance method of FF
this: {FF}
shift left by BIGBITS-bit words
Kind: instance method of FF
this: {FF}
extract last bit
Kind: instance method of FF
this: {FF}
recursive add
Kind: instance method of FF
this: {FF}
recursive inc
Kind: instance method of FF
this: {FF}
recursive sub
Kind: instance method of FF
this: {FF}
recursive dec
Kind: instance method of FF
this: {FF}
simple add
Kind: instance method of FF
this: {FF}
simple sub
Kind: instance method of FF
this: {FF}
reverse sub
Kind: instance method of FF
this: {FF}
increment/decrement by a small integer
Kind: instance method of FF
this: {FF}
normalise - but hold any overflow in top part unless n<0
Kind: instance method of FF
this: {FF}
shift left by one bit
Kind: instance method of FF
this: {FF}
shift right by one bit
Kind: instance method of FF
this: {FF}
Convert to Hex String
Kind: instance method of FF
this: {FF}
Convert FFs to/from byte arrays
Kind: instance method of FF
this: {FF}
z=x*y, t is workspace
Kind: instance method of FF
this: {FF}
return low part of product this*y
Kind: instance method of FF
this: {FF}
Set b=b mod c
Kind: instance method of FF
this: {FF}
return this mod modulus
Kind: instance method of FF
Returns: this mod N
this: {FF}
Param | Description |
---|---|
N | Mmodulus |
ND | Montgomery Constant |
Reduces a double-length FF with respect to a given modulus
Kind: instance method of FF
Returns: this mod N
this: {FF}
Param | Description |
---|---|
b | Mmodulus |
Set return=1/this mod p. Binary method - a<p on entry
Kind: instance method of FF
this: {FF}
nresidue mod m
Kind: instance method of FF
this: {FF}
U=1/a mod 2^m - Arazi & Qi
Kind: instance method of FF
this: {FF}
generate random x
Kind: instance method of FF
this: {FF}
this*=y mod p
Kind: instance method of FF
this: {FF}
this*=y mod p
Kind: instance method of FF
this: {FF}
this=this^e mod p using side-channel resistant Montgomery Ladder, for large e
Kind: instance method of FF
this: {FF}
Param | Description |
---|---|
e | exponent |
p | modulus |
this=this^e mod p using side-channel resistant Montgomery Ladder, for short e
Kind: instance method of FF
this: {FF}
Param | Description |
---|---|
e | exponent |
p | modulus |
raise to an integer power - right-to-left method
Kind: instance method of FF
this: {FF}
Param | Description |
---|---|
e | exponent |
p | modulus |
this=this^e mod p, faster but not side channel resistant
Kind: instance method of FF
this: {FF}
Param | Description |
---|---|
e | exponent |
p | modulus |
double exponentiation r=x^e.y^f mod p
Kind: instance method of FF
this: {FF}
Param | Description |
---|---|
e | exponent |
y | FF instance |
f | exponent |
p | modulus |
Test if an FF has factor in common with integer s
Kind: instance method of FF
Returns: true or false
this: {FF}
Param | Description |
---|---|
s | integerexponent |
compare a and b - must be normalised, and of same length
Kind: static method of FF
Returns: zero of error codetrue or false
this: {FF}
Param | Description |
---|---|
a | FF number |
b | FF number |
in-place swapping using xor - side channel resistant - lengths must be the same
Kind: static method of FF
this: {FF}
z=x*y. Assumes x and y are of same length.
Kind: static method of FF
this: {FF}
z=x^2
Kind: static method of FF
this: {FF}
Miller-Rabin test for primality.
Kind: static method of FF
this: {FF}
Param | Description |
---|---|
p | FF instance to be tested |
rmg | an instance of a Cryptographically Secure Random Number Generator |