Skip to content

Commit

Permalink
nrf_security: Align with TF-M PSA driver IDs
Browse files Browse the repository at this point in the history
TF-M defines TFM_BUILTIN_KEY_LOADER to have ID 5.

Use the same ID for the same driver to not diverge unnecessarily and
to reduce the likelihood of having conflicting IDs.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
  • Loading branch information
SebastianBoe authored and rlubos committed Jul 5, 2023
1 parent ba802ca commit 4809525
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions subsys/nrf_security/src/psa_crypto_driver_wrappers.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,20 +112,20 @@
/* Auto-generated values depending on which drivers are registered.
* ID 0 is reserved for unallocated operations.
* ID 1 is reserved for the Mbed TLS software driver.
* ID 5 is defined by a vanilla TF-M patch file.
*/

#if defined(PSA_CRYPTO_DRIVER_CC3XX)
#define PSA_CRYPTO_CC3XX_DRIVER_ID (4)
#endif /* PSA_CRYPTO_DRIVER_CC3XX */
#if defined(PSA_CRYPTO_DRIVER_TFM_BUILTIN_KEY_LOADER)
#define PSA_CRYPTO_TFM_BUILTIN_KEY_LOADER_DRIVER_ID (5)
#endif /* PSA_CRYPTO_DRIVER_TFM_BUILTIN_KEY_LOADER */

#if defined(PSA_CRYPTO_DRIVER_OBERON)
#define PSA_CRYPTO_OBERON_DRIVER_ID (28)
#endif /* PSA_CRYPTO_DRIVER_OBERON */

#if defined(PSA_CRYPTO_DRIVER_TFM_BUILTIN_KEY_LOADER)
#define PSA_CRYPTO_TFM_BUILTIN_KEY_LOADER_DRIVER_ID (6)
#endif /* PSA_CRYPTO_DRIVER_TFM_BUILTIN_KEY_LOADER */

/* PAKE driver ids */
#define OBERON_JPAKE_DRIVER_ID 1
#define OBERON_SPAKE_DRIVER_ID 2
Expand Down

0 comments on commit 4809525

Please sign in to comment.