Skip to content

Commit

Permalink
wip: Add initial Modular Exponentiation for bignum
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyGrondin authored and Anthony Grondin committed Nov 14, 2023
1 parent fdf3203 commit 15e6bd0
Show file tree
Hide file tree
Showing 6 changed files with 389 additions and 193 deletions.
2 changes: 2 additions & 0 deletions esp-mbedtls-sys/headers/esp32c3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3609,6 +3609,8 @@
/* MPI / BIGNUM options */
//#define MBEDTLS_MPI_WINDOW_SIZE 2 /**< Maximum window size used. */
//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
#define MBEDTLS_MPI_EXP_MOD_ALT
// #define MBEDTLS_MPI_MUL_MPI_ALT

/* CTR_DRBG options */
//#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
Expand Down
4 changes: 2 additions & 2 deletions esp-mbedtls-sys/headers/esp32s3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3610,8 +3610,8 @@
//#define MBEDTLS_MPI_WINDOW_SIZE 2 /**< Maximum window size used. */
//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
// #define MBEDTLS_BIGNUM_ALT
// #define MBEDTLS_MPI_EXP_MOD_ALT
#define MBEDTLS_MPI_MUL_MPI_ALT
#define MBEDTLS_MPI_EXP_MOD_ALT
// #define MBEDTLS_MPI_MUL_MPI_ALT

/* CTR_DRBG options */
//#define MBEDTLS_CTR_DRBG_ENTROPY_LEN 48 /**< Amount of entropy used per seed by default (48 with SHA-512, 32 with SHA-256) */
Expand Down
1 change: 1 addition & 0 deletions esp-mbedtls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ esp32-hal = { version = "0.16.0", optional = true }
esp32c3-hal = { version = "0.13.0", optional = true }
esp32s2-hal = { version = "0.13.0", optional = true }
esp32s3-hal = { version = "0.13.0", optional = true }
cfg-if = "1.0.0"

[features]
async = ["dep:embedded-io-async"]
Expand Down
Loading

0 comments on commit 15e6bd0

Please sign in to comment.