forked from pool/libgcrypt
Pedro Monreal Gonzalez
725ec59b57
- Update to 1.10.1: * Bug fixes: - Fix minor memory leaks in FIPS mode. - Build fixes for MUSL libc. * Other: - More portable integrity check in FIPS mode. - Add X9.62 OIDs to sha256 and sha512 modules. * Add the hardware optimizations config file hwf.deny to the /etc/gcrypt/ directory. This file can be used to globally disable the use of hardware based optimizations. * Remove not needed separate_hmac256_binary hmac256 package - Update to 1.10.0: * New and extended interfaces: - New control codes to check for FIPS 140-3 approved algorithms. - New control code to switch into non-FIPS mode. - New cipher modes SIV and GCM-SIV as specified by RFC-5297. - Extended cipher mode AESWRAP with padding as specified by RFC-5649. - New set of KDF functions. - New KDF modes Argon2 and Balloon. - New functions for combining hashing and signing/verification. * Performance: - Improved support for PowerPC architectures. - Improved ECC performance on zSeries/s390x by using accelerated scalar multiplication. - Many more assembler performance improvements for several architectures. * Bug fixes: - Fix Elgamal encryption for other implementations. OBS-URL: https://build.opensuse.org/request/show/1038172 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libgcrypt?expand=0&rev=160
40 lines
1.6 KiB
Diff
40 lines
1.6 KiB
Diff
Index: libgcrypt-1.10.0/src/fips.c
|
|
===================================================================
|
|
--- libgcrypt-1.10.0.orig/src/fips.c
|
|
+++ libgcrypt-1.10.0/src/fips.c
|
|
@@ -379,10 +379,15 @@ int
|
|
_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;
|
|
Index: libgcrypt-1.10.0/doc/gcrypt.texi
|
|
===================================================================
|
|
--- libgcrypt-1.10.0.orig/doc/gcrypt.texi
|
|
+++ libgcrypt-1.10.0/doc/gcrypt.texi
|
|
@@ -995,10 +995,12 @@ algorithm supports different key sizes).
|
|
this function returns @code{GPS_ERR_NO_ERROR}. Otherwise @code{GPG_ERR_NOT_SUPPORTED}
|
|
is returned.
|
|
|
|
-@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
|
|
-certification. If the KDF is approved, this function returns @code{GPG_ERR_NO_ERROR}.
|
|
+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}.
|
|
Otherwise @code{GPG_ERR_NOT_SUPPORTED} is returned.
|
|
|
|
@item GCRYCTL_FIPS_SERVICE_INDICATOR_PK; Arguments: enum gcry_pk_algos
|