Mbed TLS v4.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
crypto_compat.h
Go to the documentation of this file.
1 
13 /*
14  * Copyright The Mbed TLS Contributors
15  * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
16  */
17 
18 #ifndef PSA_CRYPTO_COMPAT_H
19 #define PSA_CRYPTO_COMPAT_H
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 /* This function is not a TF-PSA-Crypto API and may be removed without notice.
26  *
27  * Dummy version of a function removed in
28  * https://github.com/Mbed-TLS/TF-PSA-Crypto/pull/466
29  *
30  * The function needs to remain available during a transition period
31  * for the sake of the PSA simulator, which lives in Mbed TLS.
32  * Once TF-PSA-Crypto no longer needs the function,
33  * `tests/psa-client-server/psasim/src/psa_sim_crypto_server.c` will
34  * need to be updated to no longer need the function, and it will be
35  * possible to remove the corresponding RPC call altogether.
36  */
37 int psa_can_do_hash(psa_algorithm_t hash_alg);
38 
39 /* This defition is required to provide compatibility with the PSA arch
40  * tests. Without it building the tests will fail. To remove it we would
41  * need to change the tests to remove all references to this symbol.
42  */
43 #define PSA_KEY_TYPE_DES ((psa_key_type_t) 0x2301)
44 
56 /* TF-PSA-Crypto 1.x still supports using persistent keys whose policy uses
57  * this legacy encoding. As of TF-PSA-Crypto 1.0.0, we also allow this
58  * algorithm encoding in the policy of newly created keys, because it makes
59  * our implementation simpler. This may change without notice. */
60 #define PSA_ALG_JPAKE_BETA PSA_ALG_JPAKE_BASE
61 
62 #ifdef __cplusplus
63 }
64 #endif
65 
66 #endif /* PSA_CRYPTO_COMPAT_H */
uint32_t psa_algorithm_t
Encoding of a cryptographic algorithm.
Definition: crypto_types.h:127
int psa_can_do_hash(psa_algorithm_t hash_alg)