| Modifier and Type | Field and Description |
|---|---|
static int |
ELEM_SIZE |
static int |
MARSHAL_SIZE |
| Constructor and Description |
|---|
G2()
Construct a G2 point.
|
G2(BigInteger k)
Construct a point for a scalar.
|
G2(BN.G2 p)
Copy construct for G2.
|
G2(ch.epfl.dedis.lib.crypto.bn256.TwistPoint p)
Construct a G2 point from an existing TwistPoint.
|
| Modifier and Type | Method and Description |
|---|---|
BN.G2 |
add(BN.G2 a,
BN.G2 b)
Perform a point addition.
|
boolean |
isInfinity()
Checks whether the point is an infinity (zero) point.
|
byte[] |
marshal()
Turns the point into its byte representation.
|
BN.G2 |
neg(BN.G2 a)
Perform a point negation.
|
static BN.PairG2 |
rand(Random rnd)
Generate a random pair of a point and a scalar that is used to create the point.
|
BN.G2 |
scalarBaseMul(BigInteger k)
Perform a scalar multiplication with the generator point.
|
BN.G2 |
scalarMul(BN.G2 a,
BigInteger k)
Perform a scalar multiplication.
|
BN.G2 |
setInfinity()
Set the point to the infinity (zero) point.
|
String |
toString() |
BN.G2 |
unmarshal(byte[] m)
Turns the byte representation to the point.
|
public static final int ELEM_SIZE
public static final int MARSHAL_SIZE
public G2()
public G2(ch.epfl.dedis.lib.crypto.bn256.TwistPoint p)
p - is the twist point.public G2(BN.G2 p)
p - is G2 point to be copied.public G2(BigInteger k)
k - is the scalar that is multiplied to the generator point to create the object.public static BN.PairG2 rand(Random rnd)
rnd - is the random source.public BN.G2 scalarBaseMul(BigInteger k)
k - is the scalar.public BN.G2 scalarMul(BN.G2 a, BigInteger k)
a - is the point.k - is the scalar.public BN.G2 add(BN.G2 a, BN.G2 b)
a - is a point.b - is a point.public BN.G2 neg(BN.G2 a)
a - is the point to negate.public BN.G2 setInfinity()
public boolean isInfinity()
public byte[] marshal()
public BN.G2 unmarshal(byte[] m)
m - the input bytes.Copyright © 2019. All rights reserved.