diff --git a/params_runtime.c b/params_runtime.c index 271deec..28caf9a 100644 --- a/params_runtime.c +++ b/params_runtime.c @@ -1,24 +1,6 @@ #include #include "params_runtime.h" -unsigned int XMSS_FUNC; -unsigned int XMSS_N; -unsigned int XMSS_WOTS_W; -unsigned int XMSS_WOTS_LOG_W; -unsigned int XMSS_WOTS_LEN1; -unsigned int XMSS_WOTS_LEN2; -unsigned int XMSS_WOTS_LEN; -unsigned int XMSS_WOTS_KEYSIZE; -unsigned int XMSS_FULLHEIGHT; -unsigned int XMSS_TREEHEIGHT; -unsigned int XMSS_D; -unsigned int XMSS_INDEX_LEN; -unsigned int XMSS_BYTES; -unsigned int XMSS_PUBLICKEY_BYTES; -unsigned int XMSS_PRIVATEKEY_BYTES; -unsigned int XMSS_OID_LEN; -unsigned int XMSS_BDS_K; - int xmss_parse_oid(uint32_t oid) { switch (oid) { diff --git a/params_runtime.h b/params_runtime.h index e644c18..5963643 100644 --- a/params_runtime.h +++ b/params_runtime.h @@ -7,23 +7,24 @@ #define XMSS_SHA2 0 #define XMSS_SHAKE 1 -extern unsigned int XMSS_FUNC; -extern unsigned int XMSS_N; -extern unsigned int XMSS_WOTS_W; -extern unsigned int XMSS_WOTS_LOG_W; -extern unsigned int XMSS_WOTS_LEN1; -extern unsigned int XMSS_WOTS_LEN2; -extern unsigned int XMSS_WOTS_LEN; -extern unsigned int XMSS_WOTS_KEYSIZE; -extern unsigned int XMSS_FULLHEIGHT; -extern unsigned int XMSS_TREEHEIGHT; -extern unsigned int XMSS_D; -extern unsigned int XMSS_INDEX_LEN; -extern unsigned int XMSS_BYTES; -extern unsigned int XMSS_PUBLICKEY_BYTES; -extern unsigned int XMSS_PRIVATEKEY_BYTES; -extern unsigned int XMSS_OID_LEN; -extern unsigned int XMSS_BDS_K; +// These parameters can be used after calling xmss[mt]_parse_oid(oid). +unsigned int XMSS_FUNC; +unsigned int XMSS_N; +unsigned int XMSS_WOTS_W; +unsigned int XMSS_WOTS_LOG_W; +unsigned int XMSS_WOTS_LEN1; +unsigned int XMSS_WOTS_LEN2; +unsigned int XMSS_WOTS_LEN; +unsigned int XMSS_WOTS_KEYSIZE; +unsigned int XMSS_FULLHEIGHT; +unsigned int XMSS_TREEHEIGHT; +unsigned int XMSS_D; +unsigned int XMSS_INDEX_LEN; +unsigned int XMSS_BYTES; +unsigned int XMSS_PUBLICKEY_BYTES; +unsigned int XMSS_PRIVATEKEY_BYTES; +unsigned int XMSS_OID_LEN; +unsigned int XMSS_BDS_K; int xmss_parse_oid(uint32_t oid); int xmssmt_parse_oid(uint32_t oid);