aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_ecdsa.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2015-08-21 19:21:16 -0400
committerJack Lloyd <[email protected]>2015-08-21 19:21:16 -0400
commitca155a7e54ec39e60f9dd6c53567ebf283b3e8d0 (patch)
tree97a257b7c4cce8a0f46433ae88ea5485892635ac /src/tests/test_ecdsa.cpp
parentbae7c12ecf78457c146467ecfbc6a5577cf6f529 (diff)
Add power analysis countermeasures for ECC point multiplications.
The plain PointGFp operator* now uses Montgomery ladder exclusively. Adds a blinded point multiply algorithm which uses exponent and point randomization, as well as a Montgomery ladder technique that takes a random walk of the possible addition chains for k.
Diffstat (limited to 'src/tests/test_ecdsa.cpp')
-rw-r--r--src/tests/test_ecdsa.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/tests/test_ecdsa.cpp b/src/tests/test_ecdsa.cpp
index a2ec8d115..8d385b4bf 100644
--- a/src/tests/test_ecdsa.cpp
+++ b/src/tests/test_ecdsa.cpp
@@ -25,7 +25,6 @@ size_t ecdsa_sig_kat(const std::string& group_id,
const std::string& x,
const std::string& hash,
const std::string& msg,
- const std::string& nonce,
const std::string& signature)
{
auto& rng = test_rng();
@@ -39,7 +38,7 @@ size_t ecdsa_sig_kat(const std::string& group_id,
PK_Signer sign(ecdsa, padding);
return validate_signature(verify, sign, "ECDSA/" + group_id + '/' + hash,
- msg, rng, nonce, signature);
+ msg, rng, signature);
}
}
@@ -53,7 +52,7 @@ size_t test_ecdsa()
fails += run_tests_bb(ecdsa_sig, "ECDSA Signature", "Signature", false,
[](std::map<std::string, std::string> m) -> size_t
{
- return ecdsa_sig_kat(m["Group"], m["X"], m["Hash"], m["Msg"], m["Nonce"], m["Signature"]);
+ return ecdsa_sig_kat(m["Group"], m["X"], m["Hash"], m["Msg"], m["Signature"]);
});
return fails;