Skip to content

Commit 491db30

Browse files
committed
psa: Accelerator support for Silabs devices with VSE
Enable acceleration for Silicon Labs Series 2 devices with virtual Secure Engine (VSE). Implementation is ported from Simplicity SDK 2024.12.0 and applied to the Zephyr fork of mbed TLS. Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
1 parent e347cc2 commit 491db30

4 files changed

+412
-0
lines changed

include/psa/crypto_driver_contexts_composites.h

+10
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343
#endif
4444
#endif
4545

46+
#if defined(PSA_CRYPTO_DRIVER_SILABS_VSE)
47+
#include "sli_cryptoacc_transparent_types.h"
48+
#endif
49+
4650
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
4751
#include <libtestdriver1/include/psa/crypto.h>
4852
#endif
@@ -140,6 +144,9 @@ typedef union {
140144
sli_se_opaque_mac_operation_t sli_se_opaque_ctx;
141145
#endif /* PSA_CRYPTO_DRIVER_SILABS_HSE && SLI_PSA_DRIVER_FEATURE_OPAQUE_KEYS */
142146
#endif /* PSA_CRYPTO_DRIVER_SILABS_HSE */
147+
#if defined(PSA_CRYPTO_DRIVER_SILABS_VSE)
148+
sli_cryptoacc_transparent_mac_operation_t sli_cryptoacc_transparent_ctx;
149+
#endif /* PSA_CRYPTO_DRIVER_SILABS_VSE */
143150
} psa_driver_mac_context_t;
144151

145152
typedef union {
@@ -157,6 +164,9 @@ typedef union {
157164
sli_se_opaque_aead_operation_t sli_se_opaque_ctx;
158165
#endif /* PSA_CRYPTO_DRIVER_SILABS_HSE && SLI_PSA_DRIVER_FEATURE_OPAQUE_KEYS */
159166
#endif /* PSA_CRYPTO_DRIVER_SILABS_HSE */
167+
#if defined(PSA_CRYPTO_DRIVER_SILABS_VSE)
168+
sli_cryptoacc_transparent_aead_operation_t sli_cryptoacc_transparent_ctx;
169+
#endif /* PSA_CRYPTO_DRIVER_SILABS_VSE */
160170
} psa_driver_aead_context_t;
161171

162172
typedef union {

include/psa/crypto_driver_contexts_primitives.h

+10
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@
4242
#endif
4343
#endif
4444

45+
#if defined(PSA_CRYPTO_DRIVER_SILABS_VSE)
46+
#include "sli_cryptoacc_transparent_types.h"
47+
#endif
48+
4549
#if defined(MBEDTLS_TEST_LIBTESTDRIVER1)
4650
#include <libtestdriver1/include/psa/crypto.h>
4751
#endif
@@ -109,6 +113,9 @@ typedef union {
109113
#if defined(PSA_CRYPTO_DRIVER_SILABS_HSE)
110114
sli_se_transparent_hash_operation_t sli_se_transparent_ctx;
111115
#endif /* PSA_CRYPTO_DRIVER_SILABS_HSE */
116+
#if defined(PSA_CRYPTO_DRIVER_SILABS_VSE)
117+
sli_cryptoacc_transparent_hash_operation_t sli_cryptoacc_transparent_ctx;
118+
#endif /* PSA_CRYPTO_DRIVER_SILABS_VSE */
112119
} psa_driver_hash_context_t;
113120

114121
typedef union {
@@ -127,6 +134,9 @@ typedef union {
127134
sli_se_opaque_cipher_operation_t sli_se_opaque_ctx;
128135
#endif /* PSA_CRYPTO_DRIVER_SILABS_HSE && SLI_PSA_DRIVER_FEATURE_OPAQUE_KEYS */
129136
#endif /* PSA_CRYPTO_DRIVER_SILABS_HSE */
137+
#if defined(PSA_CRYPTO_DRIVER_SILABS_VSE)
138+
sli_cryptoacc_transparent_cipher_operation_t sli_cryptoacc_transparent_ctx;
139+
#endif /* PSA_CRYPTO_DRIVER_SILABS_VSE */
130140
} psa_driver_cipher_context_t;
131141

132142
#endif /* PSA_CRYPTO_DRIVER_CONTEXTS_PRIMITIVES_H */

0 commit comments

Comments
 (0)