aboutsummaryrefslogtreecommitdiffstats
path: root/include/bls.hpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2016-08-15 15:34:36 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2016-08-15 15:34:36 +0800
commit08a5785b10a75a155af82db43793d2e4f0da0615 (patch)
tree10277ea6784031862d1085a8c5a799e4c055e4a8 /include/bls.hpp
parent7e2aacd8b7e7f3d9acc6313b64a811d93b674216 (diff)
downloaddexon-bls-08a5785b10a75a155af82db43793d2e4f0da0615.tar.gz
dexon-bls-08a5785b10a75a155af82db43793d2e4f0da0615.tar.zst
dexon-bls-08a5785b10a75a155af82db43793d2e4f0da0615.zip
rename Verifier to MasterPublicKey
Diffstat (limited to 'include/bls.hpp')
-rw-r--r--include/bls.hpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/bls.hpp b/include/bls.hpp
index 6101381..7d40ee3 100644
--- a/include/bls.hpp
+++ b/include/bls.hpp
@@ -17,7 +17,7 @@ namespace impl {
struct PublicKey;
struct PrivateKey;
struct Sign;
-struct Verifier;
+struct MasterPublicKey;
} // bls::impl
@@ -50,19 +50,19 @@ public:
/*
Feldman's verifiable secret sharing
*/
-class Verifier {
- impl::Verifier *self_;
+class MasterPublicKey {
+ impl::MasterPublicKey *self_;
friend class PrivateKey;
friend class PublicKey;
public:
- Verifier();
- ~Verifier();
- Verifier(const Verifier& rhs);
- Verifier& operator=(const Verifier& rhs);
- bool operator==(const Verifier& rhs) const;
- bool operator!=(const Verifier& rhs) const { return !(*this == rhs); }
- friend std::ostream& operator<<(std::ostream& os, const Verifier& ver);
- friend std::istream& operator>>(std::istream& is, Verifier& ver);
+ MasterPublicKey();
+ ~MasterPublicKey();
+ MasterPublicKey(const MasterPublicKey& rhs);
+ MasterPublicKey& operator=(const MasterPublicKey& rhs);
+ bool operator==(const MasterPublicKey& rhs) const;
+ bool operator!=(const MasterPublicKey& rhs) const { return !(*this == rhs); }
+ friend std::ostream& operator<<(std::ostream& os, const MasterPublicKey& mpk);
+ friend std::istream& operator>>(std::istream& is, MasterPublicKey& mpk);
};
class PublicKey {
@@ -87,9 +87,9 @@ public:
*/
void recover(const std::vector<PublicKey>& pubVec);
/*
- validate self by Verifier
+ validate self by MasterPublicKey
*/
- bool isValid(const Verifier& ver) const;
+ bool isValid(const MasterPublicKey& mpk) const;
};
class PrivateKey {
@@ -112,9 +112,9 @@ public:
void sign(Sign& sign, const std::string& m) const;
/*
k-out-of-n secret sharing of privateKey
- set verifier if ver is not 0
+ set verifier if mpk is not 0
*/
- void share(std::vector<PrivateKey>& prvVec, int n, int k, Verifier *ver = 0);
+ void share(std::vector<PrivateKey>& prvVec, int n, int k, MasterPublicKey *mpk = 0);
/*
recover privateKey from k prvVec
*/