diff options
author | MITSUNARI Shigeo <herumi@nifty.com> | 2018-02-05 19:22:27 +0800 |
---|---|---|
committer | MITSUNARI Shigeo <herumi@nifty.com> | 2018-02-05 19:22:27 +0800 |
commit | 489ef0cf31b0ef40257516213dbb80926c883e9d (patch) | |
tree | 313789b8811b0c4d0a1dd1cc870ee7d63d456481 | |
parent | 48a0aae5fe106ced5353c1f089d3693085c2b3e4 (diff) | |
download | dexon-bls-489ef0cf31b0ef40257516213dbb80926c883e9d.tar.gz dexon-bls-489ef0cf31b0ef40257516213dbb80926c883e9d.tar.zst dexon-bls-489ef0cf31b0ef40257516213dbb80926c883e9d.zip |
remove getRG()
-rw-r--r-- | src/bls.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/bls.cpp b/src/bls.cpp index 2e05f68..cc67186 100644 --- a/src/bls.cpp +++ b/src/bls.cpp @@ -5,7 +5,6 @@ http://opensource.org/licenses/BSD-3-Clause */ #include <cybozu/crypto.hpp> -#include <cybozu/random_generator.hpp> #include <vector> #include <string> #include <bls/bls.hpp> @@ -20,13 +19,6 @@ using namespace mcl::bn384; #endif typedef std::vector<Fr> FrVec; - -static cybozu::RandomGenerator& getRG() -{ - static cybozu::RandomGenerator rg; - return rg; -} - const std::vector<Fp6> *g_pQcoeff; const G2 *g_pQ; @@ -73,7 +65,7 @@ struct Polynomial { c.resize(k); c[0] = s; for (size_t i = 1; i < c.size(); i++) { - c[i].setRand(getRG()); + c[i].setRand(); } } // y = f(id) @@ -405,7 +397,7 @@ void SecretKey::setStr(const std::string& str, int ioMode) void SecretKey::init() { - getInner().s.setRand(getRG()); + getInner().s.setRand(); } void SecretKey::set(const uint64_t *p) |