Skip to content

Commit e93fc7f

Browse files
authored
fix SP_C64/C32 option (#2)
1 parent 75264e9 commit e93fc7f

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

embedded/signature/ecc-sign-verify/Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ OBJ_SP_C32 := \
1919
$(WOLFROOT)/wolfcrypt/src/sp_int.o\
2020
$(WOLFROOT)/wolfcrypt/src/sp_c32.o\
2121

22+
OBJ_SP_C64 := \
23+
$(WOLFROOT)/wolfcrypt/src/sp_int.o\
24+
$(WOLFROOT)/wolfcrypt/src/sp_c64.o\
25+
2226
OBJ_SP_ARM64 := \
2327
$(WOLFROOT)/wolfcrypt/src/sp_int.o\
2428
$(WOLFROOT)/wolfcrypt/src/sp_arm64.o\
@@ -41,12 +45,18 @@ OBJ += $(OBJ_SP_X86_64)
4145
else ifeq ($(math) $(arch),sp arm64)
4246
CFLAGS += -DSP_ARM64_FLAG
4347
OBJ += $(OBJ_SP_ARM64)
48+
else ifeq ($(math) $(arch),sp c64)
49+
CFLAGS += -DSP_C64_FLAG
50+
OBJ += $(OBJ_SP_C64)
51+
else ifeq ($(math) $(arch),sp c32)
52+
CFLAGS += -DSP_C32_FLAG
53+
OBJ += $(OBJ_SP_C32)
4454
else ifeq ($(math), tfm)
4555
CFLAGS += -DTFM_FLAG
4656
OBJ += $(OBJ_TFM)
4757
else
4858
CFLAGS += -DSP_FLAG
49-
OBJ += $(OBJ_SP_C32)
59+
OBJ += $(OBJ_SP_C64)
5060
endif
5161

5262
all : ecc_sign_verify bench
@@ -63,4 +73,4 @@ clean:
6373
rm -f ecc_sign_verify bench $(WOLFROOT)/wolfcrypt/src/*.o
6474

6575
size :
66-
size $(OBJ)
76+
size $(OBJ) ecc_sign_verify

embedded/signature/ecc-sign-verify/user_settings.h

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,25 @@
3737

3838
#ifdef SP_FLAG
3939
#define WOLFSSL_HAVE_SP_ECC
40-
#define WOLFSSL_SP_MATH_ALL
40+
#define WOLFSSL_SP_MATH
4141
#undef USE_FAST_MATH
4242
#endif
4343

44+
#if defined(SP_C32_FLAG)
45+
#define WOLFSSL_HAVE_SP_ECC
46+
#define WOLFSSL_SP_MATH
47+
#define WOLFSSL_SP_MATH_ALL
48+
#undef USE_FAST_MATH
49+
#endif
50+
51+
#if defined(SP_C64_FLAG)
52+
#define WOLFSSL_HAVE_SP_ECC
53+
#define WOLFSSL_SP_MATH
54+
#define WOLFSSL_SP_MATH_ALL
55+
#define SP_WORD_SIZE 64
56+
#undef USE_FAST_MATH
57+
#endif
58+
4459
#ifdef SP_ARM64_FLAG
4560
#define WOLFSSL_HAVE_SP_ECC
4661
#define WOLFSSL_SP_MATH_ALL

0 commit comments

Comments
 (0)