Skip to content

Commit

Permalink
Revert "build tomcrypt sha256 code as separate object"
Browse files Browse the repository at this point in the history
This reverts commit e552d93.

Usign GCC version 5.4.0 20160609 the code was 3 times slower (probably due to missing inlining and other optimizations). The binary was also >15kB bigger.
  • Loading branch information
wiire-a committed Jan 3, 2018
1 parent 8cce176 commit 1ddc765
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ TARGET = pixiewps
include $(SRCDIR)/crypto/tfm/sources.mak
TFMSRC = $(patsubst ./%,$(SRCDIR)/crypto/tfm/%,$(TFM_SRCS))
TFMOBJS = $(TFMSRC:.c=.o)
TC_SRCS = ./aes_cbc.c ./aes.c ./sha256.c
TC_SRCS = ./aes_cbc.c ./aes.c
TCSRC = $(patsubst ./%,$(SRCDIR)/crypto/tc/%,$(TC_SRCS))
TCOBJS = $(TCSRC:.c=.o)

Expand Down
2 changes: 1 addition & 1 deletion src/crypto/hmac_sha256.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifdef USE_OPENSSL
# include <openssl/sha.h>
#else
# include "tc/tomcrypt.h"
# include "tc/sha256.c"
# define SHA256_CTX hash_state
# define SHA256_Init(x) do { sha256_init(x); } while(0)
# define SHA256_Update(x, y, z) sha256_process(x, y, z)
Expand Down

0 comments on commit 1ddc765

Please sign in to comment.