Skip to content

Commit 91af0f9

Browse files
Minor clarifications
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
1 parent ff674d4 commit 91af0f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/architecture/psa-migration/md-cipher-dispatch.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ The option `MBEDTLS_USE_PSA_CRYPTO` causes parts of the library to call the PSA
8989

9090
In this work, we want two things:
9191

92-
* Make non-covered modules call PSA, but only [when this will actually work](#why-psa-is-not-always-possible). This effectively brings those modules to a partial use-PSA behavior regardless of whether the option is enabled.
92+
* Make non-covered modules call PSA, but only [when this will actually work](#why-psa-is-not-always-possible). This effectively brings those modules to a partial use-PSA behavior (benefiting from PSA accelerators when they're usable) regardless of whether the option is enabled.
9393
* Call PSA when a covered module calls a non-covered module which calls another module, for example X.509 calling pk for PSS verification which calls RSA which calculates a hash ([see issue \#6497](https://github.com/Mbed-TLS/mbedtls/issues/6497)). This effectively extends the option to modules that aren't directly covered.
9494

9595
#### Classification of callers
@@ -181,7 +181,7 @@ Let us work through the example of RSA-PSS which calculates a hash, as in [see i
181181
RSA is in the [mixed domain](#classification-of-callers). So:
182182

183183
* When called from `psa_sign_hash` and other PSA functions, it must call the PSA hash accelerator if there is one.
184-
* When called from user code, it must call the built-in hash implementation if PSA is not available.
184+
* When called from user code, it must call the built-in hash implementation if PSA is not available (regardless of whether this is because `MBEDTLS_PSA_CRYPTO_C` is disabled, or because `PSA_WANT_ALG_xxx` is disabled for this hash, or because there is an accelerator driver which has not been initialized yet).
185185

186186
RSA knows which hash algorithm to use based on a parameter of type `mbedtls_md_type_t`. (More generally, all mixed-domain modules that take an algorithm specification as a parameter take it via a numerical type, except HMAC\_DRBG and HKDF which take a `const mbedtls_md_info_t*` instead, and CMAC which takes a `const mbedtls_cipher_info_t *`.)
187187

0 commit comments

Comments
 (0)