public class BlsSig extends Object
| Constructor and Description |
|---|
BlsSig(byte[] sig)
Constructor from an existing signature.
|
BlsSig(byte[] msg,
Scalar x)
Constructor that creates a BLS signature S = x * H(m) on a message m using the private
key x.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getSig()
Getter for the signature in byte representation.
|
boolean |
verify(byte[] msg,
Bn256G2Point X)
Verify checks the given BLS signature S on the message m using the public
key X by verifying that the equality e(H(m), X) == e(H(m), x*B2) ==
e(x*H(m), B2) == e(S, B2) holds where e is the pairing operation and B2 is
the base point from curve G2.
|
public BlsSig(byte[] sig)
sig - is the signaturepublic BlsSig(byte[] msg,
Scalar x)
msg - is the message to be signed.x - is the secret.public boolean verify(byte[] msg,
Bn256G2Point X)
msg - the signed message .X - the public key.public byte[] getSig()
Copyright © 2019. All rights reserved.