Lines Matching refs:code

6 This document discusses a migration strategy for code that is not subject to `MBEDTLS_USE_PSA_CRYPT…
22 so that my code keeps working in new minor versions of Mbed TLS.
26 As a developer of library code that uses Mbed TLS to perform cryptographic operations,
28 so that my code works in all Mbed TLS configurations.
40 to minimize the code size.
49 I want to avoid duplicating code,
54 …ng term, all code using cryptography should use PSA interfaces, to benefit from PSA drivers, allow…
56 …non-PSA interfaces to use PSA interfaces under the hood, without breaking code in the cases where …
64 …r SHA256, `MBEDTLS_AES_C && MBEDTLS_CIPHER_MODE_CBC` for AES-CBC, etc. In code that uses the PSA i…
75code that relies on drivers, but the driver interfaces may change without notice.” In practice, th…
80 …not a goal at this stage to make more code directly call `psa_xxx` functions. Rather, the goal is …
97 We can classify code that implements or uses cryptographic mechanisms into several groups:
101 …t expected to change, except perhaps to expose some internal functionality to overhauled glue code.
202code in `rsa.c` to perform an RSA-PSS signature. It needs to calculate a hash. If `mbedtls_rsa_rsa…
217 Based on the preceding analysis, the core of the problem is: for code in the mixed domain (see [“Cl…
240 * When called from user code, it must call the built-in hash implementation if PSA is not available…
246 …md_type_t`. Pass `MBEDTLS_MD_SHA256` and `md` will dispatch to the legacy code, pass a new constan…
248 This maximally preserves backward compatibility, but then no non-PSA code benefits from PSA acceler…
273 …ed domain](#classification-of-callers), i.e. code that can be called both from legacy code and fro…
291 …allow mechanisms available through PSA but not legacy: this allows saving code size when an accele…
293 …abled. This would only save at best a very small amount of code size in the PSA dispatch code. Thi…
295 …owever, this can simplify both the implementation and the use of dispatch code thanks to some simp…
297 * Mixed-domain code can call PSA code if it knows that `psa_crypto_init()` has been called, without…
298 * Mixed-domain code can assume that PSA buffer calculations work correctly for all algorithms that …
302 …create an abstraction, but that would require every piece of mixed-domain code to replicate the lo…
313 * It includes extra fluff such as names and HMAC. This costs code size.
314 …gage dating from when it was more open, which we don't care about anymore. This may cost code size.
318 …a very thin type. We can't remove the extra function call from the source code of callers, but we …
370 - No code change in GCM and CCM - only need to update dependencies.
371code duplication between a potential new module and Cipher: source-level, and in in particular in …
382 Prototyping both approaches showed better code size savings and cleaner code with a new internal mo…
515 #### Error code conversion
517 After calling a PSA function, MD light calls `mbedtls_md_error_from_psa` to convert its status code.
529 This section is not necessary to implement MD light, but will cut down its code size.
562 …MBEDTLS_USE_PSA_CRYPTO` requires `MBEDTLS_PSA_CRYPTO_C`, hence mixed-domain code never invokes PSA.
616 …function, `block_cipher` functions call `mbedtls_cipher_error_from_psa` to convert its status code.