1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-12-24 17:41:01 +03:00

Remove ECP internal representation from key slot

Change to on-demand loading of the internal representation when required
in order to call an mbed TLS cryptography API.

Signed-off-by: Steven Cooreman <steven.cooreman@silabs.com>
This commit is contained in:
Steven Cooreman
2020-07-24 23:09:52 +02:00
parent a01795d609
commit acda8346bf
2 changed files with 242 additions and 187 deletions

View File

@@ -32,8 +32,6 @@
#include "psa/crypto.h"
#include "psa/crypto_se_driver.h"
#include "mbedtls/ecp.h"
/** The data structure representing a key slot, containing key material
* and metadata for one key.
*/
@@ -49,10 +47,6 @@ typedef struct
uint8_t *data;
size_t bytes;
} key;
#if defined(MBEDTLS_ECP_C)
/* EC public key or key pair */
mbedtls_ecp_keypair *ecp;
#endif /* MBEDTLS_ECP_C */
#if defined(MBEDTLS_PSA_CRYPTO_SE_C)
/* Any key type in a secure element */
struct se