Skip to content

Commit 15e6bd0

Browse files
AnthonyGrondinAnthony Grondin
authored andcommitted
wip: Add initial Modular Exponentiation for bignum
1 parent fdf3203 commit 15e6bd0

File tree

6 files changed

+389
-193
lines changed

6 files changed

+389
-193
lines changed

esp-mbedtls-sys/headers/esp32c3/config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3609,6 +3609,8 @@
36093609
/* MPI / BIGNUM options */
36103610
//#define MBEDTLS_MPI_WINDOW_SIZE 2 /**< Maximum window size used. */
36113611
//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
3612+
#define MBEDTLS_MPI_EXP_MOD_ALT
3613+
// #define MBEDTLS_MPI_MUL_MPI_ALT
36123614

36133615
/* CTR_DRBG options */
36143616
//#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */

esp-mbedtls-sys/headers/esp32s3/config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3610,8 +3610,8 @@
36103610
//#define MBEDTLS_MPI_WINDOW_SIZE 2 /**< Maximum window size used. */
36113611
//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
36123612
// #define MBEDTLS_BIGNUM_ALT
3613-
// #define MBEDTLS_MPI_EXP_MOD_ALT
3614-
#define MBEDTLS_MPI_MUL_MPI_ALT
3613+
#define MBEDTLS_MPI_EXP_MOD_ALT
3614+
// #define MBEDTLS_MPI_MUL_MPI_ALT
36153615

36163616
/* CTR_DRBG options */
36173617
//#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */

esp-mbedtls/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ esp32-hal = { version = "0.16.0", optional = true }
1313
esp32c3-hal = { version = "0.13.0", optional = true }
1414
esp32s2-hal = { version = "0.13.0", optional = true }
1515
esp32s3-hal = { version = "0.13.0", optional = true }
16+
cfg-if = "1.0.0"
1617

1718
[features]
1819
async = ["dep:embedded-io-async"]

0 commit comments

Comments
 (0)