Increase buffer size for non-pico.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2026-02-25 19:33:38 +01:00
parent fcc82458ba
commit 69015b84d9
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3
2 changed files with 5 additions and 1 deletions

@ -1 +1 @@
Subproject commit 6b483029a50087384b27c5c691864a3675c92ae3
Subproject commit 1be3691a954134b81df8bd3719076e02998ddc8b

View file

@ -522,7 +522,11 @@ uint32_t decrement_key_counter(file_t *fkey) {
int store_keys(void *key_ctx, int type, uint8_t key_id) {
int r = 0;
uint16_t key_size = 0;
#ifdef ENABLE_EMULATION
uint8_t kdata[8192 / 8]; // worst case
#else
uint8_t kdata[4096 / 8]; // worst case
#endif
if (type & PICO_KEYS_KEY_RSA) {
mbedtls_rsa_context *rsa = (mbedtls_rsa_context *) key_ctx;
key_size = (uint16_t)mbedtls_mpi_size(&rsa->P) + (uint16_t)mbedtls_mpi_size(&rsa->Q);