Page MenuHome GnuPG
Feed Advanced Search

Sep 6 2021

werner moved T5523: jitter entropy RNG update from Backlog to Next on the FIPS board.
Sep 6 2021, 11:19 AM · FIPS, libgcrypt
werner claimed T5523: jitter entropy RNG update.
Sep 6 2021, 11:19 AM · FIPS, libgcrypt
werner moved T5576: New set of API for public key cryptography from Backlog to Next on the FIPS board.
Sep 6 2021, 11:18 AM · libgcrypt, Feature Request
werner moved T5541: Envvar LIBGCRYPT_FORCE_FIPS_MODE from Backlog to Ready for release on the FIPS board.
Sep 6 2021, 11:17 AM · Feature Request, FIPS, libgcrypt
gniibe added a comment to T5576: New set of API for public key cryptography.

I created an experimental branch:
https://dev.gnupg.org/source/libgcrypt/history/gniibe%252Fnew-pk-api/

Sep 6 2021, 9:38 AM · libgcrypt, Feature Request

Sep 1 2021

jukivili added a comment to T5581: buf_eq_const() function in cipher/bufhelp.h may get wrong result.

Based on GCC bugzilla, affected released GCC versions are 11.1 and 11.2.

Sep 1 2021, 3:44 PM · toolchain, libgcrypt, Bug Report
jukivili added a comment to T5581: buf_eq_const() function in cipher/bufhelp.h may get wrong result.

(ab | ba) >= 0 is used to make optimization analysis for compiler more difficult. I see that with (ab | ba) == 0, it would be much easier for compiler to conclude than loop could exit early as soon as first a[i] != b[i] is seen.

Sep 1 2021, 3:39 PM · toolchain, libgcrypt, Bug Report
gniibe closed T5440: _DARWIN_C_SOURCE kind of "must" be 1, not "900000L" as Resolved.
Sep 1 2021, 8:07 AM · MacOS, libgcrypt, Bug Report
gniibe set External Link to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102151 on T5556: Use of offsetof is better for allocation of flexible array.
Sep 1 2021, 3:44 AM · gnupg24, gpgme, libgcrypt
gniibe added a comment to T5556: Use of offsetof is better for allocation of flexible array.

I filed a bug report to GCC, with modified test case.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102151

Sep 1 2021, 3:43 AM · gnupg24, gpgme, libgcrypt
gniibe claimed T5556: Use of offsetof is better for allocation of flexible array.
Sep 1 2021, 2:54 AM · gnupg24, gpgme, libgcrypt

Aug 31 2021

changyp6 updated the task description for T5581: buf_eq_const() function in cipher/bufhelp.h may get wrong result.
Aug 31 2021, 9:57 AM · toolchain, libgcrypt, Bug Report
werner triaged T5581: buf_eq_const() function in cipher/bufhelp.h may get wrong result as High priority.
Aug 31 2021, 7:58 AM · toolchain, libgcrypt, Bug Report

Aug 30 2021

gniibe closed T5365: --with-libgpg-error-prefix doesn't affect gpgrt-config path detection as Resolved.
Aug 30 2021, 7:05 AM · MacOS, gpgrt, Cross-Compiler, libgcrypt
gniibe triaged T5576: New set of API for public key cryptography as High priority.
Aug 30 2021, 5:07 AM · libgcrypt, Feature Request

Aug 25 2021

werner triaged T5556: Use of offsetof is better for allocation of flexible array as Normal priority.
Aug 25 2021, 4:27 PM · gnupg24, gpgme, libgcrypt
gniibe closed T5251: Compile error on ARMv7 for libgcrypt as Resolved.
Aug 25 2021, 3:58 AM · asm, libgcrypt, Bug Report
gniibe closed T5268: macOS getentropy as Resolved.

Closing, as downstream ticket has been closed.

Aug 25 2021, 3:51 AM · libgcrypt, MacOS
gniibe set External Link to https://trac.macports.org/ticket/62431 on T5268: macOS getentropy.
Aug 25 2021, 3:49 AM · libgcrypt, MacOS
gniibe closed T5369: GnuPG build on Apple with Clang as Resolved.

