id: bls title: BLS sidebar_label: BLS

BLS

Kind: global class
this: {“{”}BLS{"}"}

new BLS()

Creates an instance of BLS

BLS.bytestostring() ⇒

Convert byte array to string

Kind: static method of BLS
Returns: string
this: {“{”}BLS{"}"}
Parameter: b byte array

BLS.stringtobytes() ⇒

Convert string to byte array

Kind: static method of BLS
Returns: byte array
this: {“{”}BLS{"}"}
Parameter: s string

BLS.bls_hashit() ⇒

hash a message to an ECP point, using SHA3

Kind: static method of BLS
Returns: ECP point
this: {“{”}BLS{"}"}
Parameter: m message to be hashedstring

BLS.KeyPairGenerate() ⇒

Generate key pair

Kind: static method of BLS
Returns: Error code
this: {“{”}BLS{"}"}
Parameter: rng Cryptographically Secure Random Number Generator
Parameter: S Private key
Parameter: W Public key

BLS.sign() ⇒

Sign message

Kind: static method of BLS
Returns: Error code
this: {“{”}BLS{"}"}
Parameter: SIG Singature
Parameter: m Message to sign
Parameter: S Private key

BLS.verify() ⇒

Verify message

Kind: static method of BLS
Returns: Error code
this: {“{”}BLS{"}"}
Parameter: SIG Signature
Parameter: m Message to sign
Parameter: W Public key

BLS.add_G1() ⇒

R=R1+R2 in group G1

Kind: static method of BLS
Returns: Error code
this: {“{”}BLS{"}"}
Parameter: R1 G1 Point
Parameter: R2 G1 Point
Parameter: R G1 Point

BLS.add_G2() ⇒

W=W1+W2 in group G2

Kind: static method of BLS
Returns: Error code
this: {“{”}BLS{"}"}
Parameter: W1 G2 Point
Parameter: W2 G2 Point
Parameter: R G2 Point