Add accidentally omitted params.h
Previously this was generated and thus gitignored
This commit is contained in:
parent
6a8571d880
commit
1a7df37f59
3
.gitignore
vendored
3
.gitignore
vendored
@ -13,6 +13,3 @@ test/test_xmssmt_core_XMSSMT*
|
|||||||
test/test_xmssmt_core_fast_XMSSMT*
|
test/test_xmssmt_core_fast_XMSSMT*
|
||||||
test/speed
|
test/speed
|
||||||
test/gen_testvectors
|
test/gen_testvectors
|
||||||
params_XMSS_*.h
|
|
||||||
params_XMSSMT_*.h
|
|
||||||
params.h
|
|
||||||
|
8
Makefile
8
Makefile
@ -10,10 +10,6 @@ test/test_xmssmt_core \
|
|||||||
test/test_xmssmt
|
test/test_xmssmt
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
.PRECIOUS: params_%.h
|
|
||||||
|
|
||||||
params_%.h: params.h.py
|
|
||||||
python3 params.h.py $(patsubst params_%.h,%,$@) > $@
|
|
||||||
|
|
||||||
test/test_wots: params.c hash.c fips202.c hash_address.c randombytes.c wots.c xmss_commons.c test/test_wots.c params.h hash.h fips202.h hash_address.h randombytes.h wots.h xmss_commons.h
|
test/test_wots: params.c hash.c fips202.c hash_address.c randombytes.c wots.c xmss_commons.c test/test_wots.c params.h hash.h fips202.h hash_address.h randombytes.h wots.h xmss_commons.h
|
||||||
$(CC) $(CFLAGS) params.c hash.c fips202.c hash_address.c randombytes.c wots.c xmss_commons.c test/test_wots.c -o $@ -lcrypto -lm
|
$(CC) $(CFLAGS) params.c hash.c fips202.c hash_address.c randombytes.c wots.c xmss_commons.c test/test_wots.c -o $@ -lcrypto -lm
|
||||||
@ -44,7 +40,3 @@ clean:
|
|||||||
-rm test/test_xmssmt_core
|
-rm test/test_xmssmt_core
|
||||||
-rm test/test_xmssmt_core_fast
|
-rm test/test_xmssmt_core_fast
|
||||||
-rm test/test_xmssmt
|
-rm test/test_xmssmt
|
||||||
|
|
||||||
distclean: clean
|
|
||||||
-rm params.h
|
|
||||||
-rm params_XMSS*.h
|
|
36
params.h
Normal file
36
params.h
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#ifndef PARAMS_H
|
||||||
|
#define PARAMS_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
// These are merely internal identifiers for the supported hash functions
|
||||||
|
#define XMSS_SHA2 0
|
||||||
|
#define XMSS_SHAKE 1
|
||||||
|
|
||||||
|
// This is a consequence of the OID definitions in the draft, used for parsing
|
||||||
|
#define XMSS_OID_LEN 4
|
||||||
|
|
||||||
|
// This structure will be populated when calling xmss[mt]_parse_oid
|
||||||
|
typedef struct {
|
||||||
|
unsigned int func;
|
||||||
|
unsigned int n;
|
||||||
|
unsigned int wots_w;
|
||||||
|
unsigned int wots_log_w;
|
||||||
|
unsigned int wots_len1;
|
||||||
|
unsigned int wots_len2;
|
||||||
|
unsigned int wots_len;
|
||||||
|
unsigned int wots_keysize;
|
||||||
|
unsigned int full_height;
|
||||||
|
unsigned int tree_height;
|
||||||
|
unsigned int d;
|
||||||
|
unsigned int index_len;
|
||||||
|
unsigned int bytes;
|
||||||
|
unsigned int publickey_bytes;
|
||||||
|
unsigned int privatekey_bytes;
|
||||||
|
unsigned int bds_k;
|
||||||
|
} xmss_params;
|
||||||
|
|
||||||
|
int xmss_parse_oid(xmss_params *params, const uint32_t oid);
|
||||||
|
int xmssmt_parse_oid(xmss_params *params, const uint32_t oid);
|
||||||
|
|
||||||
|
#endif
|
Loading…
Reference in New Issue
Block a user