From 75555369d96457ae79c060076fcbc3cfa584ece2 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sat, 9 Apr 2016 23:50:33 -0400 Subject: [PATCH] Prepare for RFC6979, Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA) --- TestVectors/all.txt | 2 ++ datatest.cpp | 9 +++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/TestVectors/all.txt b/TestVectors/all.txt index 776e0099..776bd2da 100644 --- a/TestVectors/all.txt +++ b/TestVectors/all.txt @@ -9,6 +9,8 @@ Test: TestVectors/whrlpool.txt Test: TestVectors/dlies.txt Test: TestVectors/dsa.txt Test: TestVectors/dsa_1363.txt +#Test: TestVectors/dsa_rfc6979.txt +#Test: TestVectors/ecdsa_rfc6979.txt Test: TestVectors/esign.txt Test: TestVectors/hmac.txt Test: TestVectors/nr.txt diff --git a/datatest.cpp b/datatest.cpp index 8c22cb5f..ccc61c6e 100644 --- a/datatest.cpp +++ b/datatest.cpp @@ -286,8 +286,13 @@ void TestSignatureScheme(TestData &v) } else if (test == "DeterministicSign") { - SignalTestError(); - assert(false); // TODO: implement + // This test is specialized for RFC 6979. The RFC is a drop-in replacement + // for DSA and ECDSA, and access to the seed or secret is not needed. If + // additional determinsitic signatures are added, then the test harness will + // likely need to be extended. + SignerFilter f(GlobalRNG(), *signer, new HexEncoder(new FileSink(cout))); + StringSource ss(GetDecodedDatum(v, "Message"), true, new Redirector(f)); + SignalTestFailure(); } else if (test == "RandomSign") {