Applied your patch (from gitlab) to both (master and 1.10).
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Mar 8 2023
Mar 7 2023
Applied to both (1.10 and master).
You are right, there is no way to use DRBG with SHA384 by libgcrypt.
Applied to both (1.10 and master).
Applied to both (of 1.10 and master).
Mar 6 2023
Right, thanks for the review! Updated patches below.
Actually, the same issue is in the mac case, which I missed on first couple of reviews:
- enum gcry_mac_algos alg = va_arg (arg_ptr, enum gcry_cipher_algos); + enum gcry_mac_algos alg = va_arg (arg_ptr, enum gcry_mac_algos);
We discussed this further with the lab and there are more problematic flags that we need to "cut" and we can not do that always in the code as for example the RFC6979 (deterministic ECDSA signatures) are not allowed in the current version of the FIPS documents, but it is used in the selftests (which is weirdly enough allowed) so we just need to mark it unapproved. Lets discuss this further tomorrow.
Going through the code once more, there is one typo to be fixed:
+_gcry_fips_indicator_md (va_list arg_ptr) +{ + enum gcry_md_algos alg = va_arg (arg_ptr, enum gcry_cipher_algos);
should say
+_gcry_fips_indicator_md (va_list arg_ptr) +{ + enum gcry_md_algos alg = va_arg (arg_ptr, enum gcry_md_algos);
otherwise ack.
Mar 2 2023
Agreed
I think the patch is okay.
Mar 1 2023
We came to the same conclusion -- the SHAKE digests are not usable for sign/verify operations the way how it is implemented now. But it would be more clear if we would have explicit allow-list.
After consulting with our certs lab and studying the code I think SHAKE should not be a problem for now. All of the _gcry_digest_spec_shakeXXX seem to neither have an mdlen nor a read() function. pk_sign and pk_verify seem to both call md_read() which should fail because of the missing read function, kdf checks _gcry_md_get_algo_dlen() which should also disallow SHAKE.
Feb 27 2023
Good catch. A similar problem might arise with SHA384 according to section D.R which states
One potential pitfall here is that SHAKE-128 and SHAKE-256 must not be available for use in signature operations. That's because https://csrc.nist.gov/CSRC/media/Projects/cryptographic-module-validation-program/documents/fips%20140-3/FIPS%20140-3%20IG.pdf section C.C disallows the use of SHAKE in higher-level algorithms:
These look good to me.
Right, we have received the same feedback from our cert lab but I haven't found time to update the bug yet. Here are the updated patches:
This marks GCRY_MD_CRC32, GCRY_MD_CRC24_RFC2440 and GCRY_MD_CRC32_RFC1510 as approved.
Feb 16 2023
Jan 19 2023
Nov 18 2022
I put rCc34c9e70055e: fips: Mark AES key wrapping as approved. under this task, so that it can be referred in the release note.
Let me describe the changes recorded in this task.
Nov 7 2022
Nov 2 2022
Oct 20 2022
In regards to this issue, we were also notified that the MD API using gcry_md_setkey() can be used to calculate HMACs and it does not have the needed input key length limitation. From the discussion here I read that we would like to keep the internal usage still available so my proposal would be to to add similar check as in gcry_mac_setkey() into the above function. Together with the revert, it is available in the following merge request:
In T6039#164435, @gniibe wrote:I read the document (SP 800-131Ar2) again. I think that it would be irrelevant for PKDF2, because it's password KDF, not deriving additional keys from a Cryptographic Key.
I read the document (SP 800-131Ar2) again. I think that it would be irrelevant for PKDF2, because it's password KDF, not deriving additional keys from a Cryptographic Key.
Oct 19 2022
Please note that: libgcrypt offers ECDH functionality by gcry_pk_encrypt/gcry_pk_decrypt to construct OpenPGP public-key encryption/decryption.
So, this is only for OAEP but not for ECDH? FWIW, GnUPG uses OAEP only for S/MIME.
Oct 18 2022
Oct 14 2022
Pushed the change, although it is not enabled yet (since the feature will be only available by newer libgcrypt, 1.11).
Oct 7 2022
One more nit regarding to the test is the format string for size_t which was using %d instead of %zu. This is fixed by the attached patch:
Oct 4 2022
Also applied to 1.10 branch.
Oct 2 2022
Patch applied to master, thanks.
Sep 30 2022
One nit that I overlooked initially is the memory leak, which is fixed with the following patch:
Sep 27 2022
The specs https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-132.pdf page 10 says specifically:
I've tested the different hw implementations (amd64, arm64, s390x) and they are all ok.
Thank you for your report.
Sep 26 2022
My poor old laptop - its RAM will now have a hard time to run the huge tests ;-)
The test looks good. I hope I changed the API in all the hw optimized implementations.
Sep 25 2022
Fix looks good to me. This could be tested with new long running test (tests/hashtest) that would allocate 4GiB+ pattern block for inputting to gcry_md_write.
Sep 23 2022
Sep 22 2022
Sep 7 2022
Here is a list of possible issues:
Aug 30 2022
TLS 1.3 requires much changes for NTBTLS.
Applied to master and 1.10 branch.
Aug 26 2022
I realized that some AEAD cipher (including GCM) allows arbitrary length for IV.
But it's not good for the API of setup_geniv and geniv.
Aug 25 2022
I pushed the change with documentation.
Aug 24 2022
Aug 23 2022
Thank you for your work on the proposal. I have two comments:
- Do we have some test vector, which can be used in the testsute to test the new API?
- We need to mention the new API in the documentation.
Aug 18 2022
For the record, the changeset in the attached merge request is final and waiting for reviews.
Aug 9 2022
Should go into 1.10 too