aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/gost_3410/gost_3410.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/pubkey/gost_3410/gost_3410.cpp')
-rw-r--r--src/lib/pubkey/gost_3410/gost_3410.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lib/pubkey/gost_3410/gost_3410.cpp b/src/lib/pubkey/gost_3410/gost_3410.cpp
index 4e2df4cb8..0fcca1b8d 100644
--- a/src/lib/pubkey/gost_3410/gost_3410.cpp
+++ b/src/lib/pubkey/gost_3410/gost_3410.cpp
@@ -119,12 +119,7 @@ secure_vector<uint8_t>
GOST_3410_Signature_Operation::raw_sign(const uint8_t msg[], size_t msg_len,
RandomNumberGenerator& rng)
{
- BigInt k;
-
- do
- {
- k.randomize(rng, m_group.get_order_bits() - 1);
- } while(k >= m_group.get_order());
+ const BigInt k = m_group.random_scalar(rng);
BigInt e = decode_le(msg, msg_len);