Fix naming: FFDH key -> DH key and fix guard in psa_validate_key_type_and_size_for_key_generation
Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
diff --git a/include/psa/crypto_config.h b/include/psa/crypto_config.h
index 1c4fb6d..3dff049 100644
--- a/include/psa/crypto_config.h
+++ b/include/psa/crypto_config.h
@@ -126,8 +126,8 @@
#define PSA_WANT_KEY_TYPE_DES 1
#define PSA_WANT_KEY_TYPE_ECC_KEY_PAIR 1
#define PSA_WANT_KEY_TYPE_ECC_PUBLIC_KEY 1
-#define PSA_WANT_KEY_TYPE_FFDH_KEY_PAIR 1
-#define PSA_WANT_KEY_TYPE_FFDH_PUBLIC_KEY 1
+#define PSA_WANT_KEY_TYPE_DH_KEY_PAIR 1
+#define PSA_WANT_KEY_TYPE_DH_PUBLIC_KEY 1
#define PSA_WANT_KEY_TYPE_RAW_DATA 1
#define PSA_WANT_KEY_TYPE_RSA_KEY_PAIR 1
#define PSA_WANT_KEY_TYPE_RSA_PUBLIC_KEY 1
diff --git a/include/psa/crypto_sizes.h b/include/psa/crypto_sizes.h
index fb6c0a5..1b46c56 100644
--- a/include/psa/crypto_sizes.h
+++ b/include/psa/crypto_sizes.h
@@ -197,7 +197,7 @@
* operations, and does not need to accept all key sizes up to the limit. */
#define PSA_VENDOR_RSA_MAX_KEY_BITS 4096
-/* The maximum size of an FFDH key on this implementation, in bits.
+/* The maximum size of an DH key on this implementation, in bits.
*
* Note that an implementation may set different size limits for different
* operations, and does not need to accept all key sizes up to the limit. */
@@ -812,14 +812,14 @@
#define PSA_KEY_EXPORT_ECC_KEY_PAIR_MAX_SIZE(key_bits) \
(PSA_BITS_TO_BYTES(key_bits))
-/* Maximum size of the export encoding of an FFDH key pair.
+/* Maximum size of the export encoding of an DH key pair.
*
- * An FFDH key pair is represented by the secret value.
+ * An DH key pair is represented by the secret value.
*/
#define PSA_KEY_EXPORT_FFDH_KEY_PAIR_MAX_SIZE(key_bits) \
(PSA_BITS_TO_BYTES(key_bits))
-/* Maximum size of the export encoding of an FFDH public key.
+/* Maximum size of the export encoding of an DH public key.
*/
#define PSA_KEY_EXPORT_FFDH_PUBLIC_KEY_MAX_SIZE(key_bits) \
(PSA_BITS_TO_BYTES(key_bits))