Fixed in libgcrypt 1.9.4.

Aug 25 2021, 3:40 AM · libgcrypt, MacOS, Bug Report
gniibe closed T5530: Add "prehash" support to DSA and ECDSA signing, a subtask of T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation, as Resolved.
Aug 25 2021, 3:29 AM · FIPS, libgcrypt, Feature Request
gniibe closed T5530: Add "prehash" support to DSA and ECDSA signing as Resolved.
Aug 25 2021, 3:29 AM · Restricted Project, FIPS, libgcrypt, Feature Request
gniibe closed T5529: Support internal hashing for RSA-PSS, a subtask of T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation, as Resolved.
Aug 25 2021, 3:28 AM · FIPS, libgcrypt, Feature Request
gniibe closed T5529: Support internal hashing for RSA-PSS as Resolved.
Aug 25 2021, 3:28 AM · libgcrypt, Feature Request

Aug 24 2021

gniibe added a comment to T5556: Use of offsetof is better for allocation of flexible array.
t-fam.c: In function 'main':
t-fam.c:34:14: warning: array subscript 'struct arg_and_data_s[0]' is partly outside array bounds of 'unsigned char[22]' [-Warray-bounds]
   34 |   aad0->next = NULL;
      |              ^
t-fam.c:30:10: note: referencing an object of size 22 allocated by 'malloc'
   30 |   aad0 = malloc (offsetof (struct arg_and_data_s, arg) + 2);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t-fam.c:35:13: warning: array subscript 'struct arg_and_data_s[0]' is partly outside array bounds of 'unsigned char[22]' [-Warray-bounds]
   35 |   aad0->len = 2;
      |   ~~~~~~~~~~^~~
t-fam.c:30:10: note: referencing an object of size 22 allocated by 'malloc'
   30 |   aad0 = malloc (offsetof (struct arg_and_data_s, arg) + 2);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t-fam.c:36:15: warning: array subscript 'struct arg_and_data_s[0]' is partly outside array bounds of 'unsigned char[22]' [-Warray-bounds]
   36 |   aad0->flags = 0;
      |   ~~~~~~~~~~~~^~~
t-fam.c:30:10: note: referencing an object of size 22 allocated by 'malloc'
   30 |   aad0 = malloc (offsetof (struct arg_and_data_s, arg) + 2);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t-fam.c:37:18: warning: array subscript 'struct arg_and_data_s[0]' is partly outside array bounds of 'unsigned char[22]' [-Warray-bounds]
   37 |   aad0->print_fd = fd;
      |   ~~~~~~~~~~~~~~~^~~~
t-fam.c:30:10: note: referencing an object of size 22 allocated by 'malloc'
   30 |   aad0 = malloc (offsetof (struct arg_and_data_s, arg) + 2);
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Aug 24 2021, 7:29 AM · gnupg24, gpgme, libgcrypt
gniibe added a comment to T5556: Use of offsetof is better for allocation of flexible array.

For GCC 11, modified version of struct arg_and_data_s has an issue for x86_64.

Aug 24 2021, 4:53 AM · gnupg24, gpgme, libgcrypt

Aug 23 2021

Jakuje added a comment to T5523: jitter entropy RNG update.

We should update jitterentropy to 3.0.2 or newer, which should be easier to get through certification, if we will go this way. From FIPS perspective, we should be fine with either going through getrandom only or with jitter entropy, but the bottom-line was that we should probably keep both as we do now.

Aug 23 2021, 12:46 PM · FIPS, libgcrypt
Jakuje added a comment to T5244: libgcrypt: Restrict MD5 use.

From Stephan I got the following response to the allocation handler use case

Aug 23 2021, 12:00 PM · Bug Report, FIPS, libgcrypt
werner added a comment to T5523: jitter entropy RNG update.

I think the last user of random-fips was removed with rCed57fed6de1465e02ec5e3bc0affeabdd35e2eb7

Aug 23 2021, 11:38 AM · FIPS, libgcrypt
werner added a comment to T5523: jitter entropy RNG update.

