Split the secure element driver method table memory layout
Instead of having one giant table containing all possible methods,
represent a driver's method table as a structure containing pointers
to substructures. This way a driver that doesn't implement a certain
class of operations can use NULL for this class as a whole instead of
storing NULL for each method.
diff --git a/include/psa/crypto_se_driver.h b/include/psa/crypto_se_driver.h
index fc0d961..87a9354 100644
--- a/include/psa/crypto_se_driver.h
+++ b/include/psa/crypto_se_driver.h
@@ -980,12 +980,12 @@
* Use #PSA_DRV_SE_HAL_VERSION.
*/
uint32_t hal_version;
- psa_drv_se_key_management_t key_management;
- psa_drv_se_mac_t mac;
- psa_drv_se_cipher_t cipher;
- psa_drv_se_aead_t aead;
- psa_drv_se_asymmetric_t asymmetric;
- psa_drv_se_key_derivation_t derivation;
+ const psa_drv_se_key_management_t *key_management;
+ const psa_drv_se_mac_t *mac;
+ const psa_drv_se_cipher_t *cipher;
+ const psa_drv_se_aead_t *aead;
+ const psa_drv_se_asymmetric_t *asymmetric;
+ const psa_drv_se_key_derivation_t *derivation;
} psa_drv_se_t;
/** The current version of the secure element driver HAL.