aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/eckcdsa
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-03-21 11:00:21 -0400
committerJack Lloyd <[email protected]>2018-03-21 11:00:21 -0400
commit574f44727d386984cf87a1161cec135209091650 (patch)
treef8dd93f7154455e81cf16d0947cc4be8172d27c3 /src/lib/pubkey/eckcdsa
parentb03c5da8b56606f7b4df8122d8bd7914760dba32 (diff)
Add EC_Group::random_scalar
Diffstat (limited to 'src/lib/pubkey/eckcdsa')
-rw-r--r--src/lib/pubkey/eckcdsa/eckcdsa.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/pubkey/eckcdsa/eckcdsa.cpp b/src/lib/pubkey/eckcdsa/eckcdsa.cpp
index f9d9b2f60..f16fb027e 100644
--- a/src/lib/pubkey/eckcdsa/eckcdsa.cpp
+++ b/src/lib/pubkey/eckcdsa/eckcdsa.cpp
@@ -76,7 +76,7 @@ secure_vector<uint8_t>
ECKCDSA_Signature_Operation::raw_sign(const uint8_t msg[], size_t,
RandomNumberGenerator& rng)
{
- const BigInt k = BigInt::random_integer(rng, 1, m_group.get_order());
+ const BigInt k = m_group.random_scalar(rng);
const BigInt k_times_P_x = m_group.blinded_base_point_multiply_x(k, rng, m_ws);
secure_vector<uint8_t> to_be_hashed(k_times_P_x.bytes());