crypto: Remove CRYPTO_BLAKE2S Kconfig
since it's more simple to let linker remove the unused functions from the final image Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
56286a72c6
commit
dec99c0c97
@ -26,19 +26,38 @@ if(CONFIG_CRYPTO)
|
|||||||
|
|
||||||
if(CONFIG_CRYPTO_CRYPTODEV)
|
if(CONFIG_CRYPTO_CRYPTODEV)
|
||||||
list(APPEND SRCS cryptodev.c)
|
list(APPEND SRCS cryptodev.c)
|
||||||
|
if(CONFIG_CRYPTO_CRYPTODEV_SOFTWARE)
|
||||||
|
list(APPEND SRCS cryptosoft.c)
|
||||||
|
list(APPEND SRCS xform.c)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Software AES library
|
# Software crypto library
|
||||||
|
|
||||||
if(CONFIG_CRYPTO_SW_AES)
|
if(CONFIG_CRYPTO_SW_AES)
|
||||||
list(APPEND SRCS aes.c)
|
list(APPEND SRCS aes.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# BLAKE2s hash algorithm
|
|
||||||
|
|
||||||
if(CONFIG_CRYPTO_BLAKE2S)
|
|
||||||
list(APPEND SRCS blake2s.c)
|
list(APPEND SRCS blake2s.c)
|
||||||
endif()
|
list(APPEND SRCS blf.c)
|
||||||
|
list(APPEND SRCS cast.c)
|
||||||
|
list(APPEND SRCS chachapoly.c)
|
||||||
|
list(APPEND SRCS ecb_enc.c)
|
||||||
|
list(APPEND SRCS ecb3_enc.c)
|
||||||
|
list(APPEND SRCS set_key.c)
|
||||||
|
list(APPEND SRCS md5.c)
|
||||||
|
list(APPEND SRCS poly1305.c)
|
||||||
|
list(APPEND SRCS rijndael.c)
|
||||||
|
list(APPEND SRCS rmd160.c)
|
||||||
|
list(APPEND SRCS sha1.c)
|
||||||
|
list(APPEND SRCS sha2.c)
|
||||||
|
list(APPEND SRCS gmac.c)
|
||||||
|
list(APPEND SRCS cmac.c)
|
||||||
|
list(APPEND SRCS hmac.c)
|
||||||
|
list(APPEND SRCS idgen.c)
|
||||||
|
list(APPEND SRCS key_wrap.c)
|
||||||
|
list(APPEND SRCS siphash.c)
|
||||||
|
list(APPEND SRCS hmac_buff.c)
|
||||||
|
list(APPEND SRCS curve25519.c)
|
||||||
|
|
||||||
# Entropy pool random number generator
|
# Entropy pool random number generator
|
||||||
|
|
||||||
|
@ -62,16 +62,9 @@ config CRYPTO_SW_AES
|
|||||||
implementations. This needs to support up_aesinitialize() and
|
implementations. This needs to support up_aesinitialize() and
|
||||||
aes_cypher() per include/nuttx/crypto/crypto.h.
|
aes_cypher() per include/nuttx/crypto/crypto.h.
|
||||||
|
|
||||||
config CRYPTO_BLAKE2S
|
|
||||||
bool "BLAKE2s hash algorithm"
|
|
||||||
default n
|
|
||||||
---help---
|
|
||||||
Enable the BLAKE2s hash algorithm
|
|
||||||
|
|
||||||
config CRYPTO_RANDOM_POOL
|
config CRYPTO_RANDOM_POOL
|
||||||
bool "Entropy pool and strong randon number generator"
|
bool "Entropy pool and strong randon number generator"
|
||||||
default n
|
default n
|
||||||
select CRYPTO_BLAKE2S
|
|
||||||
---help---
|
---help---
|
||||||
Entropy pool gathers environmental noise from device drivers,
|
Entropy pool gathers environmental noise from device drivers,
|
||||||
user-space, etc., and returns good random numbers, suitable
|
user-space, etc., and returns good random numbers, suitable
|
||||||
|
@ -32,9 +32,16 @@ ifeq ($(CONFIG_CRYPTO_CRYPTODEV),y)
|
|||||||
CRYPTO_CSRCS += cryptodev.c
|
CRYPTO_CSRCS += cryptodev.c
|
||||||
ifeq ($(CONFIG_CRYPTO_CRYPTODEV_SOFTWARE),y)
|
ifeq ($(CONFIG_CRYPTO_CRYPTODEV_SOFTWARE),y)
|
||||||
CRYPTO_CSRCS += cryptosoft.c
|
CRYPTO_CSRCS += cryptosoft.c
|
||||||
endif
|
|
||||||
CRYPTO_CSRCS += xform.c
|
CRYPTO_CSRCS += xform.c
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Software crypto algorithm
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_CRYPTO_SW_AES),y)
|
||||||
CRYPTO_CSRCS += aes.c
|
CRYPTO_CSRCS += aes.c
|
||||||
|
endif
|
||||||
|
CRYPTO_CSRCS += blake2s.c
|
||||||
CRYPTO_CSRCS += blf.c
|
CRYPTO_CSRCS += blf.c
|
||||||
CRYPTO_CSRCS += cast.c
|
CRYPTO_CSRCS += cast.c
|
||||||
CRYPTO_CSRCS += chachapoly.c
|
CRYPTO_CSRCS += chachapoly.c
|
||||||
@ -55,13 +62,6 @@ endif
|
|||||||
CRYPTO_CSRCS += siphash.c
|
CRYPTO_CSRCS += siphash.c
|
||||||
CRYPTO_CSRCS += hmac_buff.c
|
CRYPTO_CSRCS += hmac_buff.c
|
||||||
CRYPTO_CSRCS += curve25519.c
|
CRYPTO_CSRCS += curve25519.c
|
||||||
endif
|
|
||||||
|
|
||||||
# BLAKE2s hash algorithm
|
|
||||||
|
|
||||||
ifeq ($(CONFIG_CRYPTO_BLAKE2S),y)
|
|
||||||
CRYPTO_CSRCS += blake2s.c
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Entropy pool random number generator
|
# Entropy pool random number generator
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user