diff options
author | Jeffrey Walton <noloader@gmail.com> | 2016-04-09 23:50:33 -0400 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2016-04-09 23:50:33 -0400 |
commit | 75555369d96457ae79c060076fcbc3cfa584ece2 (patch) | |
tree | 2ec42e7ee0ef9d97895130cc1ab728d8eb079746 /datatest.cpp | |
parent | 89d0581525531174027bf7d584be23e05bc2378a (diff) | |
download | cryptopp-git-75555369d96457ae79c060076fcbc3cfa584ece2.tar.gz |
Prepare for RFC6979, Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)
Diffstat (limited to 'datatest.cpp')
-rw-r--r-- | datatest.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
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")
{
|