|
|
@@ -22,6 +22,7 @@ |
|
|
|
|
|
|
|
struct param_t { |
|
|
|
uint8_t oid; |
|
|
|
const char *name; |
|
|
|
const char *hash; |
|
|
|
unsigned height; |
|
|
|
unsigned n_samples; |
|
|
@@ -117,6 +118,7 @@ void keygen_KAT(const struct param_t *h) { |
|
|
|
json_object_object_add(tg_req, "tgId", json_object_new_int(1)); |
|
|
|
json_object_object_add(tg_req, "testType", json_object_new_string("AFT")); |
|
|
|
json_object_object_add(tg_req, "OID", json_object_new_int(h->oid)); |
|
|
|
json_object_object_add(tg_req, "param", json_object_new_string(h->name)); |
|
|
|
|
|
|
|
// Response file |
|
|
|
json_object_object_add(tg_res, "tgId", json_object_new_int(1)); |
|
|
@@ -223,10 +225,11 @@ void siggen_KAT(const struct param_t *h) { |
|
|
|
json_object_object_add(tg_req, "tgId", json_object_new_int(1)); |
|
|
|
json_object_object_add(tg_req, "testType", json_object_new_string("AFT")); |
|
|
|
json_object_object_add(tg_req, "OID", json_object_new_int(h->oid)); |
|
|
|
json_object_object_add(tg_req, "param", json_object_new_string(h->name)); |
|
|
|
|
|
|
|
// Response file |
|
|
|
json_object_object_add(tg_res, "tgId", json_object_new_int(1)); |
|
|
|
json_object_object_add(tg_req, "OID", json_object_new_int(h->oid)); |
|
|
|
json_object_object_add(tg_res, "OID", json_object_new_int(h->oid)); |
|
|
|
|
|
|
|
getentropy(seed, 3*params.n); |
|
|
|
xmssmt_core_seed_keypair(¶ms, pk + XMSS_OID_LEN, sk + XMSS_OID_LEN, seed); |
|
|
@@ -266,20 +269,20 @@ void siggen_KAT(const struct param_t *h) { |
|
|
|
|
|
|
|
int main() { |
|
|
|
const struct param_t OIDs[] = { |
|
|
|
{0x01, "SHA256-N32", 10, 10}, // H10 |
|
|
|
{0x0D, "SHA256-N24", 10, 10}, // H10 |
|
|
|
{0x10, "SHAKE256-N32", 10, 10}, // H10 |
|
|
|
{0x13, "SHAKE256-N24", 10, 10}, // H10 |
|
|
|
|
|
|
|
{0x02, "SHA256-N32", 16, 5}, // H16 |
|
|
|
{0x0E, "SHA256-N24", 16, 5}, // H16 |
|
|
|
{0x11, "SHAKE256-N32", 16, 5}, // H16 |
|
|
|
{0x14, "SHAKE256-N24", 16, 5}, // H16 |
|
|
|
|
|
|
|
{0x03, "SHA256-N32", 20, 3}, // H20 |
|
|
|
{0x0F, "SHA256-N24", 20, 3}, // H20 |
|
|
|
{0x12, "SHAKE256-N32", 20, 3}, // H20 |
|
|
|
{0x15, "SHAKE256-N24", 20, 3} // H20 |
|
|
|
{0x01, "XMSS-SHA2_10_256", "SHA256-N32", 10, 10}, // H10 |
|
|
|
{0x0D, "XMSS-SHA2_10_192", "SHA256-N24", 10, 10}, // H10 |
|
|
|
{0x10, "XMSS-SHAKE256_10_256", "SHAKE256-N32", 10, 10}, // H10 |
|
|
|
{0x13, "XMSS-SHAKE256_10_192", "SHA2KE56-N24", 10, 10}, // H10 |
|
|
|
|
|
|
|
{0x02, "XMSS-SHA2_16_256", "SHA256-N32", 16, 5}, // H16 |
|
|
|
{0x0E, "XMSS-SHA2_16_192", "SHA256-N24", 16, 5}, // H16 |
|
|
|
{0x11, "XMSS-SHAKE256_16_256", "SHAKE256-N32", 16, 5}, // H16 |
|
|
|
{0x14, "XMSS-SHAKE256_16_192", "SHAKE256-N24", 16, 5}, // H16 |
|
|
|
|
|
|
|
{0x03, "XMSS-SHA2_20_256", "SHA256-N32", 20, 3}, // H20 |
|
|
|
{0x0F, "XMSS-SHA2_20_192", "SHA256-N24", 20, 3}, // H20 |
|
|
|
{0x12, "XMSS-SHAKE256_20_256", "SHAKE256-N32", 20, 3}, // H20 |
|
|
|
{0x15, "XMSS-SHAKE256_20_192", "SHAKE256-N24", 20, 3} // H20 |
|
|
|
}; |
|
|
|
|
|
|
|
for (size_t i=0; i<12; i++) { |
|
|
|