You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 vuotta sitten
5 kuukautta sitten
5 kuukautta sitten
9 vuotta sitten
9 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
7 vuotta sitten
5 kuukautta sitten
7 vuotta sitten
5 kuukautta sitten
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. CC = /usr/bin/gcc
  2. CFLAGS = -Wall -ggdb -O3 -Wextra -Wpedantic -L/usr/lib/ -I/usr/include/json-c
  3. LDLIBS = -lcrypto -ljson-c
  4. SOURCES = params.c hash.c fips202.c hash_address.c randombytes.c wots.c xmss.c xmss_core.c xmss_commons.c utils.c
  5. HEADERS = params.h hash.h fips202.h hash_address.h randombytes.h wots.h xmss.h xmss_core.h xmss_commons.h utils.h
  6. SOURCES_FAST = $(subst xmss_core.c,xmss_core_fast.c,$(SOURCES))
  7. HEADERS_FAST = $(subst xmss_core.c,xmss_core_fast.c,$(HEADERS))
  8. TESTS = test/wots \
  9. test/oid \
  10. test/speed \
  11. test/xmss_determinism \
  12. test/xmss \
  13. test/xmss_fast \
  14. test/xmssmt \
  15. test/xmssmt_fast \
  16. test/maxsigsxmss \
  17. test/maxsigsxmssmt \
  18. UI = ui/xmss_keypair \
  19. ui/xmss_sign \
  20. ui/xmss_open \
  21. ui/xmssmt_keypair \
  22. ui/xmssmt_sign \
  23. ui/xmssmt_open \
  24. ui/xmss_keypair_fast \
  25. ui/xmss_sign_fast \
  26. ui/xmss_open_fast \
  27. ui/xmssmt_keypair_fast \
  28. ui/xmssmt_sign_fast \
  29. ui/xmssmt_open_fast \
  30. all: tests ui
  31. tests: $(TESTS)
  32. ui: $(UI)
  33. test: $(TESTS:=.exec)
  34. .PHONY: clean test
  35. test/%.exec: test/%
  36. @$<
  37. test/xmss_fast: test/xmss.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  38. $(CC) -DXMSS_SIGNATURES=1024 $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  39. test/xmss: test/xmss.c $(SOURCES) $(OBJS) $(HEADERS)
  40. $(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  41. test/xmssmt_fast: test/xmss.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  42. $(CC) -DXMSSMT -DXMSS_SIGNATURES=1024 $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  43. test/xmssmt: test/xmss.c $(SOURCES) $(OBJS) $(HEADERS)
  44. $(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  45. test/speed: test/speed.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  46. $(CC) -DXMSSMT -DXMSS_VARIANT=\"XMSSMT-SHA2_20/2_256\" $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  47. test/vectors: test/vectors.c $(SOURCES) $(OBJS) $(HEADERS)
  48. $(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  49. test/acvpkat: test/acvpkat.c $(SOURCES) $(OBJS) $(HEADERS)
  50. $(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  51. test/maxsigsxmss: test/xmss_max_signatures.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  52. $(CC) $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  53. test/maxsigsxmssmt: test/xmss_max_signatures.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  54. $(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  55. test/%: test/%.c $(SOURCES) $(OBJS) $(HEADERS)
  56. $(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  57. ui/xmss_%_fast: ui/%.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  58. $(CC) $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  59. ui/xmssmt_%_fast: ui/%.c $(SOURCES_FAST) $(OBJS) $(HEADERS_FAST)
  60. $(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES_FAST) $< $(LDLIBS)
  61. ui/xmss_%: ui/%.c $(SOURCES) $(OBJS) $(HEADERS)
  62. $(CC) $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  63. ui/xmssmt_%: ui/%.c $(SOURCES) $(OBJS) $(HEADERS)
  64. $(CC) -DXMSSMT $(CFLAGS) -o $@ $(SOURCES) $< $(LDLIBS)
  65. clean:
  66. -$(RM) $(TESTS)
  67. -$(RM) test/vectors
  68. -$(RM) test/acvpkat
  69. -$(RM) $(UI)