In T5975#158113, @werner wrote:I can imagine thar there are use cases for this. Thus I see no problems for the first part.
The second part is imho not a good idea. Libgcrypt is a building block for all kind of software and there are for sure legitimate reasons to use rsa512 (MCUs, short living keys, etc). Thus I think that the decision on the key size should be done by the software using libgcrypt.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
May 26 2022
May 26 2022
May 23 2022
May 23 2022
DemiMarie added a comment to T5975: Allow signature verification using specific RSA keys <2k in FIPS mode.
May 19 2022
May 19 2022
Pushed the change (master and 1.10).
At first, we need to add/enhance new API for KDF in libgcrypt. Currently, the term "KDF" in libgcrypt is used with narrower focus, that is, only for password->key KDF.
May 17 2022
May 17 2022
I do not claim I understand anything of this assembler syntax :)
• werner moved T5975: Allow signature verification using specific RSA keys <2k in FIPS mode from Backlog to Next on the FIPS board.
• werner moved T5964: gnupg should use the KDFs implemented in libgcrypt from Backlog to Next on the FIPS board.
Lets implement it for 2.3
For the second, I wonder if newer xlclang++ compiler works with 1.9.
Thank you for the bug report.
• gniibe added a project to T5976: libgcrypt build failure on HPPA 1.1 (./.libs/libgcrypt.so: undefined reference to `__udiv_qrnnd'): Restricted Project.
Pushed the change.
May 16 2022
May 16 2022
• gniibe added a comment to T5976: libgcrypt build failure on HPPA 1.1 (./.libs/libgcrypt.so: undefined reference to `__udiv_qrnnd').
Thanks for your confirmation.
May 14 2022
May 14 2022
thesamesam added a comment to T5976: libgcrypt build failure on HPPA 1.1 (./.libs/libgcrypt.so: undefined reference to `__udiv_qrnnd').
Okay, confirmed: I was just wrong and the build failure was only ever with --disable-asm (i.e. the log in this bug is the only relevant one). Patch works.
May 13 2022
May 13 2022
• werner closed T5597: First 8 bytes of cache item left in clear in memory after decryption. as Resolved.
Jakuje added a comment to T5975: Allow signature verification using specific RSA keys <2k in FIPS mode.
Ok. Thank you for the clarification. I will drop the second part and keep only the FIPS change in the patch. Merge request already updated.
Thanks. Should be applied.
• werner triaged T5976: libgcrypt build failure on HPPA 1.1 (./.libs/libgcrypt.so: undefined reference to `__udiv_qrnnd') as Normal priority.
• werner triaged T5975: Allow signature verification using specific RSA keys <2k in FIPS mode as Normal priority.
I can imagine thar there are use cases for this. Thus I see no problems for the first part.
May 12 2022
May 12 2022
May 11 2022
May 11 2022
May 10 2022
May 10 2022
Pushed the change. Also, it's backported to 1.10 branch.
Thanks for creating this ticket. I'll reply.
libgcrypt 1.10 is out with the API change for Windows, and we don't see any report (yet).
• gniibe added a project to T5891: EOPNOTSUPP is not defined in mingw.org's MinGW, fails compilation of libgcrypt-1.10.0: Restricted Project.
Pushed the change to master.
May 9 2022
May 9 2022
GCC 11.3 and GCC 12.1 are out with the fix.
May 6 2022
May 6 2022
• gniibe moved T5933: libgcrypt: Simply use BSS (not secure heap) for DRBG instance from Next to Ready for release on the FIPS board.
• gniibe moved T5918: Disable RSA PKCS #1.5 encryption in FIPS mode from Next to Ready for release on the FIPS board.
May 5 2022
May 5 2022
When we implemented this first, Libgcrypt had no appropriate KDF support. I recall that I considered to change this but it turned out the for 2.2 the changes are too large. For 2.3 we will consider such a change.
May 4 2022
May 4 2022
May 3 2022
May 3 2022
• gniibe added a project to T5933: libgcrypt: Simply use BSS (not secure heap) for DRBG instance: backport.
• gniibe moved T5933: libgcrypt: Simply use BSS (not secure heap) for DRBG instance from Backlog to Next on the FIPS board.
• gniibe added a project to T5918: Disable RSA PKCS #1.5 encryption in FIPS mode: Restricted Project.
• gniibe added a project to T5919: libgcrypt tests/basic.c and tests/keygen.c occasionally fail with "error generating RSA key: Number is not prime": Restricted Project.
• gniibe added a project to T5933: libgcrypt: Simply use BSS (not secure heap) for DRBG instance: Restricted Project.
Apr 25 2022
Apr 25 2022
Apr 20 2022
Apr 20 2022
neverpanic added a comment to T5919: libgcrypt tests/basic.c and tests/keygen.c occasionally fail with "error generating RSA key: Number is not prime".
Feedback from the lab is that they'd recommend returning a specific error code that indicates that the prime search failed and then relying on the caller to decide whether to loop or bubble up the error. I'm not sure who we would consider to be the "caller" of the relevant generation function in this case, though.
• werner triaged T5933: libgcrypt: Simply use BSS (not secure heap) for DRBG instance as Normal priority.
Full ack.
Here is my proposal patch:
diff --git a/random/random-drbg.c b/random/random-drbg.c index 5a46fd92..f1cfe286 100644 --- a/random/random-drbg.c +++ b/random/random-drbg.c @@ -341,6 +341,9 @@ enum drbg_prefixes * Global variables ***************************************************************/
Apr 19 2022
Apr 19 2022
• gniibe moved T5918: Disable RSA PKCS #1.5 encryption in FIPS mode from Backlog to Next on the FIPS board.
neverpanic added a comment to T5919: libgcrypt tests/basic.c and tests/keygen.c occasionally fail with "error generating RSA key: Number is not prime".
That sounds reasonable. The FIPS 186-5 draft (https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.186-5-draft.pdf) covers this in section A.1.3, although I'm not quite sure why a lower bound for p was chosen compared to q. The comment that seems to have triggered this change is published on page 68 of https://csrc.nist.gov/CSRC/media/Publications/fips/186/4/final/documents/comments-received-fips186-4-december-2015.pdf by Allen Roginsky. It only contains a suggestion of 20, presumably for both numbers.
Apr 18 2022
Apr 18 2022
• gniibe added a comment to T5919: libgcrypt tests/basic.c and tests/keygen.c occasionally fail with "error generating RSA key: Number is not prime".
I checked FIPS 186-4 (and FIPS 186-5-draft). It is Appendix A 1.3.
Apr 11 2022
Apr 11 2022
I was pointed by Daiki to the following patch in Fedora binutils, which allows listing the fdo packaging metadata, but it does not list any other unknown objects and unfortunately fails hard:
Apr 9 2022
Apr 9 2022
I just copied the value of 0xcafe2a8e and the name .note.fdo.integrity from Daiki's implementation. No other reason.
Apr 8 2022
Apr 8 2022
I have one follow-up is that the readelf chokes on the integrity note for some reason:
$ readelf -n /usr/lib64/libgcrypt.so.20.4.1 Displaying notes found in: .note.fdo.integrity Owner Data size Description FDO 0x00000020 Unknown note type: (0x8e2afeca)
I assume this is just because the readelf does not know this type. I see this type was initially proposed by Daiki, but I did not find any other sources for this magic number so before filling bugs for readelf, do we have some doc why the 0xcafe2a8e is used?
Apr 7 2022
Apr 7 2022
• werner triaged T5919: libgcrypt tests/basic.c and tests/keygen.c occasionally fail with "error generating RSA key: Number is not prime" as Normal priority.
The set_bit is obvious but we should cross check with the specs. In the non-fips mode we also try w/o a limit.
• gniibe added projects to T5919: libgcrypt tests/basic.c and tests/keygen.c occasionally fail with "error generating RSA key: Number is not prime": libgcrypt, FIPS.
I think that it is OK to loop forever until we find a prime.
Apr 5 2022
Apr 5 2022
Apr 1 2022
Apr 1 2022
dannytsen added a comment to T5913: libgcrypt: bug fix for PPC bulk AES-GCM acceleratieration, missing HWF_PPC_ARCH_3_10 in HW feature.
Hi Jussi, yes for some reason, it went missing, I was checking performance numbers and found out the line went missing. Thanks.
jukivili added a comment to T5913: libgcrypt: bug fix for PPC bulk AES-GCM acceleratieration, missing HWF_PPC_ARCH_3_10 in HW feature.
Fixed in master. I rechecked that bulk implementation passes tests with qemu-ppc64le.
jukivili added a comment to T5913: libgcrypt: bug fix for PPC bulk AES-GCM acceleratieration, missing HWF_PPC_ARCH_3_10 in HW feature.
Looks like that line went missing in third/final version of AES-GCM patch at https://dev.gnupg.org/T5700
Mar 31 2022
Mar 31 2022
• gniibe added a comment to T5891: EOPNOTSUPP is not defined in mingw.org's MinGW, fails compilation of libgcrypt-1.10.0.
you also use the CPU cache size on GNU/Linux. Is it important to have that information on MS-Windows?
eliz added a comment to T5891: EOPNOTSUPP is not defined in mingw.org's MinGW, fails compilation of libgcrypt-1.10.0.
The attached patch implements getting the number of processors on MS-Windows.
Mar 30 2022
Mar 30 2022
see rC67b36154f88e for master.
Will add it. The reason I added Brainpool was due to a question on the performacne between Brainpool and other NIST.
Mar 29 2022
Mar 29 2022
Done in master to be 1.11 for server side rC754ad5815b5b: random: Remove use of experimental random daemon.
Done in 1.10.1.
Mar 28 2022
Mar 28 2022
Mar 24 2022
Mar 24 2022
• gniibe added a comment to T5891: EOPNOTSUPP is not defined in mingw.org's MinGW, fails compilation of libgcrypt-1.10.0.
GetNativeSystemInfo. Would you like me to submit a patch that used that in jent_ncpu?
Mar 23 2022
Mar 23 2022
eliz added a comment to T5891: EOPNOTSUPP is not defined in mingw.org's MinGW, fails compilation of libgcrypt-1.10.0.
Yes, I see the problem:
• gniibe added a comment to T5891: EOPNOTSUPP is not defined in mingw.org's MinGW, fails compilation of libgcrypt-1.10.0.
In libgcrypt (1.10), we have a copy of the jitterentropy 3.3.0 from:
http://www.chronox.de/jent.html
or https://github.com/smuellerDD/jitterentropy-library
Mar 22 2022
Mar 22 2022
eliz added a comment to T5891: EOPNOTSUPP is not defined in mingw.org's MinGW, fails compilation of libgcrypt-1.10.0.
Let me ask a more specific question, since you mentioned "support of detecting numbers of CPU and having more than 1 CPUs": can you point me to the code which detects the number of CPUs on MS-Windows systems, where I could learn how that code is affected by having EOPNOTSUPP defined? I will then hopefully understand better what you are saying, and either agree with you that this is unworkable on Windows, or propose a better solution.
eliz added a comment to T5891: EOPNOTSUPP is not defined in mingw.org's MinGW, fails compilation of libgcrypt-1.10.0.
Can you please tell more about how this causes non-working code? MinGW64 defines EOPNOTSUPP to an arbitrary constant which (AFAICT) is never actually returned or used in the MS-Windows runtime. Their documentation, in https://docs.microsoft.com/en-us/cpp/c-runtime-library/errno-constants?view=msvc-170, says:
I had thought that we need to combine hkdf so that key and iv can generate within libgcrypt internally.
Probably, this assumption of mine may be wrong.
• gniibe claimed T5891: EOPNOTSUPP is not defined in mingw.org's MinGW, fails compilation of libgcrypt-1.10.0.
Thank you for your report.
Mar 16 2022
Mar 16 2022
• gniibe closed T5157: libgcrypt: ARM64 Builds on macOS fail, a subtask of T5159: make check fails for libgcrypt on Apple Silicon / ARM Mac, as Resolved.
• gniibe moved T5835: libgcrypt: More robust/portable integrity check from Next to Ready for release on the FIPS board.
Mar 14 2022
Mar 14 2022
• werner triaged T5596: Libgcrypt documentation: corrections to obvious misprints as Normal priority.
Thanks for you patches. Most of them applied cleanly despite that I delayed processing them for half a year.
Mar 12 2022
Mar 12 2022
Mar 9 2022
Mar 9 2022
Mar 8 2022
Mar 8 2022
You are combining two concepts here -- the KDF and the AEAD cipher itself (at least from the FIPS terminology). I would like to avoid mixing these two together in the new API. If you would like to implement the SSH/TLS KDF, I would suggest to use the kdf API you already have. Then we are here left only with a new geniv API to implement. In the T4873 I mentioned example how it is now used in libssh using libgcrypt, which implements the iv increment outside of the libgcrypt:
Mar 7 2022
Mar 7 2022
Is large change to cipher API really needed (new open/encrypt with less flexibility)? How that would affect performance? Would following new interfaces to gcry_cipher API work instead?
- gcry_cipher_setup_geniv(hd, int ivlen, int method): for setting up IV generator with parameters such as IV length, method id (RFC5116, TLS 1.3, SSH, etc), (other parameters?)
- gcry_cipher_geniv(hd, byte *outiv): for generating new iv: generate IV using select method, set IV internally and output generated IV to 'ivout'.
- gcry_cipher_genkey(hd, byte *outkey, int keylen, int method): for generating keys, generate key internally with parameters (method id, other?), setup key internally and output generated key to 'outkey'. (how keys from key exchange protocol be handled? using existing setkey?)
Mar 6 2022
Mar 6 2022
Mar 5 2022
Mar 5 2022
