ECP

Kind: global class
this: {ECP}

new ECP()

Creates an instance of ECP

ecP.is_infinity(1)

Tests for ECP point equal to infinity

Kind: instance method of ECP
this: {ECP}

ParamDescription
1if infinity, else returns 0

ecP.cswap()

conditional swap of this and Q dependant on dCopy ECP point to another ECP point

Kind: instance method of ECP
this: {ECP}

ecP.cmove()

conditional move of Q to P dependant on d

Kind: instance method of ECP
this: {ECP}

ecP.select()

Constant time select from pre-computed table

Kind: instance method of ECP
this: {ECP}

ecP.copy(P)

Copy ECP point to another ECP point

Kind: instance method of ECP
this: {ECP}

ParamDescription
PECP instance

ecP.neg()

set this=-this

Kind: instance method of ECP
this: {ECP}

ecP.inf()

Set ECP to point-at-infinity

Kind: instance method of ECP
this: {ECP}

ecP.setxy(ix, iy)

set this=(x,y)

Kind: instance method of ECP
this: {ECP}

ParamDescription
ixx-value
iyy-value

ecP.setxi(ix, s)

set this=x, where x is ctx.BIG, y is derived from sign s

Kind: instance method of ECP
this: {ECP}

ParamDescription
ixx-value
ssign to derive y

ecP.setx(ix)

set this=x, y calculated from curve equation

Kind: instance method of ECP
this: {ECP}

ParamDescription
ixx-value

ecP.affine()

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

Kind: instance method of ECP
this: {ECP}

ecP.getX()

extract affine x as ctx.FP2

Kind: instance method of ECP
this: {ECP}

ecP.getY()

extract affine y as ctx.FP2

Kind: instance method of ECP
this: {ECP}

ecP.getS()

get sign of Y

Kind: instance method of ECP
this: {ECP}

ecP.getx()

extract x as ctx.FP

Kind: instance method of ECP
this: {ECP}

ecP.gety()

extract y as ctx.FP

Kind: instance method of ECP
this: {ECP}

ecP.getz()

extract z as ctx.FP

Kind: instance method of ECP
this: {ECP}

ecP.toBytes(b)

convert this to byte arrayextract projective x

Kind: instance method of ECP
this: {ECP}

ParamDescription
bbyte array output

ecP.toString() ⇒

convert this to hex string

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

ecP.dbl()

this+=this

Kind: instance method of ECP
this: {ECP}

ecP.add()

Adds ECP instances

param Q ECP instance

Kind: instance method of ECP
this: {ECP}

ecP.sub(Q)

Subtracts ECP instance Q from this

Kind: instance method of ECP
this: {ECP}

ParamDescription
QECP instance

ecP.pinmul(e, bts)

constant time multiply by small integer of length bts - use ladder

Kind: instance method of ECP
this: {ECP}

ParamDescription
esmall integer
btse bit length

ecP.cfp()

multiply this by the curves cofactor

Kind: instance method of ECP
this: {ECP}

ecP.mul(e)

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

Kind: instance method of ECP
this: {ECP}

ParamDescription
eBIG number multiplier

ecP.mul2(e, Q, f)

Return e.this+f.Q

Kind: instance method of ECP
this: {ECP}

ParamDescription
eBIG number multiplier
QECP instance
fBIG number multiplier

ECP.generator()

Set group generator

Kind: static method of ECP
this: {ECP}

ECP.fromBytes(b)

convert from byte array to point

Kind: static method of ECP
this: {ECP}

ParamDescription
binput byte array

ECP.RHS(x)

Calculate RHS of the curve equation

Kind: static method of ECP
this: {ECP}

ParamDescription
xx-value