Skip to main content

FP48

FP48​

Kind: global class
this: {"{"}FP48{"}"}

new FP48()​

Creates an instance of FP48.

fP48.reduce()​

Reduces all components of possibly unreduced FP48 mod Modulus

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.norm()​

Normalises the components of an FP48

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.iszilch()​

Tests for FP48 equal to zero

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.isunity()​

Tests for FP48 equal to unity

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.cmove(g, d)​

Conditional copy of FP48 number

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
gFP48 instance
dcopy depends on this value

fP48.select()​

Constant time select from pre-computed table

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.geta()​

extract a from this

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.getb()​

extract b from this

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.getc()​

extract c from this

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.equals(x)​

Tests for equality of two FP48s

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
xFP48 instance to compare

fP48.copy(x)​

Copy FP48 to another FP48

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
xFP48 instance to be copied

fP48.one(x)​

Set FP48 to unity

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
xFP48 instance to be set to one

fP48.zero()​

Set FP48 to zero

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.conj()​

Conjugation of FP48

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.set(d, e, f)​

Set FP48 from three FP16 values

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
dFP16 instance
eFP16 instance
fFP16 instance

fP48.seta(c)​

Set FP48 from one FP16 value

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
cFP16 instance

fP48.usqr()​

Fast Squaring of an FP48 in "unitary" form

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.sqr()​

Fast Squaring of an FP48

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.mul(y)​

Full unconditional Multiplication of two FP48s

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
yFP48 instance, the multiplier

fP48.smul(y)​

Fast multiplication of two sparse FP48s that arises from ATE pairing line functions

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
yFP48 instance, the multiplier

fP48.ssmul(y)​

Fast multiplication of what may be sparse multiplicands

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
yFP48 instance, the multiplier

fP48.inverse()​

Inverting an FP48

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.frob(f)​

Raises an FP48 to the power of the internal modulus p, using the Frobenius

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
fModulus

fP48.trace()​

Calculate the trace of an FP48

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.toString()​

convert this to hex string

Kind: instance method of FP48
this: {"{"}FP48{"}"}

fP48.toBytes(w)​

convert this to byte array

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
wByte array

fP48.pow(e)​

Raises an FP48 to the power of a BIG

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
eBIG instance exponent

fP48.pinpow(e, bts)​

Raises an FP48 instance x to a small integer power, side-channel resistant

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
esmall integer exponent
btsmaximum number of bits in exponent

fP48.compow(e, r)​

Raises an FP48 instance to a BIG power, compressed to FP4

Kind: instance method of FP48
this: {"{"}FP48{"}"}

ParamDescription
eBIG exponent
rBIG group order

FP48.fromBytes(w)​

convert from byte array to FP48

Kind: static method of FP48
this: {"{"}FP48{"}"}

ParamDescription
wByte array

FP48.teq()​

return 1 if b==c, no branching

Kind: static method of FP48
this: {"{"}FP48{"}"}

FP48.pow16()​

p=q0^u0.q1^u1.q2^u2.q3^u3...

Kind: static method of FP48
this: {"{"}FP48{"}"}