3232
3333#include "crypto_compat.h"
3434
35+ #include "platform/mbed_toolchain.h"
36+
3537#ifdef __cplusplus
3638extern "C" {
3739#endif
@@ -54,15 +56,17 @@ extern "C" {
5456 * for, in addition to the algorithm set with
5557 * psa_set_key_algorithm().
5658 *
57- * \warning Setting an enrollment algorithm is not recommended, because
58- * using the same key with different algorithms can allow some
59- * attacks based on arithmetic relations between different
60- * computations made with the same key, or can escalate harmless
61- * side channels into exploitable ones. Use this function only
62- * if it is necessary to support a protocol for which it has been
63- * verified that the usage of the key with multiple algorithms
64- * is safe.
59+ * \deprecated This is for backward compatibility only.
60+ * Setting an enrollment algorithm is not recommended, because
61+ * using the same key with different algorithms can allow some
62+ * attacks based on arithmetic relations between different
63+ * computations made with the same key, or can escalate harmless
64+ * side channels into exploitable ones. Use this function only
65+ * if it is necessary to support a protocol for which it has been
66+ * verified that the usage of the key with multiple algorithms
67+ * is safe.
6568 */
69+ MBED_DEPRECATED ("Setting enrollment algorithm is for backward compatibility and not recommended." )
6670static inline void psa_set_key_enrollment_algorithm (
6771 psa_key_attributes_t * attributes ,
6872 psa_algorithm_t alg2 )
@@ -75,7 +79,10 @@ static inline void psa_set_key_enrollment_algorithm(
7579 * \param[in] attributes The key attribute structure to query.
7680 *
7781 * \return The enrollment algorithm stored in the attribute structure.
82+ * \deprecated This is for backward compatibility only.
83+ * Deprecated along with psa_set_key_enrollment_algorithm().
7884 */
85+ MBED_DEPRECATED ("Getting enrollment algorithm is for backward compatibility and not recommended." )
7986static inline psa_algorithm_t psa_get_key_enrollment_algorithm (
8087 const psa_key_attributes_t * attributes )
8188{
0 commit comments