Page MenuHome GnuPG
Feed Advanced Search

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
gniibe added a comment to T5520: Fix tests in FIPS mode.

With `/etc/gcrypt/fips_enabled/', make check fails by:

Jul 8 2021, 6:50 AM · FIPS, libgcrypt, Bug Report
gniibe added a comment to T5520: Fix tests in FIPS mode.

Update: still ./basic --fips fails (for me), because of GCM (18 errors).
Need to fix T4873: Enable AES GCM in FIPS mode.

Jul 8 2021, 2:58 AM · FIPS, libgcrypt, Bug Report

Jul 7 2021

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

That crcalgo can be any digest algorithm and SHA256 seems best option to me.

Jul 7 2021, 5:29 PM · FIPS, libgcrypt, Bug Report
Jakuje added a comment to T5520: Fix tests in FIPS mode.

Thank you for checking and for revised patch. I tested your patch and it works fine for the basic test up until this failure with the crcalgo:

basic: algo 316, crcalgo: 3, gcry_md_open failed: Invalid digest algorithm
basic: algo 317, crcalgo: 3, gcry_md_open failed: Invalid digest algorithm

These are GCRY_MD_SHAKE128 and GCRY_MD_SHAKE256, but the md used here is actually GCRY_MD_RMD160 which is hardcoded and not allowed in FIPS.

Jul 7 2021, 3:15 PM · FIPS, libgcrypt, Bug Report
werner added a comment to T5520: Fix tests in FIPS mode.

That reminds me that we we should replace libgcrypt's internal debug functions by those from gpgrt. We have a dependency for gpgrt anyway and thus we should avoid code duplication. Sure we will keep the existsing public functions but that is easy given that gpgrt comes with gpgrt_logv since 1.28 which we can make mandatory (currently libgcrypt requires 1.27 (from 2017, with 1.28 is from 2018)

Jul 7 2021, 9:24 AM · FIPS, libgcrypt, Bug Report
gniibe added a comment to T5520: Fix tests in FIPS mode.

I applied rC297d31294333: tests: Fix messages to STDERR when FIPS mode is enabled.. Please note that your intention to change check_digests is right, but your patch actually didn't; When a MD algo is not supported, gcry_md_test_algo returns != 0 (an error code), and it "continues" to next entry (before the change).

Jul 7 2021, 8:19 AM · FIPS, libgcrypt, Bug Report
gniibe added a comment to T5520: Fix tests in FIPS mode.

Thank you for your report.

Jul 7 2021, 8:07 AM · FIPS, libgcrypt, Bug Report
gniibe claimed T5520: Fix tests in FIPS mode.
Jul 7 2021, 4:42 AM · FIPS, libgcrypt, Bug Report

Jul 6 2021

werner triaged T5520: Fix tests in FIPS mode as High priority.
Jul 6 2021, 3:33 PM · FIPS, libgcrypt, Bug Report
werner added a project to T5520: Fix tests in FIPS mode: FIPS.
Jul 6 2021, 1:46 PM · FIPS, libgcrypt, Bug Report
gniibe moved T5508: Allow hardware optimizations in FIPS from Backlog to For 1.10 on the libgcrypt board.
Jul 6 2021, 6:33 AM · FIPS, libgcrypt, Bug Report

Jul 5 2021

gniibe added a comment to T5512: Implement service indicators.

Implementation Guidance for FIPS 140-3 and the Cryptographic Module Validation Program:
https://csrc.nist.gov/CSRC/media/Projects/cryptographic-module-validation-program/documents/fips%20140-3/FIPS%20140-3%20IG.pdf

Jul 5 2021, 8:50 AM · Feature Request, FIPS, libgcrypt

Jun 28 2021

werner triaged T5512: Implement service indicators as High priority.
Jun 28 2021, 1:27 PM · Feature Request, FIPS, libgcrypt
Jakuje created T5512: Implement service indicators.
Jun 28 2021, 12:28 PM · Feature Request, FIPS, libgcrypt

Jun 25 2021

werner triaged T5508: Allow hardware optimizations in FIPS as High priority.
Jun 25 2021, 8:55 AM · FIPS, libgcrypt, Bug Report

Jun 16 2021

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

Some ideas:

  • the someflags thing will probably just be a reserved parameter
  • If DATA is not NULL but an MD is set the sign function should fail
  • Should ownership of MD be moved to the CTX?
Jun 16 2021, 11:11 AM · FIPS, libgcrypt, Feature Request
Jakuje added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

In an email from @werner couple days back, I got a suggestion that we could use hashing tied to the context, rather than this one-shot call tied only to digests. I circled back this suggestion to Stephan and he confirmed that it should be fine from the FIPS point of view so I am posting the suggested API here too:

ctx = gcry_pk_new (someflags)
md = gcry_md_open (...)
gcry_ctx_set_md (md);
gcry_pk_sign_ext (ctx, result, data, skey)
[...]
gcry_ctx_release (ctx);
Jun 16 2021, 10:52 AM · FIPS, libgcrypt, Feature Request
gniibe added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

OK. I think that the patch at SUSE is updated one which works.
As I understand correctly, this is a kind of very old patch, which intended to work around old libgcrypt limitation of RSA PSS.

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

I think that {D1476} is still a sketch (not real code which works). I would guess an intended use, but it's good to have concrete example program which uses the feature being added.

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

FWIW, there is also this newer patch: https://dev.gnupg.org/differential/diff/1476/
and SUSE seems to already use a modified API:
https://sources.suse.com/SUSE:Maintenance:15118/libgcrypt.SUSE_SLE-15_Update/26a8df5f96d27d6abca7bd7ba9b0def0/libgcrypt-FIPS-RSA-DSA-ECDSA-hashing-operation.patch

Jun 16 2021, 8:40 AM · FIPS, libgcrypt, Feature Request

Jun 15 2021

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

Our public key functions are stateless. For several reasons it would be good to have an option to keep some state (think pre-computations). Our gcry_ctx_t would be a perfect fit for this and it will allow us to join a pubkey function with for example a hash function.

Jun 15 2021, 1:42 PM · FIPS, libgcrypt, Feature Request
gniibe added a comment to T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation.

Does the patch really work, or is it a sketch to describe the intended use?

Jun 15 2021, 12:37 PM · FIPS, libgcrypt, Feature Request

Apr 19 2021

werner moved T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation from Backlog to For 1.10 on the libgcrypt board.
Apr 19 2021, 6:16 PM · FIPS, libgcrypt, Feature Request

Mar 27 2020

werner triaged T4894: FIPS: RSA/DSA/ECDSA are missing hashing operation as Normal priority.

I recall that I talked with Stephan about it but things got lost.

Mar 27 2020, 7:12 PM · FIPS, libgcrypt, Feature Request
werner set the icon for FIPS to Tag.
Mar 27 2020, 7:12 PM