ECP2

Kind: global class
this: {ECP2}

new ECP2()

Creates an instance of ECP2

ecP2.is_infinity(1)

Tests for ECP2 point equal to infinity

Kind: instance method of ECP2
this: {ECP2}

ParamDescription
1if infinity, else returns 0

ecP2.copy(P)

Copy ECP2 point to another ECP2 point

Kind: instance method of ECP2
this: {ECP2}

ParamDescription
PECP2 instance

ecP2.inf()

Set ECP2 to point-at-infinity

Kind: instance method of ECP2
this: {ECP2}

ecP2.cmove()

conditional move of Q to P dependant on d

Kind: instance method of ECP2
this: {ECP2}

ecP2.select()

Constant time select from pre-computed table

Kind: instance method of ECP2
this: {ECP2}

ecP2.equals(Q)

Test P == Q

Kind: instance method of ECP2
this: {ECP2}

ParamDescription
QECP2 instance

ecP2.neg()

set this=-this

Kind: instance method of ECP2
this: {ECP2}

ecP2.affine()

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

Kind: instance method of ECP2
this: {ECP2}

ecP2.getX()

extract affine x as ctx.FP2

Kind: instance method of ECP2
this: {ECP2}

ecP2.getY()

extract affine y as ctx.FP2

Kind: instance method of ECP2
this: {ECP2}

ecP2.getx()

extract projective x

Kind: instance method of ECP2
this: {ECP2}

ecP2.gety()

extract projective y

Kind: instance method of ECP2
this: {ECP2}

ecP2.getz()

extract projective z

Kind: instance method of ECP2
this: {ECP2}

ecP2.toBytes(b)

convert this to byte arrayextract projective x

Kind: instance method of ECP2
this: {ECP2}

ParamDescription
bbyte array output

ecP2.toString() ⇒

convert this to hex string

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

ecP2.setxy(ix, iy)

set this=(x,y)

Kind: instance method of ECP2
this: {ECP2}

ParamDescription
ixx-value
iyy-value

ecP2.setx(ix)

set this=(x,.)

Kind: instance method of ECP2
this: {ECP2}

ParamDescription
ixx-value

ecP2.frob()

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

Kind: instance method of ECP2
this: {ECP2}

ecP2.dbl()

this+=this

Kind: instance method of ECP2
this: {ECP2}

ecP2.add()

Adds ECP2 instances

param Q ECP2 instance

Kind: instance method of ECP2
this: {ECP2}

ecP2.sub(Q)

Subtracts ECP instance Q from this

Kind: instance method of ECP2
this: {ECP2}

ParamDescription
QECP2 instance

ecP2.mul(e)

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

Kind: instance method of ECP2
this: {ECP2}

ParamDescription
eBIG number multiplier

ECP2.generator()

Set group generator

Kind: static method of ECP2
this: {ECP2}

ECP2.fromBytes(b)

convert from byte array to point

Kind: static method of ECP2
this: {ECP2}

ParamDescription
binput byte array

ECP2.RHS(x)

Calculate RHS of curve equation x^3+B

Kind: static method of ECP2
this: {ECP2}

ParamDescription
xx-value

ECP2.mul4()

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

Kind: static method of ECP2
this: {ECP2}