BLS12Pairing
State Variables
BLS12_PAIRING
BLS12_377_PAIRING precompile address.
uint256 private constant BLS12_PAIRING = 0x0807;
Functions
verify
Checks that a signature is valid for the octet string message under the public key PK See https://tools.ietf.org/html/draft-irtf-cfrg-bls-signature-04#section-2.8
function verify(Bls12G1 memory public_key, Bls12G2 memory signature, Bls12G2 memory message)
internal
view
returns (bool);
Parameters
Name | Type | Description |
---|---|---|
public_key | Bls12G1 | Public key in BLS12-377 G1. |
signature | Bls12G2 | Signature in BLS12-377 G2. |
message | Bls12G2 | An octet string. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | Result, either VALID or INVALID. |
pairing
Computes a "product" of pairings.
function pairing(Bls12G1[] memory a, Bls12G2[] memory b) internal view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
a | Bls12G1[] | List of Bls12G1. |
b | Bls12G2[] | List of Bls12G2. |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | True if pairing output is 1. |