Explicitly parse XMSS_VARIANT to get OID for tests

This commit is contained in:
Joost Rijneveld 2017-10-31 17:17:35 +01:00
parent c248911178
commit a234427390
No known key found for this signature in database
GPG Key ID: A4FE39CF49CBC553

View File

@ -15,12 +15,14 @@
#ifdef XMSSMT #ifdef XMSSMT
#define XMSS_PARSE_OID xmssmt_parse_oid #define XMSS_PARSE_OID xmssmt_parse_oid
#define XMSS_STR_TO_OID xmssmt_str_to_oid
#define XMSS_KEYPAIR xmssmt_keypair #define XMSS_KEYPAIR xmssmt_keypair
#define XMSS_SIGN xmssmt_sign #define XMSS_SIGN xmssmt_sign
#define XMSS_SIGN_OPEN xmssmt_sign_open #define XMSS_SIGN_OPEN xmssmt_sign_open
#define XMSS_VARIANT "XMSSMT-SHA2_20/2_256" #define XMSS_VARIANT "XMSSMT-SHA2_20/2_256"
#else #else
#define XMSS_PARSE_OID xmss_parse_oid #define XMSS_PARSE_OID xmss_parse_oid
#define XMSS_STR_TO_OID xmss_str_to_oid
#define XMSS_KEYPAIR xmss_keypair #define XMSS_KEYPAIR xmss_keypair
#define XMSS_SIGN xmss_sign #define XMSS_SIGN xmss_sign
#define XMSS_SIGN_OPEN xmss_sign_open #define XMSS_SIGN_OPEN xmss_sign_open
@ -30,10 +32,11 @@
int main() int main()
{ {
xmss_params params; xmss_params params;
// TODO test more different OIDs uint32_t oid;
uint32_t oid = 0x01000001;
int i; int i;
// TODO test more different variants
XMSS_STR_TO_OID(&oid, XMSS_VARIANT);
XMSS_PARSE_OID(&params, oid); XMSS_PARSE_OID(&params, oid);
unsigned char pk[XMSS_OID_LEN + params.pk_bytes]; unsigned char pk[XMSS_OID_LEN + params.pk_bytes];