diff --git a/include/mbedtls/legacy_or_psa.h b/include/mbedtls/legacy_or_psa.h index f872ddaf1..35798a590 100644 --- a/include/mbedtls/legacy_or_psa.h +++ b/include/mbedtls/legacy_or_psa.h @@ -64,7 +64,7 @@ * The naming scheme for these macros is: * MBEDTLS_HAS_feature_VIA_legacy_OR_PSA(_condition) * where: - * - feature is expressed the same way as in PSA_WANT macros, for example: + * - feature is expressed the same way as in PSA_WANT_xxx macros, for example: * KEY_TYPE_AES, ALG_SHA_256, ECC_SECP_R1_256; * - legacy is either LOWLEVEL or the name of the layer: MD, CIPHER; * - condition is omitted if it's based on availability, else it's diff --git a/include/psa/crypto_values.h b/include/psa/crypto_values.h index b465ddb14..152e394b9 100644 --- a/include/psa/crypto_values.h +++ b/include/psa/crypto_values.h @@ -1760,7 +1760,7 @@ #define PSA_ALG_HKDF_BASE ((psa_algorithm_t)0x08000100) /** Macro to build an HKDF algorithm. * - * For example, `PSA_ALG_HKDF(PSA_ALG_SHA256)` is HKDF using HMAC-SHA-256. + * For example, `PSA_ALG_HKDF(PSA_ALG_SHA_256)` is HKDF using HMAC-SHA-256. * * This key derivation algorithm uses the following inputs: * - #PSA_KEY_DERIVATION_INPUT_SALT is the salt used in the "extract" step. @@ -1805,7 +1805,7 @@ #define PSA_ALG_HKDF_EXTRACT_BASE ((psa_algorithm_t)0x08000400) /** Macro to build an HKDF-Extract algorithm. * - * For example, `PSA_ALG_HKDF_EXTRACT(PSA_ALG_SHA256)` is + * For example, `PSA_ALG_HKDF_EXTRACT(PSA_ALG_SHA_256)` is * HKDF-Extract using HMAC-SHA-256. * * This key derivation algorithm uses the following inputs: @@ -1854,7 +1854,7 @@ #define PSA_ALG_HKDF_EXPAND_BASE ((psa_algorithm_t)0x08000500) /** Macro to build an HKDF-Expand algorithm. * - * For example, `PSA_ALG_HKDF_EXPAND(PSA_ALG_SHA256)` is + * For example, `PSA_ALG_HKDF_EXPAND(PSA_ALG_SHA_256)` is * HKDF-Expand using HMAC-SHA-256. * * This key derivation algorithm uses the following inputs: @@ -1925,7 +1925,7 @@ * concatenation of ServerHello.Random + ClientHello.Random, * and the label is "key expansion". * - * For example, `PSA_ALG_TLS12_PRF(PSA_ALG_SHA256)` represents the + * For example, `PSA_ALG_TLS12_PRF(PSA_ALG_SHA_256)` represents the * TLS 1.2 PRF using HMAC-SHA-256. * * \param hash_alg A hash algorithm (\c PSA_ALG_XXX value such that @@ -1995,7 +1995,7 @@ * PSA_ALG_RSA_PKCS1V15_CRYPT, passed to the key derivation operation * with `psa_key_derivation_input_bytes()`. * - * For example, `PSA_ALG_TLS12_PSK_TO_MS(PSA_ALG_SHA256)` represents the + * For example, `PSA_ALG_TLS12_PSK_TO_MS(PSA_ALG_SHA_256)` represents the * TLS-1.2 PSK to MasterSecret derivation PRF using HMAC-SHA-256. * * \param hash_alg A hash algorithm (\c PSA_ALG_XXX value such that @@ -2050,7 +2050,7 @@ * PBKDF2 is defined by PKCS#5, republished as RFC 8018 (section 5.2). * This macro specifies the PBKDF2 algorithm constructed using a PRF based on * HMAC with the specified hash. - * For example, `PSA_ALG_PBKDF2_HMAC(PSA_ALG_SHA256)` specifies PBKDF2 + * For example, `PSA_ALG_PBKDF2_HMAC(PSA_ALG_SHA_256)` specifies PBKDF2 * using the PRF HMAC-SHA-256. * * This key derivation algorithm uses the following inputs, which must be diff --git a/library/psa_crypto_aead.h b/library/psa_crypto_aead.h index 17b3953c6..70f714a83 100644 --- a/library/psa_crypto_aead.h +++ b/library/psa_crypto_aead.h @@ -508,4 +508,4 @@ psa_status_t mbedtls_psa_aead_finish( psa_status_t mbedtls_psa_aead_abort( mbedtls_psa_aead_operation_t *operation ); -#endif /* PSA_CRYPTO_AEAD */ +#endif /* PSA_CRYPTO_AEAD_H */ diff --git a/library/psa_crypto_its.h b/library/psa_crypto_its.h index 3a3f49a72..1b8dc2032 100644 --- a/library/psa_crypto_its.h +++ b/library/psa_crypto_its.h @@ -73,7 +73,7 @@ struct psa_storage_info_t * \return A status indicating the success/failure of the operation * * \retval #PSA_SUCCESS The operation completed successfully - * \retval #PSA_ERROR_NOT_PERMITTED The operation failed because the provided `uid` value was already created with PSA_STORAGE_WRITE_ONCE_FLAG + * \retval #PSA_ERROR_NOT_PERMITTED The operation failed because the provided `uid` value was already created with PSA_STORAGE_FLAG_WRITE_ONCE * \retval #PSA_ERROR_NOT_SUPPORTED The operation failed because one or more of the flags provided in `create_flags` is not supported or is not valid * \retval #PSA_ERROR_INSUFFICIENT_STORAGE The operation failed because there was insufficient space on the storage medium * \retval #PSA_ERROR_STORAGE_FAILURE The operation failed because the physical storage has failed (Fatal error) @@ -137,7 +137,7 @@ psa_status_t psa_its_get_info(psa_storage_uid_t uid, * * \retval #PSA_SUCCESS The operation completed successfully * \retval #PSA_ERROR_DOES_NOT_EXIST The operation failed because the provided key value was not found in the storage - * \retval #PSA_ERROR_NOT_PERMITTED The operation failed because the provided key value was created with PSA_STORAGE_WRITE_ONCE_FLAG + * \retval #PSA_ERROR_NOT_PERMITTED The operation failed because the provided key value was created with PSA_STORAGE_FLAG_WRITE_ONCE * \retval #PSA_ERROR_STORAGE_FAILURE The operation failed because the physical storage has failed (Fatal error) */ psa_status_t psa_its_remove(psa_storage_uid_t uid); diff --git a/library/psa_crypto_rsa.h b/library/psa_crypto_rsa.h index 197caa88a..5835c6fc5 100644 --- a/library/psa_crypto_rsa.h +++ b/library/psa_crypto_rsa.h @@ -249,7 +249,7 @@ psa_status_t mbedtls_psa_rsa_verify_hash( * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE - * \retval #PSA_ERROR_TAMPERING_DETECTED + * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_INSUFFICIENT_ENTROPY * \retval #PSA_ERROR_BAD_STATE * The library has not been previously initialized by psa_crypto_init(). @@ -306,7 +306,7 @@ psa_status_t mbedtls_psa_asymmetric_encrypt( const psa_key_attributes_t *attribu * \retval #PSA_ERROR_INSUFFICIENT_MEMORY * \retval #PSA_ERROR_COMMUNICATION_FAILURE * \retval #PSA_ERROR_HARDWARE_FAILURE - * \retval #PSA_ERROR_TAMPERING_DETECTED + * \retval #PSA_ERROR_CORRUPTION_DETECTED * \retval #PSA_ERROR_INSUFFICIENT_ENTROPY * \retval #PSA_ERROR_INVALID_PADDING * \retval #PSA_ERROR_BAD_STATE diff --git a/scripts/data_files/driver_templates/psa_crypto_driver_wrappers.c.jinja b/scripts/data_files/driver_templates/psa_crypto_driver_wrappers.c.jinja index a491b07e0..a3e605837 100644 --- a/scripts/data_files/driver_templates/psa_crypto_driver_wrappers.c.jinja +++ b/scripts/data_files/driver_templates/psa_crypto_driver_wrappers.c.jinja @@ -291,7 +291,7 @@ psa_status_t psa_driver_wrapper_sign_hash( alg, hash, hash_length, signature, signature_size, signature_length ) ); } -#endif /* PSA_CRYPTO_SE_C */ +#endif /* MBEDTLS_PSA_CRYPTO_SE_C */ psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; psa_key_location_t location = @@ -375,7 +375,7 @@ psa_status_t psa_driver_wrapper_verify_hash( alg, hash, hash_length, signature, signature_length ) ); } -#endif /* PSA_CRYPTO_SE_C */ +#endif /* MBEDTLS_PSA_CRYPTO_SE_C */ psa_status_t status = PSA_ERROR_CORRUPTION_DETECTED; psa_key_location_t location = @@ -647,7 +647,7 @@ bits return( PSA_SUCCESS ); } -#endif /* PSA_CRYPTO_SE_C */ +#endif /* MBEDTLS_PSA_CRYPTO_SE_C */ switch( location ) { @@ -715,7 +715,7 @@ data_length *( (psa_key_slot_number_t *)key_buffer ), data, data_size, data_length ) ); } -#endif /* PSA_CRYPTO_SE_C */ +#endif /* MBEDTLS_PSA_CRYPTO_SE_C */ switch( location ) {