Page MenuHome GnuPG
Feed Advanced Search

Oct 6 2021

Jakuje updated the task description for T5636: Run integrity checks + selftests from library constructor in FIPS.
Oct 6 2021, 4:47 PM · FIPS, libgcrypt, Bug Report

Oct 4 2021

Jakuje created T5636: Run integrity checks + selftests from library constructor in FIPS.
Oct 4 2021, 4:10 PM · FIPS, libgcrypt, Bug Report
werner moved T5433: libgcrypt: Do not use SHA1 by default from Backlog to Next on the FIPS board.
Oct 4 2021, 11:28 AM · FIPS, libgcrypt, Bug Report
werner moved T5617: fips: Check library integrity before running selftests from Backlog to Next on the FIPS board.
Oct 4 2021, 11:26 AM · FIPS, libgcrypt, Bug Report
werner moved T5550: Fix check_binary_integrity from Backlog to Next on the FIPS board.
Oct 4 2021, 11:26 AM · FIPS, libgcrypt
werner assigned T5617: fips: Check library integrity before running selftests to gniibe.
Oct 4 2021, 11:14 AM · FIPS, libgcrypt, Bug Report
werner moved T5600: Provide module name/version API for FIPS 140-3 from Backlog to Ready for release on the FIPS board.
Oct 4 2021, 11:13 AM · libgcrypt, FIPS, Bug Report
werner moved T5540: Update fipsdrv and cavs_driver.pl from Next to Ready for release on the FIPS board.
Oct 4 2021, 11:09 AM · FIPS, libgcrypt
gniibe added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

How about:

  • Only when hash-handle is used for multiple purposes, a user needs to compose SEXP
  • when hash-handle is used for a single purpose, a user doesn't need to compose SEXP, but static one.
Oct 4 2021, 10:24 AM · FIPS, libgcrypt, Feature Request
gniibe added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

In the original SuSE's patch, _gcry_pk_sign_md function gets data template as SEXP as an argument, and the implementation does decomposing SEXP to get hash-algo. (A user of the function needs to compose SEXP with hash-algo.)

Oct 4 2021, 9:29 AM · FIPS, libgcrypt, Feature Request

Sep 27 2021

werner moved T5520: Fix tests in FIPS mode from Next to Ready for release on the FIPS board.
Sep 27 2021, 8:36 AM · FIPS, libgcrypt, Bug Report

Sep 24 2021

Jakuje added a comment to T5550: Fix check_binary_integrity.

Thanks. This looks good to me.

Sep 24 2021, 9:30 AM · FIPS, libgcrypt
gniibe added a comment to T5550: Fix check_binary_integrity.

Thank you for pointing out. Since hmac256.{c,h} can be used by others, I think that it is better to keep those two files, instead of merging it into one.

Sep 24 2021, 4:08 AM · FIPS, libgcrypt

Sep 22 2021

Jakuje added a comment to T5550: Fix check_binary_integrity.

I tried to generate a tarball from master and I failed to build the hmac256 binary because the hmac256.h was not packaged into the dist tarball in master. If hmac256 should be standalone binary, I propose it should not need have a separate header file:

Sep 22 2021, 4:53 PM · FIPS, libgcrypt
Jakuje created T5617: fips: Check library integrity before running selftests.
Sep 22 2021, 4:37 PM · FIPS, libgcrypt, Bug Report

Sep 21 2021

werner added a comment to T5512: Implement service indicators.

Tsss, requires to allow JS for Google.

Sep 21 2021, 3:20 PM · Feature Request, FIPS, libgcrypt
pmgdeb added a comment to T5512: Implement service indicators.

Just FYI, see also how GnuTLS has proposed to implement the service indicator:
https://gitlab.com/gnutls/gnutls/-/merge_requests/1465

Sep 21 2021, 12:16 PM · Feature Request, FIPS, libgcrypt

Sep 20 2021

werner changed the status of T5600: Provide module name/version API for FIPS 140-3 from Open to Testing.

Thanks. Applied with a minor change: The string is now in a new third field.

Sep 20 2021, 8:51 AM · libgcrypt, FIPS, Bug Report

