Kind: global class
this: {FP}
Creates an instance of FP.
Param | Description |
---|---|
x | FP / BIG instance |
Set FP to zero
Kind: instance method of FP
this: {FP}
copy from a ctx.BIG in ROM
Kind: instance method of FP
this: {FP}
Param | Description |
---|---|
x | FP instance to be copied |
copy from another ctx.BIG
Kind: instance method of FP
this: {FP}
Param | Description |
---|---|
x | FP instance to be copied |
Copy FP to another FP
Kind: instance method of FP
this: {FP}
Param | Description |
---|---|
x | FP instance to be copied |
Conditional constant time swap of two FP numbers
Kind: instance method of FP
this: {BIG}
Parameter: b FP number
Parameter: d Integer
Conditional copy of FP number
Kind: instance method of FP
this: {FP}
Param | Description |
---|---|
g | FP instance |
d | copy depends on this value |
Converts from BIG integer to residue form mod Modulus
Kind: instance method of FP
this: {FP}
Converts from residue form back to BIG integer form
Kind: instance method of FP
this: {FP}
convert to hex string
Kind: instance method of FP
this: {FP}
Tests for FP equal to zero
Kind: instance method of FP
this: {FP}
Reduces all components of possibly unreduced FP mod Modulus
Kind: instance method of FP
this: {FP}
Set FP to unity
Kind: instance method of FP
this: {FP}
Normalises the components of an FP
Kind: instance method of FP
this: {FP}
Fast Modular multiplication of two FPs, mod Modulus
Kind: instance method of FP
this: {FP}
Param | Description |
---|---|
b | FP number, the multiplier |
Multiplication of an FP by a small integer
Kind: instance method of FP
this: {FP}
Param | Description |
---|---|
s | integer |
Fast Squaring of an FP
Kind: instance method of FP
this: {FP}
negate this
Kind: instance method of FP
this: {FP}
Param | Description |
---|---|
x | FP instance to be set to one |
subtraction of two FPs
Kind: instance method of FP
this: {FP}
Param | Description |
---|---|
x | FP instance |
Divide an FP by 2
Kind: instance method of FP
this: {FP}
return this^(p-3)/4 or this^(p-5)/8
Kind: instance method of FP
this: {FP}
Inverting an FP
Kind: instance method of FP
this: {FP}
Tests for equality of two FP instances
Kind: instance method of FP
this: {FP}
Param | Description |
---|---|
x | FP instance to compare |
Raises an FP to the power of a BIG
Kind: instance method of FP
this: {FP}
Param | Description |
---|---|
e | BIG instance exponent |
return jacobi symbol (this/Modulus)
Kind: instance method of FP
this: {FP}
Fast Modular square root of a an FP, mod Modulus
Kind: instance method of FP
this: {FP}
reduce a ctx.DBIG to a ctx.BIG using a “special” modulus
Kind: static method of FP
this: {FP}