Yes, it makes sense to remove it.

Aug 23 2021, 11:34 AM · FIPS, libgcrypt
gniibe added a project to T5244: libgcrypt: Restrict MD5 use: FIPS.
Aug 23 2021, 11:21 AM · Bug Report, FIPS, libgcrypt
gniibe added a comment to T5556: Use of offsetof is better for allocation of flexible array.

For the use case of struct arg_and_data_s in gpgme, which may allocate zero-sized ARG[], it seems that GCC 11 interprets it as an invalid use.

Aug 23 2021, 6:25 AM · gnupg24, gpgme, libgcrypt
gniibe added projects to T5556: Use of offsetof is better for allocation of flexible array: libgcrypt, gpgme, gnupg (gpg23).
Aug 23 2021, 4:47 AM · gnupg24, gpgme, libgcrypt

Aug 22 2021

werner closed T5328: On the (in)security of Elgamal in OpenPGP as Resolved.
Aug 22 2021, 6:13 PM · side-channel, CVE, libgcrypt
werner closed T5402: Release Libgcrypt 1.9.4 as Resolved.
Aug 22 2021, 6:12 PM · Release Info, libgcrypt
werner updated the task description for T5402: Release Libgcrypt 1.9.4.
Aug 22 2021, 6:12 PM · Release Info, libgcrypt
werner triaged T5563: Release Libgcrypt 1.9.5 as Low priority.
Aug 22 2021, 6:07 PM · Release Info, libgcrypt
werner closed T5490: gcry_pk_get_param aborts program with error on "Curve25519" as Resolved.
Aug 22 2021, 4:52 PM · libgcrypt, Bug Report

Aug 20 2021

werner added a comment to T5550: Fix check_binary_integrity.

iirc Uli Drepper added a hack to dladdr which we made use of. Seems to be integrated into dladdr1 now.

Aug 20 2021, 8:26 AM · FIPS, libgcrypt
gniibe added a comment to T5550: Fix check_binary_integrity.

While I don't know if runtime integrity check is required or not by FIPS 140,
I checked OpenSSL, and it has such a check in openssl/providers/fips. The FIPS module configuration file which has the module checksum by HMAC is generated by openssl fipsinstall command.

Aug 20 2021, 3:23 AM · FIPS, libgcrypt
gniibe added a comment to T5550: Fix check_binary_integrity.

Ah... I realized that HMAC integrity check with dladdr (using address of constant string) might work (at some point) to determine the filename of libgcrypt.so, when/if glibc implementation allows searching with address of constant string. So, my claim "never worked" was wrong.

Aug 20 2021, 2:46 AM · FIPS, libgcrypt

Aug 19 2021

Jakuje added a comment to T5550: Fix check_binary_integrity.

