This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 518e455dc add macro for ecc
518e455dc is described below
commit 518e455dceef7c0c67ff8ec108f5d99458b48206
Author: Lingao Meng <[email protected]>
AuthorDate: Wed Aug 23 11:43:26 2023 +0800
add macro for ecc
application may use micro-ecc for some ecc operation, which may be
faster than tinycrypt, due to assamble code, but both of them have
same function defination, cause build error on there case.
Signed-off-by: Lingao Meng <[email protected]>
---
crypto/tinycrypt/Kconfig | 6 ++++++
crypto/tinycrypt/Makefile | 3 +++
2 files changed, 9 insertions(+)
diff --git a/crypto/tinycrypt/Kconfig b/crypto/tinycrypt/Kconfig
index 155a40214..bfec69d64 100644
--- a/crypto/tinycrypt/Kconfig
+++ b/crypto/tinycrypt/Kconfig
@@ -43,9 +43,14 @@ config TINYCRYPT_SHA256_HMAC_PRNG
This option enables support for pseudo-random number
generator.
+config TINYCRYPT_ECC
+ bool
+ default n
+
config TINYCRYPT_ECC_DH
bool "ECC_DH anonymous key agreement protocol"
default n
+ select TINYCRYPT_ECC
---help---
This option enables support for the Elliptic curve
Diffie-Hellman anonymous key agreement protocol.
@@ -56,6 +61,7 @@ config TINYCRYPT_ECC_DH
config TINYCRYPT_ECC_DSA
bool "ECC_DSA digital signature algorithm"
default n
+ select TINYCRYPT_ECC
---help---
This option enables support for the Elliptic Curve Digital
Signature Algorithm (ECDSA).
diff --git a/crypto/tinycrypt/Makefile b/crypto/tinycrypt/Makefile
index c0a58f4f8..2faba8219 100644
--- a/crypto/tinycrypt/Makefile
+++ b/crypto/tinycrypt/Makefile
@@ -47,8 +47,11 @@ distclean::
endif
CSRCS += tinycrypt/lib/source/utils.c
+
+ifeq ($(CONFIG_TINYCRYPT_ECC),y)
CSRCS += tinycrypt/lib/source/ecc.c
CSRCS += tinycrypt/lib/source/ecc_platform_specific.c
+endif
ifeq ($(CONFIG_TINYCRYPT_ECC_DH),y)
CSRCS += tinycrypt/lib/source/ecc_dh.c