Example for xmss hooks support: update patch and build.
parent
5b401de7d2
commit
87df7747da
File diff suppressed because it is too large
Load Diff
|
|
@ -10,6 +10,7 @@ LIBS = -L$(LIB_PATH)/lib -lm
|
|||
WOLF_DYN_LIB = -lwolfssl
|
||||
WOLF_STATIC_LIB = $(LIB_PATH)/lib/libwolfssl.a
|
||||
HSS_LIB =
|
||||
XMSS_LIB =
|
||||
DEBUG_FLAGS = -g -DDEBUG
|
||||
DEBUG_INC_PATHS = -MD
|
||||
OPTIMIZE = -Os
|
||||
|
|
@ -34,10 +35,10 @@ lms_example: lms_example.c
|
|||
$(CC) -o $@ $< $(CFLAGS) -I$(HSS_INC) $(LIBS) $(WOLF_STATIC_LIB) $(HSS_LIB)
|
||||
|
||||
xmss_example: xmss_example.c
|
||||
$(CC) -o $@ $< $(CFLAGS) -I$(XMSS_INC) $(LIBS) $(WOLF_DYN_LIB)
|
||||
$(CC) -o $@ $< $(CFLAGS) -I$(XMSS_INC) $(LIBS) $(WOLF_STATIC_LIB) $(XMSS_LIB)
|
||||
|
||||
xmss_example_verifyonly: xmss_example.c
|
||||
$(CC) -o $@ $< $(CFLAGS) -I$(XMSS_INC) -DWOLFSSL_XMSS_VERIFY_ONLY $(LIBS) $(WOLF_DYN_LIB)
|
||||
$(CC) -o $@ $< $(CFLAGS) -I$(XMSS_INC) -DWOLFSSL_XMSS_VERIFY_ONLY $(LIBS) $(WOLF_STATIC_LIB) $(XMSS_LIB)
|
||||
|
||||
clean:
|
||||
rm -f $(TARGETS)
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ in the wolfSSL repo's INSTALL file.
|
|||
https://github.com/wolfSSL/wolfssl/blob/master/INSTALL
|
||||
|
||||
The XMSS/XMSS^MT example requires that the xmss-reference repository has been
|
||||
cloned and patched. Please see item 20 in the wolfSSL repo's INSTALL file.
|
||||
cloned, patched, and built. Please see item 20 in the wolfSSL repo's INSTALL file.
|
||||
|
||||
The patch to use is `0001-Patch-to-support-xmss-reference-integration.patch` from this XMSS/XMSS^MT example.
|
||||
The patch to use is `0001-Patch-to-support-wolfSSL-xmss-reference-integration.patch` from this XMSS/XMSS^MT example.
|
||||
|
||||
# Building the LMS/HSS example
|
||||
|
||||
|
|
@ -84,22 +84,11 @@ Configure the Makefile to point to your xmss install:
|
|||
XMSS_INC = <path to patched xmss install>
|
||||
```
|
||||
|
||||
Nothing more is needed after patching, as wolfSSL will automatically
|
||||
build and link the xmss-reference objects it needs.
|
||||
|
||||
Build wolfSSL XMSS/XMSS^MT hooks support with:
|
||||
|
||||
```
|
||||
$ ./configure \
|
||||
--enable-xmss \
|
||||
--with-libxmss=<path to xmss src dir>
|
||||
$ make
|
||||
XMSS_LIB = <path to xmss_lib.a or xmss_verify_lib.a>
|
||||
```
|
||||
|
||||
Note that depending on your architecture you may add `--enable-intelasm`
|
||||
or `--enable-armasm` to speedup the XMSS/XMSS^MT hash operations.
|
||||
|
||||
Asumming wolfSSL has been built, you may finally build the xmss example with:
|
||||
Then build:
|
||||
|
||||
```
|
||||
$ make xmss_example
|
||||
|
|
@ -110,7 +99,6 @@ Build the verify-only example with
|
|||
$ make xmss_example_verifyonly
|
||||
```
|
||||
|
||||
|
||||
## Signing and Verifying a Message with XMSS/XMSS^MT
|
||||
|
||||
To see the help and usage, run the program without options:
|
||||
|
|
|
|||
|
|
@ -271,6 +271,8 @@ do_xmss_example(const char * params,
|
|||
goto exit_xmss_example;
|
||||
}
|
||||
|
||||
printf("making key with %s parameters...\n", params);
|
||||
|
||||
ret = wc_XmssKey_MakeKey(&signingKey, &rng);
|
||||
if (ret) {
|
||||
fprintf(stderr, "error: wc_XmssKey_MakeKey returned %d\n", ret);
|
||||
|
|
|
|||
Loading…
Reference in New Issue