Ignoring the error seems to be the best choice. I also think that --force should not overwrite a shadow key file. It seems safer to explicitly delete the key first. A --force option for READKEY does not sound right.
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Advanced Search
Mar 14 2023
I did some reworking and the outcome of the READKEY command is now (agent log):
I checked it: There was an empty bin/gpgconf.ctl, and there still is.
Trying it again today, I still get error messages most notably about failed self-tests, but surprisingly the window is no longer empty.
Instead it seems to take an eternity (minutes, actually still not finished after three minutes) until the certificate cache is loaded.
Maybe the problem is the "Check Point Endpoint Security" being active on the client. It looks as if it prevents use of Kleopatra.
As I don't have administrator rights ("for security reasons"), I cannot analyze what's actually going on.
Mar 13 2023
It seems that you are missing the step "Create a new file called gpgconf.ctl in the folder Gpg4win_Portable/bin."
I am pretty sure we have the same problem in 2.4 - due to different access patterns it might not exhibit itself.
Mar 11 2023
Mar 10 2023
I've run into a variant of this, too. If I generate they key just using (genkey (ecc (curve "Ed25519"))), it is recognized as an encryption key. One needs to use (genkey (ecc (curve "Ed25519")(flags eddsa))).
Its not used, so it can't harm.
Also recall that Antivirus software needs to search for a competitive advantage over other vendors and in particular over Windows Defender. Thus they need to show some extra positives compared to the Windows Defender. Who care whether this is a false positive - ppl like to get some evidence that their new AV software has a (phoney) advantage.
Many thanks for the information. I suspected it also, but wanted your assessment.
Well, virus checkers aren't perfect. If 1 out of 65 checkers reports a finding, then the probability that this finding is a false positive is very high. You would better report this to the vendor of NANO-Antivirus, so that they can fix the false positive warning.
Mar 8 2023
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
Thank you!
Looks like the TERM alacritty was the culprit, I'm ssh'ing into the freebsd machine from my archlinux laptop.
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.
I don't know what is going here really. I have installed alacritty and I can reproduce T4924 easily if I provide an empty passphrase on an narrow window. At least I get pinentry-curses popping up.
@ikloecker not sure we are there yet. I was able to set a weak password on a terminal that was 42 characters wide. I think the problem here is unrelated to FreeBSD but to the fact that @capitol uses alacritty https://github.com/alacritty/alacritty
If agent_write_shadow_key does now also check for an existing private key file, then I'd replace following code in cmd_readkey:
if (agent_key_available (grip)) { /* Shadow-key is not available in our key storage. */ rc = agent_write_shadow_key (0, grip, serialno, keyid, pkbuf, 0, dispserialno); } else { /* Shadow-key is available in our key storage but ne check * whether we need to update it with a new display-s/n or * whatever. */ rc = agent_write_shadow_key (1, grip, serialno, keyid, pkbuf, 0, dispserialno); }
with a simple call of agent_write_shadow_key (removing the maybe_update flag) and let agent_write_shadow_key do all checking for an already existing private key file and whether it's a stub file that needs updating.
I think we should make it explicit - this will be safer. As of now agent_write_shadow_key will do a check only in its special update mode which should be okay for now.
I can't see any explicit thing there.
$term is 'alacritty', stty -a is:
speed 38400 baud; 54 rows; 180 columns; lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff -ixany -imaxbel -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl tab0 -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf rtsdtr cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>; eol2 = <undef>; erase = ^?; erase2 = ^H; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W;
Mar 5 2023
The agent.log says that the error comes from pinentry-curses:
Hi, thanks for the quick turnaround
I tried to reproduce on my FreeBSD 14 machine and didn't get an error....
Mar 4 2023
Mar 3 2023
Make sure that the fix doesn't break "gpg --edit-key; keytocard; save" which explicitly does replace the private key with a stub file.
I doubt that the bug is only in 2.2. The code in 2.4 is different but it may happen there anyway. It depends on the usage pattern.
Mar 2 2023
Agreed
I think the patch is okay.
Mar 1 2023
Feb 28 2023
Since I have closed T6377 which had high priority I am assigning this issue the same prio. Which I also think is appropriate.
Feb 27 2023
The code has meanwhile been reworked and the mentioned test server is not anymore available
Thanks for the report; the regression happened due to fixing T6135.
Feb 26 2023
Please use
gpgtar -C /home/matt/data ....
instead of using an absolute name. This makes things much easier to implement in a secure way: You don't want to have absolute file names in the tarball and mapping them to relative names is not easy or even impossible in case of, say "/home/foo/x.data /home/bar/x.data". Keep in mind that gpgtar does also not handle symlinks and other special files.
Feb 24 2023
I should probably add that Kleopatra calls this command when reading a smart card to create the key stubs if necessary. Kleopatra does this since gpg4win-3.1.24 (according to the tags) and the KDE Gear 22.04 release (see T5782: Kleopatra: Smartcard unusable secret key until used via command line).
Your report lacks any useful information starting with the version of gpg you are using. Did this ever work? What did you change? Did you probably upgrade the system and have previously been using gpg1, but are now using gpg2?
Thanks
Feb 23 2023
Feb 21 2023
The application probably doesn't support this curve, the changelog only mentions Curve25519 and NIST P-256. Also Kleopatra lists only these two curves when generating a key from the card. Upon further inspection, the 0xFA DO listing the supported algorithms only has RSA 2048, RSA 4096, nistp256, ed255519 and cv25519
This is a Nitrokey 3A with the firmware 1.2.2-alpha.20221130. I'll check with the vendor.
Sure that you specific card/implementation of Nitrokey supports this curve? The card application uses a vendor from the test card range - this it is likely that it is some Javacard implementaion or it is an old gnuk firmware on the nitrokey basic.
Changing the key attributes didn't help unfortunately:
There must be some regression in the code which changes the key attributes. Please try
"gpg --card-edit" admin, key-attr
and switch to nistp384.
I also tried to import the key with the gpg-card writekey command and I got the same error.
Same error message but probably a different cause, in this case the card was factory reset before importing.
Looks similar to T6378. Can you provide the output of
Feb 17 2023
well, this user made a backup and it went wrong anyway ;-) See T6377
Feb 16 2023
Thanks. please give a few days.
created ~/.gnupg/gpg-agent.conf containing:
debug ipc,cache debug-pinentry log-file socket://
Okay, I see. The commands above are a real reproducer and not standalone examples. Then yes, you should get a pinentry only for the first gpg -d (as long as the keys are still in the cache). I am lacking macOS/homebrew stuff to replicate this. What you can do is to put
Feb 15 2023
I may be reading your comment wrong, but the problem here is not multiple pinentry prompts, or multiple gpg-agents present.
Although gpg-agent launching is protected by a file system lock, there is indeed a small race related to the pinentry. The invocation of the pinentries is serialized but if a second pinentry is requested while the first pinentry has not yet returned and put the passphrase into the cache, the second pinentry will be called anyway. Fixing this not easy and should rarely be a problem. The mitigation is to do a dummy decryption to seed the cache or use a custom pinentry.
Hier is a log file from GpgOL (+Code verfolgung)