[Cryptech-Commits] [sw/stm32] branch master updated: Tell libtfm that the ARM is little-endian, so it can optimize fp_read_unsigned_bin().

git at cryptech.is git at cryptech.is
Wed Dec 5 20:05:29 UTC 2018


This is an automated email from the git hooks/post-receive script.

paul at psgd.org pushed a commit to branch master
in repository sw/stm32.

The following commit(s) were added to refs/heads/master by this push:
     new a89dcb2  Tell libtfm that the ARM is little-endian, so it can optimize fp_read_unsigned_bin().
a89dcb2 is described below

commit a89dcb22ca549ae17742a8ee3c08f2d7fd606771
Author: Paul Selkirk <paul at psgd.org>
AuthorDate: Wed Dec 5 14:40:16 2018 -0500

    Tell libtfm that the ARM is little-endian, so it can optimize fp_read_unsigned_bin().
    
    This enables some overflow-detection code, which fixes CT-01-009.
    
    It also saves 484us/call, which adds up to 6.3ms/RSA signature.
---
 libraries/libtfm/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libraries/libtfm/Makefile b/libraries/libtfm/Makefile
index b50421c..359729b 100644
--- a/libraries/libtfm/Makefile
+++ b/libraries/libtfm/Makefile
@@ -38,7 +38,7 @@ STM32_LIBTFM_CFLAGS_OPTIMIZATION := -O3 -funroll-loops -fomit-frame-pointer
 endif
 
 CFLAGS := $(subst ${STM32_CFLAGS_OPTIMIZATION},${STM32_LIBTFM_CFLAGS_OPTIMIZATION},${CFLAGS})
-CFLAGS += -DTFM_ARM -Dasm=__asm__ -Wa,-mimplicit-it=thumb
+CFLAGS += -DTFM_ARM -DENDIAN_LITTLE -Dasm=__asm__ -Wa,-mimplicit-it=thumb
 CFLAGS += -I${LIBTFM_SRC}/tomsfastmath/src/headers
 CFLAGS += -DFP_MAX_SIZE="(${BITS}*2+(8*DIGIT_BIT))"
 CFLAGS += -Wall -W -Wshadow -Wno-uninitialized

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Commits mailing list