Skip to content

Commit

Permalink
mbedtls: Optimize the config
Browse files Browse the repository at this point in the history
Select asm optimizations as well as ECP optimizations. Slightly increases
binary size but payoff is big.
  • Loading branch information
thebolt committed Oct 23, 2023
1 parent 805fb21 commit 4667ce5
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/drivers/crypto/mbedtls/mbedtls_config.h
Expand Up @@ -41,10 +41,14 @@

/* MPI / BIGNUM options */
#define MBEDTLS_MPI_WINDOW_SIZE 2
#define MBEDTLS_MPI_MAX_SIZE 256
#define MBEDTLS_MPI_MAX_SIZE 256

/* Memory buffer allocator options */
#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 8
#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 8

/* Optimizations */
#define MBEDTLS_HAVE_ASM
#define MBEDTLS_ECP_NIST_OPTIM

/*
* Prevent the use of 128-bit division which
Expand Down

0 comments on commit 4667ce5

Please sign in to comment.