1cba1e7be8
This ensures that xmss_core and xmss_core_fast offer the same API. Note that xmss_core_fast still needs a major refactor, and this wrapper is not exactly very clean. There is a considerable chance this refactor will change the format of the state in the secret key.
73 lines
1.9 KiB
Makefile
73 lines
1.9 KiB
Makefile
CC = /usr/bin/gcc
|
|
CFLAGS = -Wall -g -O3 -Wextra -Wpedantic
|
|
LDLIBS = -lcrypto
|
|
|
|
SOURCES = params.c hash.c fips202.c hash_address.c randombytes.c wots.c xmss.c xmss_core.c xmss_commons.c
|
|
HEADERS = params.h hash.h fips202.h hash_address.h randombytes.h wots.h xmss.h xmss_core.h xmss_commons.h
|
|
|
|
SOURCES_FAST = $(subst xmss_core.c,xmss_core_fast.c,$(SOURCES))
|
|
HEADERS_FAST = $(subst xmss_core.c,xmss_core_fast.c,$(HEADERS))
|
|
|
|
TESTS = test/wots \
|
|
test/xmss_determinism \
|
|
test/xmss \
|
|
test/xmss_fast \
|
|
test/xmssmt \
|
|
test/xmssmt_fast \
|
|
|
|
UI = ui/xmss_keypair \
|
|
ui/xmss_sign \
|
|
ui/xmss_open \
|
|
ui/xmssmt_keypair \
|
|
ui/xmssmt_sign \
|
|
ui/xmssmt_open \
|
|
ui/xmss_keypair_fast \
|
|
ui/xmss_sign_fast \
|
|
ui/xmss_open_fast \
|
|
ui/xmssmt_keypair_fast \
|
|
ui/xmssmt_sign_fast \
|
|
ui/xmssmt_open_fast \
|
|
|
|
all: tests ui
|
|
|
|
tests: $(TESTS)
|
|
ui: $(UI)
|
|
|
|
test: $(TESTS:=.exec)
|
|
|
|
.PHONY: clean test
|
|
|
|
test/%.exec: test/%
|
|
@$<
|
|
|
|
test/xmss_fast: test/xmss.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
|
|
$(CC) $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
|
|
|
|
test/xmss: test/xmss.c $(SOURCES) $(OBJS) $(HEADERS)
|
|
$(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
|
|
|
|
test/xmssmt_fast: test/xmss.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
|
|
$(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
|
|
|
|
test/xmssmt: test/xmss.c $(SOURCES) $(OBJS) $(HEADERS)
|
|
$(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
|
|
|
|
test/%: test/%.c $(SOURCES) $(OBJS) $(HEADERS)
|
|
$(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
|
|
|
|
ui/xmss_%_fast: ui/%.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
|
|
$(CC) $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
|
|
|
|
ui/xmssmt_%_fast: ui/%.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
|
|
$(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
|
|
|
|
ui/xmss_%: ui/%.c $(SOURCES) $(OBJS) $(HEADERS)
|
|
$(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
|
|
|
|
ui/xmssmt_%: ui/%.c $(SOURCES) $(OBJS) $(HEADERS)
|
|
$(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
|
|
|
|
clean:
|
|
-$(RM) $(TESTS)
|
|
-$(RM) $(UI)
|