"0bfa8d629fe89bd9591f20575144f0445958fd3574179ec4a9b6ee85787c23d69b4f009d3ed3bd2bb62226638602b95bc4719a1d2c60afb07ed95c959628ff0c",
};
static size_t nb_edDSA_vectors=4;
+static const char *edDSA_pk_vectors[]={
+ "e4e4c4054fe35a75d9c0f679ad8770d8227e68e4c1e68ce67ee88e6be251a207",
+ "61435d557c6bedda3b9d652b98982c227ffedb203fc2357cabe8075508f4e6f0",
+};
+static size_t nb_edDSA_pk_vectors=2;
static const char *ed_25519_vectors[]={
"50831c8cb43cd6822bf3f6fae0801cb6c843d8066b07346635365fb7d6ee54e5",
"38bfc0b57ba86490aa2f41a3209e360ea4df055f22c07c7f54326d36780f42f6",
crypto_eddsa_sign(out.buf, fat_secret_key, msg.buf, msg.size);
}
+static void edDSA_pk(vector_reader *reader)
+{
+ vector in = next_input(reader);
+ vector out = next_output(reader);
+ u8 seed [32];
+ u8 secret_key[64];
+ u8 public_key[32];
+ memcpy(seed, in.buf, 32);
+ crypto_eddsa_key_pair(secret_key, public_key, seed);
+ memcpy(out.buf, public_key, 32);
+
+ u8 zeroes[32] = {0};
+ ASSERT_EQUAL(seed , zeroes , 32);
+ ASSERT_EQUAL(secret_key , in.buf , 32);
+ ASSERT_EQUAL(secret_key + 32, public_key, 32);
+}
+
static void ed_25519(vector_reader *reader)
{
vector secret_k = next_input(reader);
//@ ensures \result == 0;
TEST(edDSA)
//@ ensures \result == 0;
+TEST(edDSA_pk)
+//@ ensures \result == 0;
TEST(ed_25519)
//@ ensures \result == 0;
TEST(ed_25519_check)
ASSERT(v_argon2 () == 0);
ASSERT(v_x25519 () == 0);
ASSERT(v_edDSA () == 0);
+ ASSERT(v_edDSA_pk () == 0);
ASSERT(v_ed_25519 () == 0);
ASSERT(v_ed_25519_check() == 0);
ASSERT(v_elligator_dir () == 0);
, "no-results" : true
, "main" : "v_edDSA"
},
+{ "name" : "v_edDSA_pk - sparc_32"
+, "files" :
+ [ "src/monocypher.c"
+ , "src/optional/monocypher-ed25519.c"
+ , "tests/utils.c"
+ , "tests/tis-ci.c"
+ ]
+, "cpp-extra-args": "-Isrc -Isrc/optional -Itests"
+, "machdep" : "sparc_32"
+, "no-results" : true
+, "main" : "v_edDSA_pk"
+},
+{ "name" : "v_edDSA_pk - x86_32"
+, "files" :
+ [ "src/monocypher.c"
+ , "src/optional/monocypher-ed25519.c"
+ , "tests/utils.c"
+ , "tests/tis-ci.c"
+ ]
+, "cpp-extra-args": "-Isrc -Isrc/optional -Itests"
+, "machdep" : "x86_32"
+, "no-results" : true
+, "main" : "v_edDSA_pk"
+},
+{ "name" : "v_edDSA_pk - x86_16"
+, "files" :
+ [ "src/monocypher.c"
+ , "src/optional/monocypher-ed25519.c"
+ , "tests/utils.c"
+ , "tests/tis-ci.c"
+ ]
+, "cpp-extra-args": "-Isrc -Isrc/optional -Itests"
+, "machdep" : "x86_16"
+, "no-results" : true
+, "main" : "v_edDSA_pk"
+},
+{ "name" : "v_edDSA_pk - x86_win64"
+, "files" :
+ [ "src/monocypher.c"
+ , "src/optional/monocypher-ed25519.c"
+ , "tests/utils.c"
+ , "tests/tis-ci.c"
+ ]
+, "cpp-extra-args": "-Isrc -Isrc/optional -Itests"
+, "machdep" : "x86_win64"
+, "no-results" : true
+, "main" : "v_edDSA_pk"
+},
+{ "name" : "v_edDSA_pk - armeb_eabi"
+, "files" :
+ [ "src/monocypher.c"
+ , "src/optional/monocypher-ed25519.c"
+ , "tests/utils.c"
+ , "tests/tis-ci.c"
+ ]
+, "cpp-extra-args": "-Isrc -Isrc/optional -Itests"
+, "machdep" : "armeb_eabi"
+, "no-results" : true
+, "main" : "v_edDSA_pk"
+},
+{ "name" : "v_edDSA_pk - arm_eabi"
+, "files" :
+ [ "src/monocypher.c"
+ , "src/optional/monocypher-ed25519.c"
+ , "tests/utils.c"
+ , "tests/tis-ci.c"
+ ]
+, "cpp-extra-args": "-Isrc -Isrc/optional -Itests"
+, "machdep" : "arm_eabi"
+, "no-results" : true
+, "main" : "v_edDSA_pk"
+},
+{ "name" : "v_edDSA_pk - aarch64"
+, "files" :
+ [ "src/monocypher.c"
+ , "src/optional/monocypher-ed25519.c"
+ , "tests/utils.c"
+ , "tests/tis-ci.c"
+ ]
+, "cpp-extra-args": "-Isrc -Isrc/optional -Itests"
+, "machdep" : "aarch64"
+, "no-results" : true
+, "main" : "v_edDSA_pk"
+},
+{ "name" : "v_edDSA_pk - rv64ifdq"
+, "files" :
+ [ "src/monocypher.c"
+ , "src/optional/monocypher-ed25519.c"
+ , "tests/utils.c"
+ , "tests/tis-ci.c"
+ ]
+, "cpp-extra-args": "-Isrc -Isrc/optional -Itests"
+, "machdep" : "rv64ifdq"
+, "no-results" : true
+, "main" : "v_edDSA_pk"
+},
+{ "name" : "v_edDSA_pk - mips_64"
+, "files" :
+ [ "src/monocypher.c"
+ , "src/optional/monocypher-ed25519.c"
+ , "tests/utils.c"
+ , "tests/tis-ci.c"
+ ]
+, "cpp-extra-args": "-Isrc -Isrc/optional -Itests"
+, "machdep" : "mips_64"
+, "no-results" : true
+, "main" : "v_edDSA_pk"
+},
+{ "name" : "v_edDSA_pk - ppc_64"
+, "files" :
+ [ "src/monocypher.c"
+ , "src/optional/monocypher-ed25519.c"
+ , "tests/utils.c"
+ , "tests/tis-ci.c"
+ ]
+, "cpp-extra-args": "-Isrc -Isrc/optional -Itests"
+, "machdep" : "ppc_64"
+, "no-results" : true
+, "main" : "v_edDSA_pk"
+},
{ "name" : "v_ed_25519 - sparc_32"
, "files" :
[ "src/monocypher.c"