Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable hw acc in wolfssl #7

Open
wants to merge 2 commits into
base: WolfSSL-Update
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ task runMurax(type: JavaExec) {
task runHSMSim(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
main = "ap5.HSMSim"
args "--ram 512,512 --mulacc --spi --init out/main.bin".split()
args "--ram 512,512 --mulacc --spi --aes --init out/main.bin".split()
}

task runVec(type: JavaExec) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/c/hsm/makefile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ OBJS := $(addprefix $(OBJDIR)/,$(OBJS))


fetch:
git clone --recursive https://github.com/microsoft/ms-tpm-20-ref.git mstpm || true
git clone --recursive https://github.com/ben01100001/ms-tpm-20-ref.git mstpm || true

all: $(OBJDIR)/$(PROJ_NAME).elf $(OBJDIR)/$(PROJ_NAME).bin
mkdir -p ../../../../out
Expand Down
10 changes: 7 additions & 3 deletions src/main/c/hsm/tpm.mk
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -167,22 +167,25 @@ CFLAGS+=-DWOLF_SHA384
CFLAGS+=-DWOLFSSL_SHA384
#CFLAGS+=-DLITTLE_ENDIAN_ORDER
CFLAGS+=-DWOLFSSL_USER_SETTINGS
#CFLAGS+=-DUSE_FAST_MATH
CFLAGS+=-DUSE_FAST_MATH
#CFLAGS+=-DHAVE_CONFIG
#CFLAGS+=-DHAVE_FIPS

#CFLAGS+=-DECC_SHAMIR
CFLAGS+=-DWOLFSSL_AES_NO_UNROLL
#CFLAGS+=-DLIB_EXPORT= -include stdint.h -DINT32=int32_t -DBYTE=uint8_t
CFLAGS+=-DSELF_TEST=NO -DLIBRARY_COMPATIBILITY_CHECK=NO
#CFLAGS+=-DHAVE_WOLF_BIGINT
CFLAGS+=-DHAVE_WOLF_BIGINT
CFLAGS+= -DUSE_FAST_MATH
CFLAGS += -DSINGLE_THREADED
CFLAGS += -DNO_WOLFSSL_CLIENT
CFLAGS += -DNO_WOLFSSL_SERVER
#CFLAGS += -DOPENSSL_EXTRA
CFLAGS += -DNO_FILESYSTEM
CFLAGS += -DWOLFSSL_AES_DIRECT
CFLAGS += -DAES_128=1
CFLAGS += -DAES_192=0
CFLAGS += -DAES_256=0
#CFLAGS += -DWOLFSSL_USER_SETTINGS
CFLAGS += -DSTRING_USER
#CFLAGS += -DCTYPE_USER
Expand All @@ -195,6 +198,8 @@ CFLAGS += -DTABLE_DRIVEN_DISPATCH=NO
# -DALG_ECDH=ALG_NO -DALG_ECDSA=ALG_NO
CFLAGS += -Wno-unused-function
CFLAGS += -DNO_INLINE
CFLAGS += -DVE_HEP_AES
CFLAGS += -DVE_HEP_MUL
CFLAGS += -DWOLFSSL_NO_MEMORY


Expand Down Expand Up @@ -317,4 +322,3 @@ CFLAGS+=-DCC_Unseal=CC_NO
CFLAGS+=-DCC_Vendor_TCG_Test=CC_NO
CFLAGS+=-DCC_VerifySignature=CC_NO
CFLAGS+=-DCC_ZGen_2Phase=CC_NO