Simplify runtime parameter globals

This commit is contained in:
Joost Rijneveld 2017-08-24 14:59:14 +02:00
parent 9d5884e120
commit 2f87bf5a1f
No known key found for this signature in database
GPG Key ID: 307BC77F47D58EE2
2 changed files with 18 additions and 35 deletions

View File

@ -1,24 +1,6 @@
#include <stdint.h> #include <stdint.h>
#include "params_runtime.h" #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) int xmss_parse_oid(uint32_t oid)
{ {
switch (oid) { switch (oid) {

View File

@ -7,23 +7,24 @@
#define XMSS_SHA2 0 #define XMSS_SHA2 0
#define XMSS_SHAKE 1 #define XMSS_SHAKE 1
extern unsigned int XMSS_FUNC; // These parameters can be used after calling xmss[mt]_parse_oid(oid).
extern unsigned int XMSS_N; unsigned int XMSS_FUNC;
extern unsigned int XMSS_WOTS_W; unsigned int XMSS_N;
extern unsigned int XMSS_WOTS_LOG_W; unsigned int XMSS_WOTS_W;
extern unsigned int XMSS_WOTS_LEN1; unsigned int XMSS_WOTS_LOG_W;
extern unsigned int XMSS_WOTS_LEN2; unsigned int XMSS_WOTS_LEN1;
extern unsigned int XMSS_WOTS_LEN; unsigned int XMSS_WOTS_LEN2;
extern unsigned int XMSS_WOTS_KEYSIZE; unsigned int XMSS_WOTS_LEN;
extern unsigned int XMSS_FULLHEIGHT; unsigned int XMSS_WOTS_KEYSIZE;
extern unsigned int XMSS_TREEHEIGHT; unsigned int XMSS_FULLHEIGHT;
extern unsigned int XMSS_D; unsigned int XMSS_TREEHEIGHT;
extern unsigned int XMSS_INDEX_LEN; unsigned int XMSS_D;
extern unsigned int XMSS_BYTES; unsigned int XMSS_INDEX_LEN;
extern unsigned int XMSS_PUBLICKEY_BYTES; unsigned int XMSS_BYTES;
extern unsigned int XMSS_PRIVATEKEY_BYTES; unsigned int XMSS_PUBLICKEY_BYTES;
extern unsigned int XMSS_OID_LEN; unsigned int XMSS_PRIVATEKEY_BYTES;
extern unsigned int XMSS_BDS_K; unsigned int XMSS_OID_LEN;
unsigned int XMSS_BDS_K;
int xmss_parse_oid(uint32_t oid); int xmss_parse_oid(uint32_t oid);
int xmssmt_parse_oid(uint32_t oid); int xmssmt_parse_oid(uint32_t oid);