aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/pubkey/eckcdsa
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-02-21 11:12:32 -0500
committerJack Lloyd <[email protected]>2018-02-21 11:12:32 -0500
commit1d07f8287a452420db969cafd61bc223214cff03 (patch)
treefd78e74fd7dd766f690654fa4c8c940e02c2e2c0 /src/lib/pubkey/eckcdsa
parent061182a46f8b9e42808d57ec7bbafc13db7cf809 (diff)
New API for blinded ECC point multiplication
No shared state
Diffstat (limited to 'src/lib/pubkey/eckcdsa')
-rw-r--r--src/lib/pubkey/eckcdsa/eckcdsa.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/pubkey/eckcdsa/eckcdsa.cpp b/src/lib/pubkey/eckcdsa/eckcdsa.cpp
index 743d5ab95..be721a6b6 100644
--- a/src/lib/pubkey/eckcdsa/eckcdsa.cpp
+++ b/src/lib/pubkey/eckcdsa/eckcdsa.cpp
@@ -45,7 +45,6 @@ class ECKCDSA_Signature_Operation final : public PK_Ops::Signature_with_EMSA
const std::string& emsa) :
PK_Ops::Signature_with_EMSA(emsa),
m_group(eckcdsa.domain()),
- m_base_point(m_group.get_base_point(), m_group.get_order()),
m_x(eckcdsa.private_value()),
m_prefix()
{
@@ -68,9 +67,9 @@ class ECKCDSA_Signature_Operation final : public PK_Ops::Signature_with_EMSA
private:
const EC_Group m_group;
- Blinded_Point_Multiply m_base_point;
const BigInt& m_x;
secure_vector<uint8_t> m_prefix;
+ std::vector<BigInt> m_ws;
};
secure_vector<uint8_t>
@@ -78,7 +77,7 @@ 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 PointGFp k_times_P = m_base_point.blinded_multiply(k, rng);
+ const PointGFp k_times_P = m_group.blinded_base_point_multiply(k, rng, m_ws);
const BigInt k_times_P_x = k_times_P.get_affine_x();
secure_vector<uint8_t> to_be_hashed(k_times_P_x.bytes());