@gniibe: Would you mind to look at this?
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Mar 21 2023
Mar 20 2023
Mar 8 2023
Thank you.
Applied to both (master and 1.10).
Mar 7 2023
Applied your patch (from gitlab) to both (master and 1.10).
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 24 2023
Thanks
Feb 23 2023
Feb 16 2023
Jan 24 2023
Well, I do not yet see a use case for this. The current rush towards PQC makes it unlikely that newer curves will get in widespread use. Iff we have a large application which requires this curves, we can reconsider,
Jan 19 2023
Sorry, but we can't check all parameters. Why only check that one and not the others or invalid values for ctx. You may do such checks in an interactive environment but not for a general library.
Jan 18 2023
Jan 8 2023
See T6340 in case of build problems.
Jan 5 2023
Dec 16 2022
Thank you for your reply! I'll modify my testcase
I figured out the situation.
Ah, I found that we have very bad example use case in tests/t-mpi-point.c. This should be fixed at first.
Thank you for your report. IIUC, it is called unexpected way, like invalid/wrong KEYPARMS. Possibly, KEYPARMS == NULL, or something like that.
Dec 15 2022
When I look at the stack information, I find that because E->p is not assigned in the function mpi_ec_get_elliptic_curve(), this produces a null pointer,but it didn't get to the branch : if (errc) goto leave;
If you pass NULL to that function, the calling code is wrong. No need for an explicit check in nomralize - check should be done in the public API (if at all).
I tried to fix the segmentation fault, so I added a null pointer check at the end to protect it.
Dec 14 2022
Dec 12 2022
Nov 29 2022
Sure, but this will need adaption in FIPS mode as it fails with:
Patch using SHA1 instead of MD5.
There are other uses of MD5 and thus we can't disable it. For example gpgsm also lists the MD5 fingerprint of certificates because they are still in use at some places.
Well, the modern way, recommended by the FSFE, for license notices in source files is SPDX instead of verbose license notices. https://reuse.software/
Modern way for license notice seems use of URL: https://www.gnu.org/prep/maintain/maintain.html#License-Notices-for-Code
https://www.gnu.org/licenses/gpl-howto.html
Nov 22 2022
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 10 2022
Thanks. There should also be SPDX indentifiers everywhere.
Nov 7 2022
Nov 2 2022
Oct 28 2022
Yep. Closed now.
@jukivili: This has been released with 1.10.0 - shall we close this bug?
Oct 27 2022
Oct 24 2022
Go ahead if you want to do that.
Thank you. I am glad that it is already resolved.
Will this be in the next release of libgcrypt?
Okay. So, I removed gpg-error-config, updated libgcrypt/m4/gpg-error.m4, and then rebuilt configure. And, gcrypt configures and builds.
Thank you for the information.
Actually, it looks as if libgpg-error-1.46 already has that fix.
Thank you for your quick reply.
Yes, it is on macOS.
From the information in gpg-error.pc, I think it's on macOS.
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: