@@ -319,7 +319,7 @@ static void macro() { | |||||
printf("CFRG crypto benchmarks:\n"); | printf("CFRG crypto benchmarks:\n"); | ||||
cfrg(); | cfrg(); | ||||
printf("\nSample crypto benchmarks:\n"); | |||||
printf("\nToy crypto benchmarks:\n"); | |||||
SpongeRng rng(Block("macro rng seed"),SpongeRng::DETERMINISTIC); | SpongeRng rng(Block("macro rng seed"),SpongeRng::DETERMINISTIC); | ||||
PrivateKey<Group> s1((NOINIT())), s2(rng); | PrivateKey<Group> s1((NOINIT())), s2(rng); | ||||
PublicKey<Group> p1((NOINIT())), p2(s2); | PublicKey<Group> p1((NOINIT())), p2(s2); | ||||
@@ -17,6 +17,7 @@ | |||||
#include <valgrind/memcheck.h> | #include <valgrind/memcheck.h> | ||||
using namespace decaf; | using namespace decaf; | ||||
using namespace decaf::TOY; | |||||
static const long NTESTS = 10; | static const long NTESTS = 10; | ||||
@@ -410,8 +410,8 @@ static void test_ec() { | |||||
} | } | ||||
} | } | ||||
static void test_crypto() { | |||||
Test test("Sample crypto"); | |||||
static void test_toy_crypto() { | |||||
Test test("Toy crypto"); | |||||
SpongeRng rng(Block("test_decaf_crypto"),SpongeRng::DETERMINISTIC); | SpongeRng rng(Block("test_decaf_crypto"),SpongeRng::DETERMINISTIC); | ||||
for (int i=0; i<NTESTS && test.passing_now; i++) { | for (int i=0; i<NTESTS && test.passing_now; i++) { | ||||
@@ -580,7 +580,7 @@ static void run() { | |||||
test_eddsa(); | test_eddsa(); | ||||
test_cfrg_crypto(); | test_cfrg_crypto(); | ||||
test_cfrg_vectors(); | test_cfrg_vectors(); | ||||
test_crypto(); | |||||
test_toy_crypto(); | |||||
printf("\n"); | printf("\n"); | ||||
} | } | ||||