Skip to content

Commit ab5ead8

Browse files
committed
Introduce LTC_NO_ACCEL.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent 3de9337 commit ab5ead8

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

appveyor.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@ build_script:
3131
cp test.exe test-stock.exe
3232
cp timing.exe timing-stock.exe
3333
nmake -f makefile.msvc clean
34-
nmake -f makefile.msvc all CFLAGS="/Ox /DUSE_LTM /DLTM_DESC /DLTC_NO_AES_NI /I../libtommath"
34+
nmake -f makefile.msvc all CFLAGS="/Ox /DUSE_LTM /DLTM_DESC /DLTC_NO_ACCEL /I../libtommath"
3535
test_script:
3636
- cmd: >-
3737
test-stock.exe
38-
test.exe
39-
timing-stock.exe cipher_ecb
40-
timing.exe cipher_ecb
38+
test.exe
39+
timing-stock.exe cipher_ecb aes
40+
timing.exe cipher_ecb aes
41+
timing-stock.exe hash sha
42+
timing.exe hash sha

src/headers/tomcrypt_cfg.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,14 +243,22 @@ typedef unsigned long ltc_mp_digit;
243243
#undef ENDIAN_32BITWORD
244244
#undef ENDIAN_64BITWORD
245245
#undef LTC_FAST
246-
#define LTC_NO_AES_NI
246+
#define LTC_NO_ACCEL
247247
#define LTC_NO_BSWAP
248248
#define LTC_NO_CLZL
249249
#define LTC_NO_CTZL
250250
#define LTC_NO_ROLC
251251
#define LTC_NO_ROTATE
252+
#endif
253+
254+
/* Just portable C implementations */
255+
#ifdef LTC_NO_ACCEL
256+
#define LTC_NO_AES_NI
252257
#define LTC_NO_GCM_PCLMUL
253258
#define LTC_NO_GCM_PMULL
259+
#define LTC_NO_SHA1_X86
260+
#define LTC_NO_SHA224_X86
261+
#define LTC_NO_SHA256_X86
254262
#endif
255263

256264
/* No LTC_FAST if: explicitly disabled OR non-gcc/non-clang compiler OR old gcc OR using -ansi -std=c99 */

0 commit comments

Comments
 (0)