mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-24 19:43:32 +00:00
Clarify the superset rule
Signed-off-by: Manuel Pégourié-Gonnard <manuel.pegourie-gonnard@arm.com>
This commit is contained in:
parent
4ceb71f53d
commit
60769762d2
@ -88,9 +88,11 @@ domain, needs a hash. (Note that this includes `ENTROPY_C`, so in practice
|
|||||||
`MD_LIGHT` is enabled in most builds.)
|
`MD_LIGHT` is enabled in most builds.)
|
||||||
|
|
||||||
Note that there is a rule, enforced by `config_adjust_psa_superset_legacy.h`,
|
Note that there is a rule, enforced by `config_adjust_psa_superset_legacy.h`,
|
||||||
that all hashes that are enabled on the legacy side are also enabled on the
|
that as soon as `PSA_CRYPTO_C` is enabled, all hashes that are enabled on the
|
||||||
PSA side. So, in practice, when `MD_LIGHT` is enabled, `PSA_WANT_ALG_xxx` and
|
legacy side are also enabled on the PSA side (the converse is not true: a hash
|
||||||
`MBEDTLS_MD_CAN_xxx` are equivalent.
|
that's provided by a driver will typically be available only on the PSA side). So, in
|
||||||
|
practice, when `PSA_CRYPTO_C` and `MD_LIGHT` are both enabled,
|
||||||
|
`PSA_WANT_ALG_xxx` and `MBEDTLS_MD_CAN_xxx` are equivalent.
|
||||||
|
|
||||||
**Legacy and `USE_PSA` domains:** for hashes, `MBEDTLS_MD_CAN_xxx` (where
|
**Legacy and `USE_PSA` domains:** for hashes, `MBEDTLS_MD_CAN_xxx` (where
|
||||||
`xxx` is the legacy name of the hash) can be used everywhere (except in the
|
`xxx` is the legacy name of the hash) can be used everywhere (except in the
|
||||||
@ -220,9 +222,12 @@ this implies support for the corresponding key type).
|
|||||||
ECC
|
ECC
|
||||||
---
|
---
|
||||||
|
|
||||||
**Curves:** in `config_adjut_psa_superset_legacy.h` we ensure that all
|
**Curves:** in `config_adjut_psa_superset_legacy.h` we ensure that, as soon as
|
||||||
|
`PSA_CRYPTO_C` is enabled, all
|
||||||
curves that are supported on the legacy side (`MBEDTLS_ECP_DP_xxx_ENABLED`)
|
curves that are supported on the legacy side (`MBEDTLS_ECP_DP_xxx_ENABLED`)
|
||||||
are also supported on the PSA side (`PSA_WANT_ECC_xxx`).
|
are also supported on the PSA side (`PSA_WANT_ECC_xxx`). (The converse is not
|
||||||
|
true as a curve provided by a driver will typically only be available on the
|
||||||
|
PSA side).
|
||||||
|
|
||||||
In `config_adjust_legacy_crypto.h` we define macros `MBEDTLS_ECP_HAVE_xxx`.
|
In `config_adjust_legacy_crypto.h` we define macros `MBEDTLS_ECP_HAVE_xxx`.
|
||||||
These macros are useful for data and functions that have users in several
|
These macros are useful for data and functions that have users in several
|
||||||
|
Loading…
x
Reference in New Issue
Block a user