Sep 19 2021

werner claimed T5600: Provide module name/version API for FIPS 140-3.
Sep 19 2021, 1:05 PM · libgcrypt, FIPS, Bug Report

Sep 17 2021

Jakuje added a comment to T5600: Provide module name/version API for FIPS 140-3.

I have a draft, which results in the following "API" of the name-version:

Sep 17 2021, 6:13 PM · libgcrypt, FIPS, Bug Report
Jakuje added a comment to T5244: libgcrypt: Restrict MD5 use.

I had in my mind something like this:

Sep 17 2021, 3:36 PM · Bug Report, FIPS, libgcrypt
gniibe added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

While data template preparation for RSA-PSS is a bit tricky, it's simple with ECDSA.

Sep 17 2021, 10:43 AM · FIPS, libgcrypt, Feature Request
werner added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

Having hash-algo in the s-exp is useful because a hash handle may carry several hashes. This is sometimes useful if you do not know the hash algorithm in advance and you need to make a guess (various PGP compatibility things in gpg). But of course we can simplify this and use the default algo from the hash handle if hash-algo is missing.

Sep 17 2021, 7:59 AM · FIPS, libgcrypt, Feature Request
gniibe added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

Thanks for your comment.

Sep 17 2021, 7:26 AM · FIPS, libgcrypt, Feature Request

Sep 16 2021

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

Thank you. On the first sight, it looks reasonable, but I would like to experiment with it a bit to see all use cases are covered.

Sep 16 2021, 11:52 AM · FIPS, libgcrypt, Feature Request
Jakuje added a comment to T5520: Fix tests in FIPS mode.

Thanks. I think we are good here. If we will decide to pursuate the brainpool switch, I will open a new issue.

Sep 16 2021, 11:07 AM · FIPS, libgcrypt, Bug Report
gniibe added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

Pushed my initial implementation: rC117f5c3f8028: experiment-pk_hash_sign/verify: Implement pk_hash_sign/verify.

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

I am doing an experiment to implement gcry_pk_hash_sign.

Sep 16 2021, 7:15 AM · FIPS, libgcrypt, Feature Request
gniibe added a comment to T5520: Fix tests in FIPS mode.

Two third patches are applied to master. (@werner those parts are typo fix and tests improvement, which we agreed to push.)

Sep 16 2021, 3:01 AM · FIPS, libgcrypt, Bug Report

Sep 15 2021

werner triaged T5600: Provide module name/version API for FIPS 140-3 as Normal priority.

We can easily extend the gcry_get_config API. You can give a key or have it to return all infos. For examle
"gpgconf --show-versions" prints this about libgcrypt:

Sep 15 2021, 5:24 PM · libgcrypt, FIPS, Bug Report
Jakuje created T5600: Provide module name/version API for FIPS 140-3.
Sep 15 2021, 4:34 PM · libgcrypt, FIPS, Bug Report
werner added a comment to T5520: Fix tests in FIPS mode.

If a configure switch to disable Brainpool curves will be added, we also need to add a switch to disable NIST curves.

Sep 15 2021, 11:05 AM · FIPS, libgcrypt, Bug Report
Jakuje added a comment to T5520: Fix tests in FIPS mode.

Oh, my bad. I probably used wrong git command. Uploaded now the patches themselves:

Sep 15 2021, 9:51 AM · FIPS, libgcrypt, Bug Report
gniibe added a comment to T5520: Fix tests in FIPS mode.

disable-brainpool.patch is a text of list of patches.
I think the first two could be applied.
@Jakuje Could you please upload them?

Sep 15 2021, 9:10 AM · FIPS, libgcrypt, Bug Report
gniibe moved T5520: Fix tests in FIPS mode from Ready for release to Next on the FIPS board.
Sep 15 2021, 8:36 AM · FIPS, libgcrypt, Bug Report

Sep 13 2021

werner moved T5520: Fix tests in FIPS mode from Next to Ready for release on the FIPS board.
Sep 13 2021, 11:17 AM · FIPS, libgcrypt, Bug Report
werner moved T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation from Backlog to Next on the FIPS board.
Sep 13 2021, 11:16 AM · FIPS, libgcrypt, Feature Request
werner moved T5520: Fix tests in FIPS mode from Backlog to Next on the FIPS board.
Sep 13 2021, 11:11 AM · FIPS, libgcrypt, Bug Report
werner added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

