Skip to content

Commit

Permalink
Fix Haraka and Shake context usage
Browse files Browse the repository at this point in the history
  • Loading branch information
thomwiggers committed Nov 24, 2022
1 parent 357af50 commit bafee15
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 4 deletions.
4 changes: 2 additions & 2 deletions haraka-aesni/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ CC = /usr/bin/gcc
CFLAGS = -Wall -Wextra -Wpedantic -Wmissing-prototypes -O3 -std=c99 -march=native -fomit-frame-pointer -flto -DPARAMS=$(PARAMS) $(EXTRA_CFLAGS)


SOURCES = hash_haraka.c hash_harakax4.c thash_haraka_$(THASH).c thash_haraka_$(THASH)x4.c address.c randombytes.c merkle.c wots.c utils.c utilsx4.c fors.c sign.c haraka.c
HEADERS = params.h hash.h hashx4.h thash.h thashx4.h address.h randombytes.h merkle.c wots.h utils.h utilsx4.h fors.h api.h haraka.h harakax4.h
SOURCES = hash_haraka.c hash_harakax4.c thash_haraka_$(THASH).c thash_haraka_$(THASH)x4.c address.c randombytes.c merkle.c wots.c utils.c utilsx4.c fors.c sign.c haraka.c context_haraka.c
HEADERS = params.h hash.h hashx4.h thash.h thashx4.h address.h randombytes.h merkle.c wots.h utils.h utilsx4.h fors.h api.h haraka.h harakax4.h context.h

DET_SOURCES = $(SOURCES:randombytes.%=rng.%)
DET_HEADERS = $(HEADERS:randombytes.%=rng.%)
Expand Down
6 changes: 6 additions & 0 deletions haraka-aesni/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ typedef struct {
__m128i rc[40];
} spx_ctx;

#define initialize_hash_function SPX_NAMESPACE(initialize_hash_function)
void initialize_hash_function(spx_ctx *ctx);

#define free_hash_function SPX_NAMESPACE(free_hash_function)
void free_hash_function(spx_ctx *ctx);

#endif
1 change: 1 addition & 0 deletions haraka-aesni/context_haraka.c
4 changes: 2 additions & 2 deletions shake-avx2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ THASH = robust
CC = /usr/bin/gcc
CFLAGS = -Wall -Wextra -Wpedantic -Wmissing-prototypes -O3 -std=c99 -march=native -fomit-frame-pointer -flto -DPARAMS=$(PARAMS) $(EXTRA_CFLAGS)

SOURCES = hash_shake.c hash_shakex4.c thash_shake_$(THASH).c thash_shake_$(THASH)x4.c address.c randombytes.c merkle.c wots.c utils.c utilsx4.c fors.c sign.c fips202.c fips202x4.c keccak4x/KeccakP-1600-times4-SIMD256.o
HEADERS = params.h hash.h hashx4.h thash.h thashx4.h address.h randombytes.h merkle.h wots.h utils.h utilsx4.h fors.h api.h fips202.h fips202x4.h
SOURCES = hash_shake.c hash_shakex4.c thash_shake_$(THASH).c thash_shake_$(THASH)x4.c address.c randombytes.c merkle.c wots.c utils.c utilsx4.c fors.c sign.c fips202.c fips202x4.c context_shake.c keccak4x/KeccakP-1600-times4-SIMD256.o
HEADERS = params.h hash.h hashx4.h thash.h thashx4.h address.h randombytes.h merkle.h wots.h utils.h utilsx4.h fors.h api.h fips202.h fips202x4.h context.h

DET_SOURCES = $(SOURCES:randombytes.%=rng.%)
DET_HEADERS = $(HEADERS:randombytes.%=rng.%)
Expand Down
6 changes: 6 additions & 0 deletions shake-avx2/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,10 @@ typedef struct {
uint8_t sk_seed[SPX_N];
} spx_ctx;

#define initialize_hash_function SPX_NAMESPACE(initialize_hash_function)
void initialize_hash_function(spx_ctx *ctx);

#define free_hash_function SPX_NAMESPACE(free_hash_function)
void free_hash_function(spx_ctx *ctx);

#endif
1 change: 1 addition & 0 deletions shake-avx2/context_shake.c

0 comments on commit bafee15

Please sign in to comment.