From 09c8b4bbb37250df95ee898bcd6a0e090049d225 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Fri, 13 Sep 2013 19:18:01 -0400 Subject: More new crypto: Ed25519 signatures. --- selftest.cpp | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) (limited to 'selftest.cpp') diff --git a/selftest.cpp b/selftest.cpp index c9e41034..56352ff6 100644 --- a/selftest.cpp +++ b/selftest.cpp @@ -112,7 +112,7 @@ static int testCrypto() C25519::agree(p2,p1.pub,buf2,64); C25519::agree(p3,p1.pub,buf3,64); if (memcmp(buf1,buf2,64)) { - std::cout << "FAIL" << std::endl; + std::cout << "FAIL (1)" << std::endl; return -1; } if (!memcmp(buf2,buf3,64)) { @@ -122,6 +122,42 @@ static int testCrypto() } std::cout << "PASS" << std::endl; + std::cout << "[crypto] Testing Ed25519 ECC signatures... "; std::cout.flush(); + C25519::Pair didntSign = C25519::generate(); + for(unsigned int i=0;i<10;++i) { + C25519::Pair p1 = C25519::generate(); + for(unsigned int k=0;k