ECP4

Kind: global class
this: {ECP4}

new ECP4()

Creates an instance of ECP4

ecP4.is_infinity(1)

Tests for ECP4 point equal to infinity

Kind: instance method of ECP4
this: {ECP4}

ParamDescription
1if infinity, else returns 0

ecP4.copy(P)

Copy ECP4 point to another ECP4 point

Kind: instance method of ECP4
this: {ECP4}

ParamDescription
PECP4 instance

ecP4.inf()

conditional move of Q to P dependant on d

Kind: instance method of ECP4
this: {ECP4}

ecP4.cmove()

conditional move of Q to P dependant on d

Kind: instance method of ECP4
this: {ECP4}

ecP4.select()

Constant time select from pre-computed table

Kind: instance method of ECP4
this: {ECP4}

ecP4.equals(Q)

Test P == Q

Kind: instance method of ECP4
this: {ECP4}

ParamDescription
QECP4 instance

ecP4.neg()

set this=-this

Kind: instance method of ECP4
this: {ECP4}

ecP4.affine()

convert this to affine, from (x,y,z) to (x,y)

Kind: instance method of ECP4
this: {ECP4}

ecP4.getX()

extract affine x as ctx.FP2

Kind: instance method of ECP4
this: {ECP4}

ecP4.getY()

extract affine y as ctx.FP2

Kind: instance method of ECP4
this: {ECP4}

ecP4.getx()

extract projective x

Kind: instance method of ECP4
this: {ECP4}

ecP4.gety()

extract projective y

Kind: instance method of ECP4
this: {ECP4}

ecP4.getz()

extract projective z

Kind: instance method of ECP4
this: {ECP4}

ecP4.toBytes(b)

convert this to byte arrayextract projective x

Kind: instance method of ECP4
this: {ECP4}

ParamDescription
bbyte array output

ecP4.toString() ⇒

convert this to hex string

Kind: instance method of ECP4
Returns: hex string
this: {ECP4}

ecP4.setxy(ix, iy)

set this=(x,y)

Kind: instance method of ECP4
this: {ECP4}

ParamDescription
ixx-value
iyy-value

ecP4.setx(ix)

set this=(x,.)

Kind: instance method of ECP4
this: {ECP4}

ParamDescription
ixx-value

ecP4.frob()

set this*=q, where q is Modulus, using Frobenius

Kind: instance method of ECP4
this: {ECP4}

ecP4.dbl()

this+=this

Kind: instance method of ECP4
this: {ECP4}

ecP4.add()

Adds ECP4 instances

param Q ECP4 instance

Kind: instance method of ECP4
this: {ECP4}

ecP4.sub(Q)

Subtracts ECP instance Q from this

Kind: instance method of ECP4
this: {ECP4}

ParamDescription
QECP4 instance

ecP4.mul(e)

Multiplies an ECP4 instance P by a BIG, side-channel resistant

Kind: instance method of ECP4
this: {ECP4}

ParamDescription
eBIG number multiplier

ECP4.generator()

Set group generator

Kind: static method of ECP4
this: {ECP4}

ECP4.fromBytes(b)

convert from byte array to point

Kind: static method of ECP4
this: {ECP4}

ParamDescription
binput byte array

ECP4.RHS(x)

Calculate RHS of curve equation x^3+B

Kind: static method of ECP4
this: {ECP4}

ParamDescription
xx-value

ECP4.mul8()

Calculate P=u0.Q0+u1Q1+u2Q2+u3*Q3...

Kind: static method of ECP4
this: {ECP4}