Browse Source

[acvpkat] Add PK_root to sigGen

master
Henry Case 4 months ago
parent
commit
49a037accc
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      test/acvpkat.c

+ 7
- 1
test/acvpkat.c View File

@@ -252,6 +252,12 @@ void siggen_KAT(const struct param_t *h) {
json_object_object_add(tg_req, "I", json_object_new_string(sbuf));
free(sbuf);

sbuf = malloc(2*params.n + 1);
// Store 'root' from the public key (same as in the secret key)
sprint_hex(sbuf, pk + XMSS_OID_LEN, params.n);
json_object_object_add(tg_req, "PK_root", json_object_new_string(sbuf));
free(sbuf);

sbuf = malloc(2*(params.pk_bytes + XMSS_OID_LEN) + 1);
sprint_hex(sbuf, pk, params.pk_bytes + XMSS_OID_LEN);
json_object_object_add(tg_res, "publicKey", json_object_new_string(sbuf));
@@ -281,7 +287,7 @@ int main() {
{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
{0x13, "XMSS-SHAKE256_10_192", "SHAKE256-N24", 10, 10}, // H10

{0x02, "XMSS-SHA2_16_256", "SHA256-N32", 16, 5}, // H16
{0x0E, "XMSS-SHA2_16_192", "SHA256-N24", 16, 5}, // H16


Loading…
Cancel
Save