Unverified Commit e6e10bd3 authored by Sofia Celi's avatar Sofia Celi

Check signed comparison

parent 2f1b1a7c
......@@ -631,14 +631,14 @@ static void test_convert_eddsa_to_x() {
static void test_dalek_vectors() {
Test test("Test vectors from Dalek");
Point p = Point::base(), q;
for (unsigned i=0; i<base_multiples<Group>::count; i++) {
for (signed i=0; i<base_multiples<Group>::count; i++) {
if (!decaf_memeq(q.serialize().data(),base_multiples<Group>::values[i],Point::SER_BYTES)) {
test.fail();
printf(" Failed test vector for %d * base point.\n", i);
}
q += p;
}
for (unsigned i=0; i<elligator_examples<Group>::count; i++) {
for (signed i=0; i<elligator_examples<Group>::count; i++) {
Point r = Point::from_hash(FixedBlock<Point::HASH_BYTES>(elligator_examples<Group>::inputs[i]));
Point s = Point(FixedBlock<Point::SER_BYTES>(elligator_examples<Group>::outputs[i]));
point_check(test,r,r,r,0,0,r,s,"elligator test vector");
......
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