Skip to content

Commit a6d82db

Browse files
aurel32galak
authored andcommitted
ext: lib: crypto: Extend generic mbedTLS config with HAVE_ASM
Extend generic mbedTLS configuration file with MBEDTLS_HAVE_ASM option, to allow the use of assembly code. This improves the performances of asymetric cryptography, however depending on the architecture and the CPU, this might have an impact on the code size. Set the default value ot the previous non-configurable value, ie enable it by default except on ARM. Signed-off-by: Aurelien Jarno <[email protected]>
1 parent 2a1c94c commit a6d82db

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

ext/lib/crypto/mbedtls/Kconfig.tls-generic

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,14 @@ config MBEDTLS_PEM_CERTIFICATE_FORMAT
271271
By default only DER (binary) format of certificates is supported. Enable
272272
this option to enable support for PEM format.
273273

274+
config MBEDTLS_HAVE_ASM
275+
bool "Enable use of assembly code"
276+
default y if !ARM
277+
help
278+
Enable use of assembly code in mbedTLS. This improves the performances
279+
of asymetric cryptography, however this might have an impact on the
280+
code size.
281+
274282
config MBEDTLS_USER_CONFIG_ENABLE
275283
bool "Enable user mbedTLS config file"
276284
help

ext/lib/crypto/mbedtls/configs/config-tls-generic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define MBEDTLS_PLATFORM_PRINTF_ALT
2323
#define MBEDTLS_PLATFORM_SNPRINTF_ALT
2424

25-
#if !defined(CONFIG_ARM)
25+
#if defined(CONFIG_MBEDTLS_HAVE_ASM)
2626
#define MBEDTLS_HAVE_ASM
2727
#endif
2828

0 commit comments

Comments
 (0)