aboutsummaryrefslogtreecommitdiffstats
path: root/src/bls.cpp
diff options
context:
space:
mode:
authorMITSUNARI Shigeo <herumi@nifty.com>2016-08-21 14:56:11 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2016-08-21 14:56:11 +0800
commitc168821535428ebfedafb72fd9e70b36cff9f938 (patch)
treec24fdb1aad9fcd31c0d4c9edfd033ca0f08dece1 /src/bls.cpp
parenta90c968b55d975bc0e958631892d1a1799ae97d5 (diff)
downloaddexon-bls-c168821535428ebfedafb72fd9e70b36cff9f938.tar
dexon-bls-c168821535428ebfedafb72fd9e70b36cff9f938.tar.gz
dexon-bls-c168821535428ebfedafb72fd9e70b36cff9f938.tar.bz2
dexon-bls-c168821535428ebfedafb72fd9e70b36cff9f938.tar.lz
dexon-bls-c168821535428ebfedafb72fd9e70b36cff9f938.tar.xz
dexon-bls-c168821535428ebfedafb72fd9e70b36cff9f938.tar.zst
dexon-bls-c168821535428ebfedafb72fd9e70b36cff9f938.zip
unify **Vec
Diffstat (limited to 'src/bls.cpp')
-rw-r--r--src/bls.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/bls.cpp b/src/bls.cpp
index 57c6dee..ab3d68b 100644
--- a/src/bls.cpp
+++ b/src/bls.cpp
@@ -247,7 +247,7 @@ bool Sign::verify(const PublicKey& pub) const
pub.getStr(str);
return verify(pub, str);
}
-void Sign::recover(const std::vector<Sign>& signVec)
+void Sign::recover(const SignVec& signVec)
{
G1 sHm;
LagrangeInterpolation(sHm, signVec);
@@ -307,14 +307,14 @@ void PublicKey::getStr(std::string& str) const
str = os.str();
}
-void PublicKey::set(const MasterPublicKey& mpk, int id)
+void PublicKey::set(const PublicKeyVec& mpk, int id)
{
Wrap<PublicKey, G2> w(mpk);
evalPoly(self_->sQ, Fr(id), w);
id_ = id;
}
-void PublicKey::recover(const std::vector<PublicKey>& pubVec)
+void PublicKey::recover(const PublicKeyVec& pubVec)
{
G2 sQ;
LagrangeInterpolation(sQ, pubVec);
@@ -391,7 +391,7 @@ void SecretKey::getPop(Sign& pop, const PublicKey& pub) const
sign(pop, m);
}
-void SecretKey::getMasterSecretKey(MasterSecretKey& msk, int k) const
+void SecretKey::getMasterSecretKey(SecretKeyVec& msk, int k) const
{
if (k <= 1) throw cybozu::Exception("bls:SecretKey:getMasterSecretKey:bad k") << k;
msk.resize(k);
@@ -401,14 +401,14 @@ void SecretKey::getMasterSecretKey(MasterSecretKey& msk, int k) const
}
}
-void SecretKey::set(const MasterSecretKey& msk, int id)
+void SecretKey::set(const SecretKeyVec& msk, int id)
{
Wrap<SecretKey, Fr> w(msk);
evalPoly(self_->s, id, w);
id_ = id;
}
-void SecretKey::recover(const std::vector<SecretKey>& secVec)
+void SecretKey::recover(const SecretKeyVec& secVec)
{
Fr s;
LagrangeInterpolation(s, secVec);
@@ -422,7 +422,7 @@ void SecretKey::add(const SecretKey& rhs)
self_->s += rhs.self_->s;
}
-void getMasterPublicKey(MasterPublicKey& mpk, const MasterSecretKey& msk)
+void getMasterPublicKey(PublicKeyVec& mpk, const SecretKeyVec& msk)
{
mpk.resize(msk.size());
for (size_t i = 0; i < msk.size(); i++) {
@@ -430,7 +430,7 @@ void getMasterPublicKey(MasterPublicKey& mpk, const MasterSecretKey& msk)
}
}
-void getPopVec(std::vector<Sign>& popVec, const MasterSecretKey& msk, const MasterPublicKey& mpk)
+void getPopVec(SignVec& popVec, const SecretKeyVec& msk, const PublicKeyVec& mpk)
{
if (msk.size() != mpk.size()) throw cybozu::Exception("bls:getPopVec:bad size") << msk.size() << mpk.size();
const size_t n = msk.size();