2023-04-11 16:55:16 +02:00
|
|
|
Index: libgcrypt-1.10.2/src/fips.c
|
2022-09-16 23:00:13 +02:00
|
|
|
===================================================================
|
2023-04-11 16:55:16 +02:00
|
|
|
--- libgcrypt-1.10.2.orig/src/fips.c
|
|
|
|
+++ libgcrypt-1.10.2/src/fips.c
|
|
|
|
@@ -520,10 +520,15 @@ int
|
2022-09-16 23:00:13 +02:00
|
|
|
_gcry_fips_indicator_kdf (va_list arg_ptr)
|
|
|
|
{
|
|
|
|
enum gcry_kdf_algos alg = va_arg (arg_ptr, enum gcry_kdf_algos);
|
|
|
|
+ unsigned int keylen = 0;
|
|
|
|
|
|
|
|
switch (alg)
|
|
|
|
{
|
|
|
|
case GCRY_KDF_PBKDF2:
|
|
|
|
+ keylen = va_arg (arg_ptr, unsigned int);
|
|
|
|
+ if (keylen < 112) {
|
|
|
|
+ return GPG_ERR_NOT_SUPPORTED;
|
|
|
|
+ }
|
|
|
|
return GPG_ERR_NO_ERROR;
|
|
|
|
default:
|
|
|
|
return GPG_ERR_NOT_SUPPORTED;
|
2023-04-11 16:55:16 +02:00
|
|
|
Index: libgcrypt-1.10.2/doc/gcrypt.texi
|
2022-09-16 23:00:13 +02:00
|
|
|
===================================================================
|
2023-04-11 16:55:16 +02:00
|
|
|
--- libgcrypt-1.10.2.orig/doc/gcrypt.texi
|
|
|
|
+++ libgcrypt-1.10.2/doc/gcrypt.texi
|
|
|
|
@@ -970,12 +970,13 @@ is approved under the current FIPS 140-3
|
|
|
|
combination is approved, this function returns @code{GPG_ERR_NO_ERROR}.
|
|
|
|
Otherwise @code{GPG_ERR_NOT_SUPPORTED} is returned.
|
2022-09-16 23:00:13 +02:00
|
|
|
|
|
|
|
-@item GCRYCTL_FIPS_SERVICE_INDICATOR_KDF; Arguments: enum gcry_kdf_algos
|
|
|
|
+@item GCRYCTL_FIPS_SERVICE_INDICATOR_KDF; Arguments: enum gcry_kdf_algos [, unsigned int]
|
|
|
|
|
|
|
|
Check if the given KDF is approved under the current FIPS 140-3
|
2023-04-11 16:55:16 +02:00
|
|
|
-certification. If the KDF is approved, this function returns
|
|
|
|
-@code{GPG_ERR_NO_ERROR}. Otherwise @code{GPG_ERR_NOT_SUPPORTED}
|
|
|
|
-is returned.
|
2022-09-16 23:00:13 +02:00
|
|
|
+certification. The second parameter provides the keylength in bits.
|
|
|
|
+Keylength values of less that 112 bits are considered non-approved.
|
|
|
|
+If the KDF is approved, this function returns @code{GPG_ERR_NO_ERROR}.
|
2023-04-11 16:55:16 +02:00
|
|
|
+Otherwise @code{GPG_ERR_NOT_SUPPORTED} is returned.
|
|
|
|
|
|
|
|
@item GCRYCTL_FIPS_SERVICE_INDICATOR_FUNCTION; Arguments: const char *
|
2022-09-16 23:00:13 +02:00
|
|
|
|