generate secret from range [0..characteristic] in c++
This commit is contained in:
parent
6c30f7d432
commit
1409dc940b
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ public:
|
||||||
User(const DHSetup<T> &dh) {
|
User(const DHSetup<T> &dh) {
|
||||||
std::random_device rand;
|
std::random_device rand;
|
||||||
std::mt19937 gen(rand());
|
std::mt19937 gen(rand());
|
||||||
std::uniform_int_distribution<> dist(0);
|
std::uniform_int_distribution<> dist(0, dh.getGenerator().characteristic());
|
||||||
this->secret = dist(gen);
|
this->secret = dist(gen);
|
||||||
|
|
||||||
this->dh = dh;
|
this->dh = dh;
|
||||||
|
|
Loading…
Reference in a new issue