1
0

Add accidentally omitted params.h

Previously this was generated and thus gitignored
Esse commit está contido em:
Joost Rijneveld 2017-10-16 15:15:56 +02:00
commit 1a7df37f59
Nenhuma chave conhecida encontrada para esta assinatura no banco de dados
ID da chave GPG: A4FE39CF49CBC553
3 arquivos alterados com 36 adições e 11 exclusões

3
.gitignore externo
Ver arquivo

@ -13,6 +13,3 @@ test/test_xmssmt_core_XMSSMT*
test/test_xmssmt_core_fast_XMSSMT*
test/speed
test/gen_testvectors
params_XMSS_*.h
params_XMSSMT_*.h
params.h

Ver arquivo

@ -10,10 +10,6 @@ test/test_xmssmt_core \
test/test_xmssmt
.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
$(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_fast
-rm test/test_xmssmt
distclean: clean
-rm params.h
-rm params_XMSS*.h

36
params.h Arquivo normal
Ver arquivo

@ -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