Skip to content

Latest commit

 

History

History
71 lines (33 loc) · 2.25 KB

bls12381.md

File metadata and controls

71 lines (33 loc) · 2.25 KB

Module 0x2::bls12381

Source from https://github.com/MystenLabs/sui/blob/da72e73a9f4a1b42df863b76af7745a4eeb1d412/crates/sui-framework/packages/sui-framework/sources/crypto/bls12381.move

Constants

const E_PUBKEY_FAILED: u64 = 2;

const E_SIG_FAILED: u64 = 1;

Function bls12381_min_sig_verify

@param signature: A 48-bytes signature that is a point on the G1 subgroup. @param public_key: A 96-bytes public key that is a point on the G2 subgroup. @param msg: The message that we test the signature against.

If the signature is a valid signature of the message and public key according to BLS_SIG_BLS12381G1_XMD:SHA-256_SSWU_RO_NUL_, return true. Otherwise, return false.

public fun bls12381_min_sig_verify(signature: &vector<u8>, public_key: &vector<u8>, msg: &vector<u8>): bool

Function bls12381_min_pk_verify

@param signature: A 96-bytes signature that is a point on the G2 subgroup. @param public_key: A 48-bytes public key that is a point on the G1 subgroup. @param msg: The message that we test the signature against.

If the signature is a valid signature of the message and public key according to BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_, return true. Otherwise, return false.

public fun bls12381_min_pk_verify(signature: &vector<u8>, public_key: &vector<u8>, msg: &vector<u8>): bool