Commit 03977eba authored by Michael Hamburg's avatar Michael Hamburg

Minor changes.

Bump version number in CMakeLists.txt, thanks Johan Pascal.
Change test scripts to avoid GCC warnings, thanks Sofi Celi.
Add full RFC 8032 test vectors, thanks Sofi Celi.
parent 88169732
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
############################################################################ ############################################################################
cmake_minimum_required(VERSION 3.0) cmake_minimum_required(VERSION 3.0)
project(DECAF VERSION 0.9.4 LANGUAGES C CXX) project(DECAF VERSION 1.0 LANGUAGES C CXX)
set(DECAF_SO_VERSION "0") set(DECAF_SO_VERSION "0")
......
...@@ -191,7 +191,7 @@ static void test_arithmetic() { ...@@ -191,7 +191,7 @@ static void test_arithmetic() {
printf(" Inverted zero!"); printf(" Inverted zero!");
print("x", x); print("x", x);
print("y", y); print("y", y);
} catch(CryptoException) {} } catch(CryptoException&) {}
} }
} }
...@@ -522,6 +522,18 @@ static void test_cfrg_vectors() { ...@@ -522,6 +522,18 @@ static void test_cfrg_vectors() {
for (unsigned i=0; i<sig.size(); i++) printf("%02x", sig[i]); for (unsigned i=0; i<sig.size(); i++) printf("%02x", sig[i]);
printf("\n"); printf("\n");
} }
try {
typename EdDSA<Group>::PublicKey pub(eddsa_pk[t]);
if (eddsa_prehashed[t]) {
pub.verify_with_prehash(eddsa_sig[t], eddsa_message[t], eddsa_context[t]);
} else {
priv.pub().verify(eddsa_sig[t], eddsa_message[t], eddsa_context[t]);
}
} catch(CryptoException&) {
test.fail();
printf(" EdDSA Verify vector #%d disagree\n", t);
}
} }
/* X25519/X448 */ /* X25519/X448 */
...@@ -565,7 +577,7 @@ static void test_eddsa() { ...@@ -565,7 +577,7 @@ static void test_eddsa() {
try { try {
pub.verify(sig,message,context); pub.verify(sig,message,context);
} catch(CryptoException) { } catch(CryptoException&) {
test.fail(); test.fail();
printf(" Signature validation failed on sig %d\n", i); printf(" Signature validation failed on sig %d\n", i);
} }
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment