Add ability to use a statically generated ecmult context.
This vastly shrinks the size of the context required for signing on devices with memory-mapped Flash. Tables are generated by the new gen_context tool into a header.
This commit is contained in:
18
Makefile.am
18
Makefile.am
@@ -74,4 +74,22 @@ tests_LDFLAGS = -static
|
||||
TESTS = tests
|
||||
endif
|
||||
|
||||
if USE_ECMULT_STATIC_PRECOMPUTATION
|
||||
CPPFLAGS_FOR_BUILD +=-I.
|
||||
CFLAGS_FOR_BUILD += -Wall -Wextra -Wno-unused-function
|
||||
|
||||
gen_context_OBJECTS = gen_context.o
|
||||
|
||||
gen_%.o: src/gen_%.c
|
||||
$(CC_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD) -c $< -o $@
|
||||
|
||||
gen_context$(BUILD_EXEEXT): $(gen_context_OBJECTS)
|
||||
$(CC_FOR_BUILD) $^ -o $@
|
||||
|
||||
BUILT_SOURCES = src/ecmult_static_context.h
|
||||
|
||||
src/ecmult_static_context.h: gen_context
|
||||
./gen_context
|
||||
endif
|
||||
|
||||
EXTRA_DIST = autogen.sh
|
||||
|
||||
Reference in New Issue
Block a user