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