Skip to content

Commit

Permalink
for first time disable aesenc for arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
Arm64 plaz committed Apr 24, 2018
1 parent d9b8731 commit 66de7ad
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile.linux
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ endif
ifeq ($(USE_AESNI),yes)
#check if AES-NI is supported by CPU
ifneq ($(shell $(GREP) -c aes /proc/cpuinfo),0)
CPU_FLAGS += -maes -DAESNI
machine := $(shell uname -m)
ifeq ($(machine), aarch64)
CXXFLAGS += -DARM64AES
else
CPU_FLAGS += -maes -DAESNI
endif
endif
endif

Expand Down
7 changes: 7 additions & 0 deletions libi2pd/Crypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,13 @@ namespace crypto

// AES
#ifdef AESNI
#ifdef ARM64AES
void init_aesenc(void) __attribute__((constructor)){

}

#endif

#define KeyExpansion256(round0,round1) \
"pshufd $0xff, %%xmm2, %%xmm2 \n" \
"movaps %%xmm1, %%xmm4 \n" \
Expand Down
3 changes: 3 additions & 0 deletions libi2pd/Crypto.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ namespace crypto


#ifdef AESNI
#ifdef ARM64AES
void init_aesenc(void) __attribute__((constructor));
#endif
class ECBCryptoAESNI
{
public:
Expand Down

0 comments on commit 66de7ad

Please sign in to comment.