My suggestion for a combined function is a simple:

Sep 13 2021, 9:53 AM · FIPS, libgcrypt, Feature Request
gniibe added a comment to T5576: New set of API for public key cryptography.

2021-09-13 Update:

  • Signature operation tested: RSA-PSS, RSA-PKCS#1-v1.5, RSA-X9.31, ECDSA by NIST Curves, DSA (against CAVS test vectors in FIPS 186-4)
    • Newly added features (also useful for standard API of sexp):
      • Support of X9.31 signature scheme with RSA
      • Support of supplying random "k" for DSA/ECDSA
      • Digest mode ASN for SHA512-224 and SHA512-256 (required for RSA PKCS#1-v1.5)
Sep 13 2021, 9:17 AM · libgcrypt, Feature Request
Jakuje added a comment to T5520: Fix tests in FIPS mode.

I have one more patch set to improve FIPS testing in test/curves.c. In the past, it was basically skipped altogether in FIPS mode. This implements more fine-grained selection of what is being tested. This is the first part.

Sep 13 2021, 8:53 AM · FIPS, libgcrypt, Bug Report

Sep 7 2021

werner added a comment to T5576: New set of API for public key cryptography.

I see.

Sep 7 2021, 10:37 AM · libgcrypt, Feature Request
gniibe added a comment to T5576: New set of API for public key cryptography.

BTW, the reason of the name "pkey" is that because gcry_pk_ctl is already occupied.
It will be changed, if needed.

Sep 7 2021, 9:52 AM · libgcrypt, Feature Request
gniibe added a comment to T5576: New set of API for public key cryptography.

Today, I pushed an example for RSA-PSS.

Sep 7 2021, 9:50 AM · libgcrypt, Feature Request

Sep 6 2021

Jakuje added a comment to T5576: New set of API for public key cryptography.

I added couple of minor comments. I hope they went into somewhere.

Sep 6 2021, 2:58 PM · libgcrypt, Feature Request
Jakuje added a comment to T5520: Fix tests in FIPS mode.

looks good to me. Tested now with master 47e425e07995454573e28c13c08229d2f8a75642 and all tests pass for me in and out of FIPS mode as well as in the "soft" one.

Sep 6 2021, 1:08 PM · FIPS, libgcrypt, Bug Report
werner claimed T5540: Update fipsdrv and cavs_driver.pl.
Sep 6 2021, 11:25 AM · FIPS, libgcrypt
werner moved T5540: Update fipsdrv and cavs_driver.pl from Backlog to Next on the FIPS board.
Sep 6 2021, 11:25 AM · FIPS, libgcrypt
werner changed the status of T5541: Envvar LIBGCRYPT_FORCE_FIPS_MODE from Open to Testing.
Sep 6 2021, 11:22 AM · Feature Request, FIPS, libgcrypt
gniibe moved T5508: Allow hardware optimizations in FIPS from Backlog to Ready for release on the FIPS board.
Sep 6 2021, 11:21 AM · FIPS, libgcrypt, Bug Report
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

Aug 30 2021

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

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

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 watcher for FIPS: gniibe.
Aug 23 2021, 11:29 AM
gniibe added a project to T5244: libgcrypt: Restrict MD5 use: FIPS.
Aug 23 2021, 11:21 AM · Bug Report, FIPS, libgcrypt

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 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

Aug 17 2021

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 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

Aug 13 2021

werner changed the edit policy for FIPS.
Aug 13 2021, 10:59 PM

Aug 6 2021

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

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 triaged T5433: libgcrypt: Do not use SHA1 by default as Normal priority.
Aug 1 2021, 10:57 AM · FIPS, libgcrypt, Bug Report

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

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

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
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

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 T5520: Fix tests in FIPS mode.

I was so far testing with changes on top of our patches.

Jul 8 2021, 10:26 AM · FIPS, libgcrypt, Bug Report