Skip to content

Commit

Permalink
Update src/pages/core/standard-library/cryptography/bls12-381.mdx
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Warta <[email protected]>
  • Loading branch information
aumetra and webmaster128 authored Jul 18, 2024
1 parent 760b433 commit b929b1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/core/standard-library/cryptography/bls12-381.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub fn query(
) -> StdResult<QueryResponse> {
// Verify the signature. On chain!
let msg_hash = deps.api.bls12_381_hash_to_g1(HashFunction::Sha256, &msg.msg, &msg.dst)?;
let is_valid = deps.api.bls12_381_pairing_equality(&msg.signature, &BLS12_381_G2_GENERATOR, &msg.pubkey, &msg_hash)?;
let is_valid = deps.api.bls12_381_pairing_equality(&msg.signature, &BLS12_381_G2_GENERATOR, &msg_hash, &msg.pubkey)?;
let response = to_json_binary(&VerifyResponse {
is_valid
})?;
Expand Down

0 comments on commit b929b1b

Please sign in to comment.