From e30d1a62491250f94828580cf89673da284e3425 Mon Sep 17 00:00:00 2001 From: Lin Huang Date: Tue, 12 Sep 2023 20:52:16 -0400 Subject: [PATCH] Change pop_proof() to proof_of_possession() --- libraries/libfc/include/fc/crypto/bls_private_key.hpp | 4 +--- libraries/libfc/src/crypto/bls_private_key.cpp | 2 +- programs/leap-util/actions/bls.cpp | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/libraries/libfc/include/fc/crypto/bls_private_key.hpp b/libraries/libfc/include/fc/crypto/bls_private_key.hpp index c3cd2004ac..71f1e8bae8 100644 --- a/libraries/libfc/include/fc/crypto/bls_private_key.hpp +++ b/libraries/libfc/include/fc/crypto/bls_private_key.hpp @@ -28,9 +28,7 @@ namespace fc::crypto::blslib { bls_public_key get_public_key() const; bls_signature sign( const std::vector& message ) const; - - // Returns proof of possession - bls_signature pop_proof() const; + bls_signature proof_of_possession() const; static bls_private_key generate(); diff --git a/libraries/libfc/src/crypto/bls_private_key.cpp b/libraries/libfc/src/crypto/bls_private_key.cpp index 3fc4092967..95da8abdfa 100644 --- a/libraries/libfc/src/crypto/bls_private_key.cpp +++ b/libraries/libfc/src/crypto/bls_private_key.cpp @@ -13,7 +13,7 @@ namespace fc::crypto::blslib { return bls_public_key(pk); } - bls_signature bls_private_key::pop_proof() const + bls_signature bls_private_key::proof_of_possession() const { bls12_381::g2 proof = bls12_381::pop_prove(_sk); return bls_signature(proof); diff --git a/programs/leap-util/actions/bls.cpp b/programs/leap-util/actions/bls.cpp index 4d43894aed..972de6db89 100644 --- a/programs/leap-util/actions/bls.cpp +++ b/programs/leap-util/actions/bls.cpp @@ -55,7 +55,7 @@ int bls_actions::create_key() { const bls_public_key public_key = private_key.get_public_key(); // generate proof of possession - const bls_signature pop = private_key.pop_proof(); + const bls_signature pop = private_key.proof_of_possession(); // prepare output std::string out_str = "Private key: " + private_key.to_string({}) + "\n"; @@ -106,7 +106,7 @@ int bls_actions::create_pop() { // create private key object using input private key string const bls_private_key private_key = bls_private_key(private_key_str); const bls_public_key public_key = private_key.get_public_key(); - const bls_signature pop = private_key.pop_proof(); + const bls_signature pop = private_key.proof_of_possession(); std::cout << "Proof of Possession: " << pop.to_string({})<< "\n"; std::cout << "Public key: " << public_key.to_string({}) << "\n";