Skip to content

Commit

Permalink
core: move CFG_CORE_BIGNUM_MAX_BITS default definition
Browse files Browse the repository at this point in the history
Move CFG_CORE_BIGNUM_MAX_BITS definition to mk/crypto.mk to allow crypto
drivers to override the default value.

Signed-off-by: Clement Faure <[email protected]>
Acked-by: Jens Wiklander <[email protected]>
  • Loading branch information
clementfaure authored and jforissier committed Feb 21, 2024
1 parent 9e35f11 commit f8388fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 7 additions & 0 deletions core/crypto.mk
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ endif
# Otherwise, you need to implement hw_get_random_bytes() for your platform
CFG_WITH_SOFTWARE_PRNG ?= y

# Define the maximum size, in bits, for big numbers in the TEE core (privileged
# layer).
# This value is an upper limit for the key size in any cryptographic algorithm
# implemented by the TEE core.
# Set this to a lower value to reduce the memory footprint.
CFG_CORE_BIGNUM_MAX_BITS ?= 4096

ifeq ($(CFG_WITH_PAGER),y)
ifneq ($(CFG_CRYPTO_SHA256),y)
$(warning Warning: Enabling CFG_CRYPTO_SHA256 [required by CFG_WITH_PAGER])
Expand Down
7 changes: 0 additions & 7 deletions mk/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -703,13 +703,6 @@ CFG_CORE_LARGE_PHYS_ADDR ?= n
# Set this to a lower value to reduce the TA memory footprint.
CFG_TA_BIGNUM_MAX_BITS ?= 2048

# Define the maximum size, in bits, for big numbers in the TEE core (privileged
# layer).
# This value is an upper limit for the key size in any cryptographic algorithm
# implemented by the TEE core.
# Set this to a lower value to reduce the memory footprint.
CFG_CORE_BIGNUM_MAX_BITS ?= 4096

# Not used since libmpa was removed. Force the values to catch build scripts
# that would set = n.
$(call force,CFG_TA_MBEDTLS_MPI,y)
Expand Down

0 comments on commit f8388fd

Please sign in to comment.