Implement mbedtls_cipher_setkey() for PSA-based cipher contexts
This commit implements the internal key slot management performed
by PSA-based cipher contexts. Specifically, `mbedtls_cipher_setkey()`
wraps the provided raw key material into a key slot, and
`mbedtls_cipher_free()` destroys that key slot.
diff --git a/include/mbedtls/cipher_internal.h b/include/mbedtls/cipher_internal.h
index f696452..f1f0e2b 100644
--- a/include/mbedtls/cipher_internal.h
+++ b/include/mbedtls/cipher_internal.h
@@ -121,6 +121,7 @@
#if defined(MBEDTLS_USE_PSA_CRYPTO)
typedef struct
{
+ psa_algorithm_t alg;
psa_key_slot_t slot;
unsigned char slot_state; /*!< 0: The slot is unset.
* 1: The slot is set and we own it.