We have the same patch (including the hmac key and we use the switch. The reasoning on our side was to be compatible with fipscheck, but it is no longer used since last year and we use just the hmac256 tool:

Aug 19 2021, 12:52 PM · FIPS, libgcrypt
werner added a comment to T5550: Fix check_binary_integrity.

Just for the records, the whole HMAC thing including the special dlopen trick used to work fine when we did the original FIPS support.

Aug 19 2021, 12:35 PM · FIPS, libgcrypt

Aug 18 2021

Jakuje added a comment to T5244: libgcrypt: Restrict MD5 use.

Right. The clarification is that SHA1 itself (for non-security and non-signature use) is still allowed in FIPS mode. But it is not allowed to be used as part of signature schemes of the new API in FIPS mode. The old API, which allows raw signatures without digests, should just fail in FIPS mode too. And the FIPS-compatible gnupg should use the new API too (it would be good to think about this when putting it together).

Aug 18 2021, 7:46 PM · Bug Report, FIPS, libgcrypt
Jakuje added a comment to T5523: jitter entropy RNG update.

For Linux and FIPS, we should be actually fine with using /dev/random or getrandom().

Aug 18 2021, 7:24 PM · FIPS, libgcrypt
Jakuje added a comment to T5540: Update fipsdrv and cavs_driver.pl.

The CAVS driver can be safely removed. The certification goes through the ACVP these days so it does not make sense to keep this.

Aug 18 2021, 12:46 PM · FIPS, libgcrypt
gniibe added a comment to T5244: libgcrypt: Restrict MD5 use.

For use of SHA-1:

Aug 18 2021, 1:59 AM · Bug Report, FIPS, libgcrypt

Aug 17 2021

werner added a comment to T5244: libgcrypt: Restrict MD5 use.

(can't access that bug with my account)

Aug 17 2021, 9:38 AM · Bug Report, FIPS, libgcrypt
gniibe added a comment to T5520: Fix tests in FIPS mode.

For tests with FIPS mode enabled, I manually create the file .libgcrypt.so.20.hmac under src/.libs.

Aug 17 2021, 6:04 AM · FIPS, libgcrypt, Bug Report
gniibe added a project to T5520: Fix tests in FIPS mode: Restricted Project.
Aug 17 2021, 4:22 AM · FIPS, libgcrypt, Bug Report
gniibe added a comment to T5520: Fix tests in FIPS mode.

I pushed my further change.
Also, applied and pushed your changes.

Aug 17 2021, 4:21 AM · FIPS, libgcrypt, Bug Report
gniibe added a comment to T5520: Fix tests in FIPS mode.

Sorry, I didn't test for non-FIPS mode when I committed rC347817438990: fips: Fix tests in fips mode..
Tweaking the value for memory allocation is needed for FIPS mode, because it uses some secure memory by DRBG.

Aug 17 2021, 4:06 AM · FIPS, libgcrypt, Bug Report

Aug 16 2021

Jakuje added a comment to T5244: libgcrypt: Restrict MD5 use.

I went a bit back to the history to figure out what is the enforced and soft fips mode as it was initially not completely clear to me. For the record, I used the following bug from 9 years ago:

Aug 16 2021, 7:11 PM · Bug Report, FIPS, libgcrypt
Jakuje added a comment to T5520: Fix tests in FIPS mode.

Tested the master on (faked) FIPS and non-FIPS Fedora and I created couple of more changes for master to work in FIPS mode:

Aug 16 2021, 4:16 PM · FIPS, libgcrypt, Bug Report
werner triaged T5523: jitter entropy RNG update as Normal priority.
Aug 16 2021, 11:08 AM · FIPS, libgcrypt
gniibe changed the status of T5244: libgcrypt: Restrict MD5 use from Open to Testing.

Since I think there is no reason why checking _gcry_enforced_fips_mode () here, I remove the check.

Aug 16 2021, 9:23 AM · Bug Report, FIPS, libgcrypt
gniibe added a comment to T5244: libgcrypt: Restrict MD5 use.

Applied by rC0f118c2dfb8e: cipher: Do not use of non-approved digests in FIPS mode.

Aug 16 2021, 4:40 AM · Bug Report, FIPS, libgcrypt

Aug 13 2021

werner changed the edit policy for libgcrypt.
Aug 13 2021, 11:08 PM
werner changed the edit policy for T5467: Release libgcrypt 1.8.9.
Aug 13 2021, 11:59 AM · libgcrypt, Release Info
werner placed T5467: Release libgcrypt 1.8.9 up for grabs.
Aug 13 2021, 11:59 AM · libgcrypt, Release Info
werner updated subscribers of T5402: Release Libgcrypt 1.9.4.
Aug 13 2021, 11:56 AM · Release Info, libgcrypt
werner changed the edit policy for T5402: Release Libgcrypt 1.9.4.
Aug 13 2021, 11:55 AM · Release Info, libgcrypt
werner placed T5402: Release Libgcrypt 1.9.4 up for grabs.
Aug 13 2021, 11:55 AM · Release Info, libgcrypt
jace888 claimed T5402: Release Libgcrypt 1.9.4.
Aug 13 2021, 11:41 AM · Release Info, libgcrypt
jace888 updated subscribers of T5467: Release libgcrypt 1.8.9.
Aug 13 2021, 11:40 AM · libgcrypt, Release Info
jace888 claimed T5467: Release libgcrypt 1.8.9.
Aug 13 2021, 11:39 AM · libgcrypt, Release Info

Aug 6 2021

gniibe triaged T5550: Fix check_binary_integrity as Normal priority.
Aug 6 2021, 9:37 AM · FIPS, libgcrypt

Aug 5 2021

gniibe updated the task description for T5547: Single thread support with newer GNU C library (2.34 or later).
Aug 5 2021, 8:31 AM · gpgrt
gniibe added a project to T5547: Single thread support with newer GNU C library (2.34 or later): libgcrypt.
Aug 5 2021, 8:30 AM · gpgrt

Aug 4 2021

gniibe added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

Ah, I understand the point (at least, partially); My understanding is: With FIPS mode, at the module boundary (== libgcrypt), it ensures that all cipher/digest/etc. operations are done under the standard compliance, and it is considered wrong (violation) when non-FIPS mode operation (such as SHA-1) and FIPS mode operation are mixed.

Aug 4 2021, 5:39 AM · FIPS, libgcrypt, Feature Request

Aug 3 2021

Jakuje added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

In RHEL, we do not have anything about PCT so the PCT requirement is not completely clear to me: https://git.centos.org/rpms/libgcrypt/blob/c8s/f/SOURCES

Aug 3 2021, 1:33 PM · FIPS, libgcrypt, Feature Request
gniibe triaged T5541: Envvar LIBGCRYPT_FORCE_FIPS_MODE as Normal priority.
Aug 3 2021, 4:53 AM · Feature Request, FIPS, libgcrypt
gniibe added a comment to T5540: Update fipsdrv and cavs_driver.pl.

SUSE has patches and version 3235 of cavs_driver.pl, bud it seems that it doesn't support DSA with Q+HASHALGO yet.

Aug 3 2021, 4:48 AM · FIPS, libgcrypt
gniibe triaged T5540: Update fipsdrv and cavs_driver.pl as Normal priority.
Aug 3 2021, 4:46 AM · FIPS, libgcrypt

Aug 1 2021

werner added a comment to T5490: gcry_pk_get_param aborts program with error on "Curve25519".

Hmm, do we need a backport?

Aug 1 2021, 10:59 AM · libgcrypt, Bug Report
werner triaged T5433: libgcrypt: Do not use SHA1 by default as Normal priority.
Aug 1 2021, 10:57 AM · FIPS, libgcrypt, Bug Report

Jul 31 2021

jukivili claimed T4486: Add AEAD mode AES-SIV to libgcrypt (RFC 5297).
Jul 31 2021, 12:36 PM · Feature Request, libgcrypt

Jul 29 2021

gniibe added a comment to T5520: Fix tests in FIPS mode.

As a start, I applied your patches.

Jul 29 2021, 7:38 AM · FIPS, libgcrypt, Bug Report
gniibe claimed T5508: Allow hardware optimizations in FIPS.
Jul 29 2021, 7:25 AM · FIPS, libgcrypt, Bug Report
gniibe changed the status of T5508: Allow hardware optimizations in FIPS from Open to Testing.
Jul 29 2021, 7:25 AM · FIPS, libgcrypt, Bug Report
gniibe changed the status of T5530: Add "prehash" support to DSA and ECDSA signing from Open to Testing.
Jul 29 2021, 5:00 AM · Restricted Project, FIPS, libgcrypt, Feature Request
gniibe changed the status of T5530: Add "prehash" support to DSA and ECDSA signing, a subtask of T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation, from Open to Testing.
Jul 29 2021, 5:00 AM · FIPS, libgcrypt, Feature Request

Jul 23 2021

gniibe triaged T5530: Add "prehash" support to DSA and ECDSA signing as Normal priority.
Jul 23 2021, 8:18 AM · Restricted Project, FIPS, libgcrypt, Feature Request
gniibe updated the task description for T5529: Support internal hashing for RSA-PSS.
Jul 23 2021, 7:36 AM · libgcrypt, Feature Request
gniibe updated the task description for T5529: Support internal hashing for RSA-PSS.
Jul 23 2021, 7:22 AM · libgcrypt, Feature Request
gniibe triaged T5529: Support internal hashing for RSA-PSS as Normal priority.
Jul 23 2021, 4:26 AM · libgcrypt, Feature Request

Jul 16 2021

gniibe added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

And... as long as I read the PCT patches, it is not needed to export those API to users.
It is only needed internally for PCT tests (at most).

Jul 16 2021, 10:12 AM · FIPS, libgcrypt, Feature Request
gniibe added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

I am considering API enhancement, for this task.

Jul 16 2021, 10:01 AM · FIPS, libgcrypt, Feature Request

Jul 13 2021

Jakuje added a comment to T5520: Fix tests in FIPS mode.

I went through the patches above + what I suggested in previous comments, tested everything against both upstream and libgcrypt in Fedora in FIPS mode. There were slight differences, some cases were already fixed in master, some needed to upstream some of our changes, but the result is 10 patches working in both FIPS and non-fips mode, hopefully enough annotated. If not, please, ask for clarifications.

Jul 13 2021, 11:25 PM · FIPS, libgcrypt, Bug Report

Jul 12 2021

werner set External Link to https://eprint.iacr.org/2021/923.pdf on T5328: On the (in)security of Elgamal in OpenPGP.
Jul 12 2021, 6:11 PM · side-channel, CVE, libgcrypt
Jakuje added a comment to T5512: Implement service indicators.

I went through the OpenSSL drafts. The module boundary in OpenSSL will be separate fips.so object and only non-deprecated functions of OpenSSL 3.0 will be FIPS compliant. There is a global state, that will allow only approved algorithms and modes and there will be API to query the FIPS mode status using OSSL_PARAM_get* functions, but we still have some unknowns so I hope we will know more on the next meeting.

Jul 12 2021, 3:42 PM · Feature Request, FIPS, libgcrypt
gniibe created T5523: jitter entropy RNG update.
Jul 12 2021, 11:36 AM · FIPS, libgcrypt
werner assigned T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation to gniibe.
Jul 12 2021, 11:20 AM · FIPS, libgcrypt, Feature Request
werner raised the priority of T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation from Normal to High.
Jul 12 2021, 11:20 AM · FIPS, libgcrypt, Feature Request
gniibe added a comment to T4873: Enable AES GCM in FIPS mode.

(OpenSSL for FIPS support is a bit tricky, which is described in README-FIPS.md in their distribution. It offers OpenSSL FIPS provider as shared library fips.so.)

Jul 12 2021, 3:38 AM · FIPS, libgcrypt, Feature Request

Jul 9 2021

gniibe added a comment to T5512: Implement service indicators.

Just FYI, NSS offers following API:

Jul 9 2021, 8:11 AM · Feature Request, FIPS, libgcrypt

Jul 8 2021

Jakuje added a comment to T4873: Enable AES GCM in FIPS mode.

I have couple of references from libssh:

Jul 8 2021, 2:57 PM · FIPS, libgcrypt, Feature Request
werner added a comment to T4873: Enable AES GCM in FIPS mode.

gniibe: Can you please check what openssl does exactly. The problem is that we currently have no permanent state for Libgcrypt (i.e. something stored on disk per user or even better global)

Jul 8 2021, 2:29 PM · FIPS, libgcrypt, Feature Request
werner added a comment to T4873: Enable AES GCM in FIPS mode.

FWIW: Unfortunately everyone is moving to GCM, even Outlook. While GnuPG was evaluated by the German BSI we had discussions about this and their evaluators were wary about GCM due to its brittleness thus our use of OCB was very welcomed. OTOH, another approved product meanwhile comes with GCM for S/MIME and thus it seems thatGCM is accepted.

Jul 8 2021, 2:20 PM · FIPS, libgcrypt, Feature Request
Jakuje added a comment to T5521: Use of conscious language.

There is no point in questioning whether a couple of words change racism or any other human problems of these days. It will not.

Jul 8 2021, 10:38 AM · gnupg24, Won't Fix, Feature Request, gnupg (gpg23), libgcrypt