diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2016-08-31 09:33:19 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2016-08-31 09:35:48 +0800 |
commit | 5f324fd631bd33214cc52f3469dd40f9b099469b (patch) | |
tree | f66bea0e8fcc742a3c23f65d57824f56397db4cb /include/bls.hpp | |
parent | f3a6086363cccd41f940a30d0384580dcc65ba3b (diff) | |
download | dexon-bls-5f324fd631bd33214cc52f3469dd40f9b099469b.tar dexon-bls-5f324fd631bd33214cc52f3469dd40f9b099469b.tar.gz dexon-bls-5f324fd631bd33214cc52f3469dd40f9b099469b.tar.bz2 dexon-bls-5f324fd631bd33214cc52f3469dd40f9b099469b.tar.lz dexon-bls-5f324fd631bd33214cc52f3469dd40f9b099469b.tar.xz dexon-bls-5f324fd631bd33214cc52f3469dd40f9b099469b.tar.zst dexon-bls-5f324fd631bd33214cc52f3469dd40f9b099469b.zip |
refactor bls.cpp
Diffstat (limited to 'include/bls.hpp')
-rw-r--r-- | include/bls.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/bls.hpp b/include/bls.hpp index 78c2c9c..aa287c1 100644 --- a/include/bls.hpp +++ b/include/bls.hpp @@ -44,10 +44,11 @@ class Sign; class Id; /* - value of secretKey and Id must be less than -r = 16798108731015832284940804142231733909759579603404752749028378864165570215949 + the value of secretKey and Id must be less than + r = 0x2523648240000001ba344d8000000007ff9f800000000010a10000000000000d + sizeof(uint64_t) * keySize = 32-byte */ -const size_t keySize = 4; // 256-bit size +const size_t keySize = 4; typedef std::vector<SecretKey> SecretKeyVec; typedef std::vector<PublicKey> PublicKeyVec; @@ -114,7 +115,7 @@ public: /* make [s_0, ..., s_{k-1}] to prepare k-out-of-n secret sharing */ - void getMasterSecretKey(SecretKeyVec& msk, int k) const; + void getMasterSecretKey(SecretKeyVec& msk, size_t k) const; /* set a secret key for id > 0 from msk */ @@ -149,7 +150,6 @@ public: bool operator!=(const PublicKey& rhs) const { return !(*this == rhs); } friend std::ostream& operator<<(std::ostream& os, const PublicKey& pub); friend std::istream& operator>>(std::istream& is, PublicKey& pub); - void getStr(std::string& str) const; /* set public for id from mpk */ |