Page MenuHome GnuPG
Feed Advanced Search

Jun 19 2021

Sanmilie added a comment to T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied.

Ok i have seen a problem with a double check here

Jun 19 2021, 7:26 AM · yubikey, Bug Report, scd

Jun 18 2021

Sanmilie added a comment to T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied.

Ok, I test this, this seem can be corrected 90% of all possible interference with another application on multi-applet smartcard in shared readers context. I left you the feel back when have tested… thank for the prompt response.

Jun 18 2021, 6:05 PM · yubikey, Bug Report, scd
gniibe added a comment to T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied.

For the problem of external application switch, please test this:

diff --git a/scd/app-common.h b/scd/app-common.h
index dffe1200d..d6e6f4c0a 100644
--- a/scd/app-common.h
+++ b/scd/app-common.h
@@ -194,6 +194,8 @@ struct app_ctx_s {
                       void *pincb_arg);
     gpg_error_t (*with_keygrip) (app_t app, ctrl_t ctrl, int action,
                                  const char *keygrip_str, int capability);
+    gpg_error_t (*check_aid) (app_t app, ctrl_t ctrl,
+                              const unsigned char *aid, size_t aidlen);
   } fnc;
 };
Jun 18 2021, 4:58 AM · yubikey, Bug Report, scd
gniibe added a comment to T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied.

Here is the reference to GID specification:
https://docs.microsoft.com/en-us/previous-versions/windows/hardware/design/dn642100(v=vs.85)?redirectedfrom=MSDN

Jun 18 2021, 3:56 AM · yubikey, Bug Report, scd
gniibe added a project to T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied: yubikey.

Let me add the tag "yubikey".
I think that it could be solved in different level, if I were the device manufacturer; And it would give users the best solution.

Jun 18 2021, 3:16 AM · yubikey, Bug Report, scd

Jun 17 2021

Reiner added a comment to T5491: Console output failure with no-unicode font: GnuPG 2.2.28 is not working with »encrypt-to« in gpg.conf without specifying another recipient..

Hello Mr. Koch,

Jun 17 2021, 11:45 PM · gnupg (gpg22), Windows, Bug Report
werner added a comment to T5433: libgcrypt: Do not use SHA1 by default.

That patch consists an ABI change. We might consider this for 1.10 but we can't do such a change in 1.9.

Jun 17 2021, 11:44 AM · FIPS, libgcrypt, Bug Report
werner added a comment to T5489: GpgME Built by mingw64 didn’t seem to correctly recognize the configuration information provided by gpgconf .

Please try the distributed binary version of gpgme from GnuPG or Gpg4win (which is usually a snapshot). As you might now, we don't support building on Windows - it may or may not work, we have no idea and don't suggest that.

Jun 17 2021, 11:42 AM · gpgme, Bug Report
werner added projects to T5491: Console output failure with no-unicode font: GnuPG 2.2.28 is not working with »encrypt-to« in gpg.conf without specifying another recipient.: Windows, gnupg (gpg22).

Are you using Powershell or another non-standard shell? Which windows version are you using? Do you use default-key in gpg.conf? Do you have a smartcard inserted?

Jun 17 2021, 11:28 AM · gnupg (gpg22), Windows, Bug Report
gniibe added a comment to T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied.

If something more user friendly is required, it could be possible for higher layer (SCDaemon's command handling) to check verification status beforehand, and do error recovery there.

Jun 17 2021, 9:53 AM · yubikey, Bug Report, scd
gniibe added a comment to T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied.

I don't think we should do automatic error recovery from 6982 to retry decryption/signing, inside CMD_PSO (0x2A) operation.

Jun 17 2021, 9:48 AM · yubikey, Bug Report, scd
gniibe lowered the priority of T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied from High to Normal.
Jun 17 2021, 9:44 AM · yubikey, Bug Report, scd
werner claimed T5490: gcry_pk_get_param aborts program with error on "Curve25519".

Thanks for the report. Will soon be fixed.

Jun 17 2021, 9:21 AM · libgcrypt, Bug Report
Sanmilie added a comment to T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied.

I have tried the case 1 with log activated
Windows switches applet for signing Adobe Acrobat doc.
This is the log from agent - Say Bad NIP but he never tries to use the nip SCDaemon have tried to decrypt only.
gpg-agent[8496]: DBG: agent_put_cache '1//'.-1 (mode 6) requested ttl=-1
gpg-agent[8496]: DBG: chan_0x000001c0 <- S SERIALNO D2760001240103045343000000010000
gpg-agent[8496]: DBG: chan_0x000001c0 <- OK
gpg-agent[8496]: DBG: chan_0x000001c0 -> KEYINFO BBD342CA5B0F978DA17F2AD9F5A1E95FF50C129E
gpg-agent[8496]: DBG: chan_0x000001c0 <- S KEYINFO BBD342CA5B0F978DA17F2AD9F5A1E95FF50C129E T D2760001240103045343000000010000 OPENPGP.2
gpg-agent[8496]: DBG: chan_0x000001c0 <- OK
gpg-agent[8496]: DBG: chan_0x000001c0 -> SETDATA 4F0E7600C2C497A06288DF49B7EA1BC723E04FAC360D6D6C4F4DC1B48DEC13A53556229CDC4562E349C9B5E71365561A941761D1D2C709A16488903AA60925A7B103DEF6B6AE46814370AE815BFBE4A30EC443904C1D63E21ABF5B0B39B8484F3CB4235AEDA04F78F14308AE3DEF52309FB745BC65E3075D19C01C789C8F58931D957D7C26BE7DCEF6B880B362251246FA4E1A2830A13AD94635CC4CE14B0F253481F38C39BA5CC748FDF03F9D936B9C8DE6BF7E49AFF4BE3A84A4E4547FADD4C9F1634416641FF804F3503CC924098F1C4CAA908FD272737312A4D5BE59C644EE1633AA248DC996EF67BA5E087DB6312BD2014BFAFD62FD08C7D45E3AFD431C
gpg-agent[8496]: DBG: chan_0x000001c0 <- OK
gpg-agent[8496]: DBG: chan_0x000001c0 -> PKDECRYPT BBD342CA5B0F978DA17F2AD9F5A1E95FF50C129E
gpg-agent[8496]: DBG: chan_0x000001c0 <- ERR 100663383 Mauvais code personnel <SCD>
gpg-agent[8496]: smartcard decryption failed: Mauvais code personnel
gpg-agent[8496]: command 'PKDECRYPT' failed: Mauvais code personnel <SCD>
gpg-agent[8496]: DBG: chan_0x00000270 -> ERR 100663383 Mauvais code personnel <SCD>

Jun 17 2021, 8:53 AM · yubikey, Bug Report, scd
gniibe added a comment to T5477: Translation Typo and I Want To Create PR.

Thank you.

Jun 17 2021, 4:33 AM · gnupg, i18n, Bug Report

Jun 16 2021

jrg.sichermann renamed T5492: Kleopatra does not report error when calculating checksums and checksum file can not be written from Kleopatra does not report error when calculating checksums an checksum file can not be written to Kleopatra does not report error when calculating checksums and checksum file can not be written.
Jun 16 2021, 10:40 PM · kleopatra, gpgex, Bug Report, gpg4win
jrg.sichermann created T5492: Kleopatra does not report error when calculating checksums and checksum file can not be written.
Jun 16 2021, 10:39 PM · kleopatra, gpgex, Bug Report, gpg4win
Reiner created T5491: Console output failure with no-unicode font: GnuPG 2.2.28 is not working with »encrypt-to« in gpg.conf without specifying another recipient..
Jun 16 2021, 7:30 PM · gnupg (gpg22), Windows, Bug Report
rmculpepper created T5490: gcry_pk_get_param aborts program with error on "Curve25519".
Jun 16 2021, 7:27 PM · libgcrypt, Bug Report
Saturneric added a comment to T5489: GpgME Built by mingw64 didn’t seem to correctly recognize the configuration information provided by gpgconf .

Let me explain this problem more clearly. GPGME did not correctly receive and parse the output from gpgconf. Looking at the log file, EOF was generated when 4096 bits were read. So in engine info, although the path is correct, the identification of the version number is 1.0.0, and there is only gpgconf in the protocol, but there are no protocols such as gpg, assume, etc., which just means that gpgme does not correctly identify the output of gpgconf in this environment Information to find other protocols.
At the same time, I verified whether the output in gpgconf and the path of the related configuration are correct (whether there is a corresponding tool under the path), these are all right, which is very strange.

Jun 16 2021, 6:44 PM · gpgme, Bug Report
Sanmilie added a comment to T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied.

When a card sends 0x6982 in general rule is not really an error is a warning to say, your security environment was not correctly initialized.
This is true with almost applet. (PIV – GIDS – OPenPGP)
The instruction 0x2A to perform security operation return 0x6982 when pin is not authenticated or key is badly selected. This not decrement pin counter.

Jun 16 2021, 6:07 PM · yubikey, Bug Report, scd
Saturneric added a comment to T5489: GpgME Built by mingw64 didn’t seem to correctly recognize the configuration information provided by gpgconf .

This is the log file output after the GPGME DEBUG environment variable is set.

Jun 16 2021, 5:35 PM · gpgme, Bug Report
werner added a project to T5489: GpgME Built by mingw64 didn’t seem to correctly recognize the configuration information provided by gpgconf : gpgme.

You should run your test program with GPGME_DEBUG set. This gives some insight. The code you posted is too sparse to actually see what you are doing or want to do or what is the bug. Maybe it is better to ask the gnupg-devel ML?

Jun 16 2021, 5:32 PM · gpgme, Bug Report
Saturneric created T5489: GpgME Built by mingw64 didn’t seem to correctly recognize the configuration information provided by gpgconf .
Jun 16 2021, 5:16 PM · gpgme, Bug Report
gniibe added a comment to T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied.

Possible way would be: (for newer card/token of OpenPGPcard 3.4 or later) before crypto operations, we can ask card/token if authentication state is consistent to the one of scdaemon and if not reselect AID.

Jun 16 2021, 10:30 AM · yubikey, Bug Report, scd
gniibe added a comment to T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied.

I'd like to support your use case. Could you please tell me about: How can we distinguish normal failure of 6982 and unusual failure of other application interference which results 6982?

Jun 16 2021, 8:50 AM · yubikey, Bug Report, scd

Jun 15 2021

bernhard added a comment to T5287: mkportable doesn't work (due to missing files in share/locale/eu/ ?).

@FloorVeil thanks for testing!

Jun 15 2021, 9:25 AM · Bug Report, gpg4win
bernhard closed T5287: mkportable doesn't work (due to missing files in share/locale/eu/ ?) as Resolved.

There is another report that it works in 3.1.16 again in
https://wald.intevation.org/forum/forum.php?thread_id=2044&forum_id=84&group_id=11

Jun 15 2021, 9:25 AM · Bug Report, gpg4win
FloorVeil added a comment to T5287: mkportable doesn't work (due to missing files in share/locale/eu/ ?).

Not reproduced on 3.1.16.

Jun 15 2021, 5:02 AM · Bug Report, gpg4win
gniibe triaged T5487: GnuPG 2.2.28 not working with Yubikey NEO as High priority.

I set the priority 'High' as Yubikey NEO is the last one with source code available, IIUC.

Jun 15 2021, 1:41 AM · yubikey, gnupg (gpg22), Bug Report
gniibe added a comment to T5487: GnuPG 2.2.28 not working with Yubikey NEO.

@kianga
Thanks for your log.

Jun 15 2021, 1:40 AM · yubikey, gnupg (gpg22), Bug Report

Jun 14 2021

kianga added a comment to T5487: GnuPG 2.2.28 not working with Yubikey NEO.

I was just about to open a similar bug report, but I think this might be related. I’m also having trouble getting my Yubikey NEO to work with the latest update, however my log output looks different (see below) and this is on Windows (10 Pro, 21H1, build 19043.1055).

Jun 14 2021, 8:46 PM · yubikey, gnupg (gpg22), Bug Report
gbschenkel added a comment to T5487: GnuPG 2.2.28 not working with Yubikey NEO.

Thank you @werner I will apply the patch and recompile the .28 version for myself.

Jun 14 2021, 6:45 PM · yubikey, gnupg (gpg22), Bug Report
werner changed the status of T5487: GnuPG 2.2.28 not working with Yubikey NEO from Open to Testing.

Fix will eventually go into 2.2.29. If there is enough public demand we will do a new Windows installer earlier.

Jun 14 2021, 11:39 AM · yubikey, gnupg (gpg22), Bug Report
guzhongren added a comment to T5477: Translation Typo and I Want To Create PR.

Hi, I updated the whole file, PLZ review. https://dev.gnupg.org/D533

Jun 14 2021, 5:26 AM · gnupg, i18n, Bug Report
gniibe renamed T5487: GnuPG 2.2.28 not working with Yubikey NEO from GnuPG 2.2.28 not working with Yubikey 4 NEO to GnuPG 2.2.28 not working with Yubikey NEO.
Jun 14 2021, 3:42 AM · yubikey, gnupg (gpg22), Bug Report
gniibe added a comment to T5487: GnuPG 2.2.28 not working with Yubikey NEO.

I think that Yubikey NEO is older than Yubikey 4.

Jun 14 2021, 3:41 AM · yubikey, gnupg (gpg22), Bug Report
gniibe added a comment to T5487: GnuPG 2.2.28 not working with Yubikey NEO.

Fixed in rG01a413d5235f: scd: Error code map fix for older Yubikey..
New code for Yubikey 4 or later causes wrong interaction for Yubikey NEO in 2.2.28.

Jun 14 2021, 3:36 AM · yubikey, gnupg (gpg22), Bug Report
gniibe claimed T5487: GnuPG 2.2.28 not working with Yubikey NEO.

Thank you for your report.

Jun 14 2021, 3:34 AM · yubikey, gnupg (gpg22), Bug Report

Jun 13 2021

gniibe added a comment to T5477: Translation Typo and I Want To Create PR.

Thank you for your suggestion and making a patch.

Jun 13 2021, 11:17 PM · gnupg, i18n, Bug Report
werner closed T5488: PGP KEY BLOCKED as Invalid.
Jun 13 2021, 8:52 PM · Bug Report, gpg4win
AliceMadness created T5488: PGP KEY BLOCKED.
Jun 13 2021, 8:10 PM · Bug Report, gpg4win
guzhongren added a comment to T5477: Translation Typo and I Want To Create PR.

Sorry, I think, it is more official to update from 把密钥导出到一个公钥服务器上 to 将密钥导出到一个公钥服务器上 in the Chinese doc scenario. 😄😄😄😄

Jun 13 2021, 4:51 PM · gnupg, i18n, Bug Report
gbschenkel created T5487: GnuPG 2.2.28 not working with Yubikey NEO.
Jun 13 2021, 4:13 PM · yubikey, gnupg (gpg22), Bug Report

Jun 12 2021

werner closed T5486: Typo in gpg-card --help as Resolved.

Thanks. Commited as rG755a5f1a0e3

Jun 12 2021, 6:36 PM · Bug Report
nephirus created T5486: Typo in gpg-card --help.
Jun 12 2021, 12:01 PM · Bug Report

Jun 11 2021

larskanis added a comment to T2312: GnuPG 2.1 migration fails due to permissions but appears to succeed.

Thank you Werner for fixing this! We just came across the group permission issue in a multi-user environment and all we had to do was to upgrade to gnupg >=2.2.24.

Jun 11 2021, 12:43 PM · gnupg, Bug Report
Sanmilie triaged T5484: SCDaemon Not reselect applet and reauthenticate when the card send Security Not Sastisfied as High priority.
Jun 11 2021, 8:02 AM · yubikey, Bug Report, scd
gniibe closed T5477: Translation Typo and I Want To Create PR as Resolved.
Jun 11 2021, 5:51 AM · gnupg, i18n, Bug Report

Jun 10 2021

gniibe added a comment to T5477: Translation Typo and I Want To Create PR.

Pushed the change.

Jun 10 2021, 1:18 PM · gnupg, i18n, Bug Report
gniibe added a comment to T5477: Translation Typo and I Want To Create PR.

Considering the history of the translation, I concluded that it should be:
把密钥导出到一个公钥服务器上
(the typo was G-A where B-A was expected.)

Jun 10 2021, 1:08 PM · gnupg, i18n, Bug Report
gniibe triaged T5477: Translation Typo and I Want To Create PR as Normal priority.
Jun 10 2021, 3:37 AM · gnupg, i18n, Bug Report
gniibe added a comment to T5477: Translation Typo and I Want To Create PR.

@guzhongren
This is not GitHub, so, if you want, you need to learn how to submit your change in the form of patch, by using git.

Jun 10 2021, 3:37 AM · gnupg, i18n, Bug Report

Jun 9 2021

werner assigned T5477: Translation Typo and I Want To Create PR to gniibe.

Clone and checkout the branch as usual with Git. There is no web editor etc like you might know from github. For your request we need to wait for someone to check your request.

Jun 9 2021, 7:31 PM · gnupg, i18n, Bug Report
guzhongren added a comment to T5477: Translation Typo and I Want To Create PR.

Hey, I found the typo which I reported hasn't been fixed https://dev.gnupg.org/source/gnupg/browse/master/po/zh_CN.po$1962

Jun 9 2021, 4:02 PM · gnupg, i18n, Bug Report
werner added a comment to T5477: Translation Typo and I Want To Create PR.

2.2.23 is an old version. We will soon release 2.2.28 which comes with an updated Simplified Chinese Translation, see rGb0a7132856

Jun 9 2021, 3:47 PM · gnupg, i18n, Bug Report
guzhongren created T5477: Translation Typo and I Want To Create PR.
Jun 9 2021, 3:33 PM · gnupg, i18n, Bug Report
AliceMadness created T5476: PGP KEY BLOCKED.
Jun 9 2021, 3:20 PM · Support, gpg4win

Jun 7 2021

jarregui added a comment to T5472: Kleopatra not storing decrypted files.

These are the versions:

Jun 7 2021, 9:27 AM · Support, kleopatra, Bug Report
ikloecker added a comment to T5472: Kleopatra not storing decrypted files.

Which version of Kleopatra are you using? And which operating system, e.g. Windows 10?

Jun 7 2021, 9:11 AM · Support, kleopatra, Bug Report
gniibe added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

@dkg
If we support native X25519 format, multiple representations will be possible (there are 32 ways, at least) for a single secret key, because it's the feature of X25519.

Jun 7 2021, 7:21 AM · Support, gnupg, OpenPGP
gniibe added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

@werner
My patch is for the case if it's better to accept such a key of OpenPGP.
I don't know if it's better or not (yet). The purpose of this patch is to show the point where OpenPGP secret part translates into libgcrypt secret key, concretely.

Jun 7 2021, 2:57 AM · Support, gnupg, OpenPGP

Jun 4 2021

dkg added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

Do we want to encourage multiple cleartext wire-format representations of the same secret key?

Jun 4 2021, 3:56 PM · Support, gnupg, OpenPGP
jarregui created T5472: Kleopatra not storing decrypted files.
Jun 4 2021, 12:52 PM · Support, kleopatra, Bug Report
onickolay added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

JFYI: Original curve25519-donna (as well as Botan library, and OpenSSL) tweaks bits inside of the exponentiation function, so secret keys with or without tweaked bits would be equivalent and produce the same public key.

Jun 4 2021, 10:57 AM · Support, gnupg, OpenPGP
werner added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

gniibe: Can you explain why an import shall modify the secret key? Form my understanding it is an invalid secret key and thus it can't be used. An import operation is different than the key generation.

Jun 4 2021, 7:33 AM · Support, gnupg, OpenPGP
gniibe added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

For an implementation of Curve25519 routine, it is needed to tweak those bits.

Jun 4 2021, 6:52 AM · Support, gnupg, OpenPGP
gniibe added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

Better to have in-line:

diff --git a/agent/cvt-openpgp.c b/agent/cvt-openpgp.c
index 53c88154b..b1d43227a 100644
--- a/agent/cvt-openpgp.c
+++ b/agent/cvt-openpgp.c
@@ -159,7 +159,21 @@ convert_secret_key (gcry_sexp_t *r_key, int pubkey_algo, gcry_mpi_t *skey,
                EdDSA flag.  */
             format = "(private-key(ecc(curve %s)(flags eddsa)(q%m)(d%m)))";
           else if (!strcmp (curve, "Curve25519"))
-            format = "(private-key(ecc(curve %s)(flags djb-tweak)(q%m)(d%m)))";
+            {
+              unsigned int nbits;
+              unsigned char *buffer = gcry_mpi_get_opaque (skey[1], &nbits);
+              unsigned char d[32];
+
+              if (nbits != 256)
+                return gpg_error (GPG_ERR_BAD_SECKEY);
+
+              memcpy (d, buffer, 32);
+              d[0] = (d[0] & 0x7f) | 0x40;
+              d[31] &= 0xf8;
+              gcry_mpi_release (skey[1]);
+              skey[1] = gcry_mpi_set_opaque_copy (NULL, d, 256);
+              format = "(private-key(ecc(curve %s)(flags djb-tweak)(q%m)(d%m)))";
+            }
           else
             format = "(private-key(ecc(curve %s)(q%m)(d%m)))";
Jun 4 2021, 6:00 AM · Support, gnupg, OpenPGP
gniibe added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

"Curve25519" in libgcrypt was implemented before the standardization of X25519. There are two problems here: endianess and tweaking-bits.

Jun 4 2021, 5:59 AM · Support, gnupg, OpenPGP

Jun 3 2021

Suertzz added a comment to T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.

Please excuse my late reply. I was busy with other things over the last few weeks.

Yes, putting disable-ccid into ~/.gnupg/scdaemon.conf works for me with GnuPG 2.3.1 under macOS Catalina (10.15).

I still don't understand what the problem is/was, so I cannot judge whether it's better to recommend this manual configuration for Mac users or to disable CCID by default on macOS.

Jun 3 2021, 11:20 PM · MacOS, yubikey, Bug Report
Saturneric added a comment to T5470: T5454 Continue Gpgme still shows secret flag even when the secret key content is missing.

I tried again after cloning the master branch, and I finally figured it out. Sorry for the trouble caused by this irrelevant question just submitted. thanks again.

Jun 3 2021, 9:36 PM · Bug Report
werner added a comment to T5470: T5454 Continue Gpgme still shows secret flag even when the secret key content is missing.

Please read T5454 again. To get the listing I showed you need to use the latest gpgme from Git master.

Jun 3 2021, 9:24 PM · Bug Report
werner merged task T5470: T5454 Continue Gpgme still shows secret flag even when the secret key content is missing into T5454: Failed to sign with subkey with a signature function using gpgme_op_keysign.
Jun 3 2021, 9:23 PM · Bug Report
Saturneric created T5470: T5454 Continue Gpgme still shows secret flag even when the secret key content is missing.
Jun 3 2021, 8:19 PM · Bug Report
dkg added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

I've mentioned this interop issue (and tried to propose clarifying language for the revised standard) in the IETF OpenPGP WG mailing list.

Jun 3 2021, 3:04 PM · Support, gnupg, OpenPGP
KasparEtter added a comment to T5415: YubiKey no longer recognized in GnuPG 2.3.1 on macOS 10.15.7.

Please excuse my late reply. I was busy with other things over the last few weeks.

Jun 3 2021, 9:58 AM · MacOS, yubikey, Bug Report
gniibe claimed T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..
Jun 3 2021, 8:26 AM · Support, gnupg, OpenPGP

Jun 2 2021

onickolay added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

@dkg I mentioned it just because it was added as (part of the?) solution for Ed25519 issue, i.e. it is not something related to parsing of interoperable format but some further processing when secret key part is sent to the gpg-agent in some intermediate format.

Jun 2 2021, 9:56 PM · Support, gnupg, OpenPGP
dkg added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

I think rGba321b60bc3bfc29dfc6fa325dcabad4fac29f9c has nothing to do with interoperable formats -- how things are stored in ~/.gnupg/private-keys-v1.d is unrelated to the interoperable transferable secret key format specified in 4880 or its revisions.

Jun 2 2021, 9:51 PM · Support, gnupg, OpenPGP
werner removed a project from T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG.: OpenPGP.

Right. However, the SOS thing should then also be used for secret keys. (FWIW, I wrote my last comment while you were writing yours).

Jun 2 2021, 5:14 PM · Support, gnupg, OpenPGP
onickolay added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

@werner isn't it used just for the public key? The secret x25519 key, exported by GnuPG, looks as following (in the way it is stored in file):

Jun 2 2021, 5:11 PM · Support, gnupg, OpenPGP
werner updated subscribers of T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

We invented the 0x40 compression flag to declare that as native curve point format. With the introduction of 448 things got more complicated due to the new IETF statdards for this curev. This is the reason for @gniibe's proposal for a Simple Octet String (SOS) as a new data type in OpenPGP.

Jun 2 2021, 5:06 PM · Support, gnupg, OpenPGP
onickolay added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

Investigated it more, and it looks problem is not in incorrect endianness. Exporting x25519 secret subkey from the GnuPG showed up that we still need to change byte order.
After some experiments I ended up with the following self-explaining code piece, which makes RNP-generated keys to work with GnuPG for import:

repeat:
    if (botan_privkey_create(&pr_key, "Curve25519", "", rng_handle(rng))) {
        goto end;
    }
    /* botan returns key in little-endian, while mpi is big-endian */
    if (botan_privkey_x25519_get_privkey(pr_key, keyle.data())) {
        goto end;
    }
    if ((keyle[31] != 0x45) || (keyle[0] != 0x40)) {
        botan_privkey_destroy(pr_key);
        goto repeat;
    }
    if (botan_privkey_export_pubkey(&pu_key, pr_key)) {
        goto end;
    }
Jun 2 2021, 5:04 PM · Support, gnupg, OpenPGP
werner moved T5440: _DARWIN_C_SOURCE kind of "must" be 1, not "900000L" from For 1.9 to Backlog on the libgcrypt board.
Jun 2 2021, 12:57 PM · MacOS, libgcrypt, Bug Report
werner moved T5440: _DARWIN_C_SOURCE kind of "must" be 1, not "900000L" from For 1.8 to For 1.9 on the libgcrypt board.
Jun 2 2021, 12:56 PM · MacOS, libgcrypt, Bug Report
werner moved T5440: _DARWIN_C_SOURCE kind of "must" be 1, not "900000L" from Backlog to For 1.8 on the libgcrypt board.
Jun 2 2021, 12:56 PM · MacOS, libgcrypt, Bug Report
werner closed T5195: Incorrect HWCAP2 check for AArch32 as Resolved.

Fixed for 1.8.8

Jun 2 2021, 12:56 PM · libgcrypt, backport, Bug Report
onickolay added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

Thanks for investigations! Indeed, we do change byte order when storing/loading private key, as MPI should be big-endian, while curve25519 private key is little endian.
Do I correctly understand that we should store it in the MPI as it is (like with Ed25519)? It would be nice to clarify that in the RFC draft.
Another thing is that in my test even if byte order is not reversed in the secret key (including the attached test key), GnuPG still asks for password, reporting "error sending to agent: Bad passphrase".

Jun 2 2021, 11:47 AM · Support, gnupg, OpenPGP
werner reopened T5462: gpgconf: Make gpg/keyserver option available again, a subtask of T5461: Kleopatra: Does not change OpenPGP keyserver configured in gpg.conf, as Open.
Jun 2 2021, 7:59 AM · Restricted Project, kleopatra, Bug Report
werner closed T5462: gpgconf: Make gpg/keyserver option available again, a subtask of T5461: Kleopatra: Does not change OpenPGP keyserver configured in gpg.conf, as Resolved.
Jun 2 2021, 7:59 AM · Restricted Project, kleopatra, Bug Report
gniibe added a comment to T5369: GnuPG build on Apple with Clang.

jitterentropy is also used in Linux kernel, and some people use clang to build it these days. So, I checked the kernel's one. It is simply compiled -O0 by Makefile, and there's no pragma line now (as of v5.13).

Jun 2 2021, 3:16 AM · libgcrypt, MacOS, Bug Report
dkg added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

The problem here appears to be that the "MPI" of the curve25519 secret key is not actually a standard-issue big-endian OpenPGP MPI -- it's an opaque bytestring expected to be passed to the underlying "native" implementation of x25519, in the same way that the secret key is handled for Ed25519.

Jun 2 2021, 1:35 AM · Support, gnupg, OpenPGP
dkg added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

investigating the subkey in python:

Jun 2 2021, 1:20 AM · Support, gnupg, OpenPGP
dkg added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

looks to me like you've got the byte ordering of the Curve25519 secret subkey reversed from the way that GnuPG expects it.

Jun 2 2021, 1:16 AM · Support, gnupg, OpenPGP
dkg added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

fwiw, gpg-agent complains that the keys don't match:

Jun 2 2021, 1:06 AM · Support, gnupg, OpenPGP

Jun 1 2021

werner triaged T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG. as High priority.
Jun 1 2021, 3:46 PM · Support, gnupg, OpenPGP
onickolay created T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..
Jun 1 2021, 1:03 PM · Support, gnupg, OpenPGP
ikloecker closed T5461: Kleopatra: Does not change OpenPGP keyserver configured in gpg.conf as Resolved.

Fixed for gpg < 2.3. To make the fix also work for gpg 2.3, T5462: gpgconf: Make gpg/keyserver option available again needs to be fixed.

Jun 1 2021, 11:43 AM · Restricted Project, kleopatra, Bug Report
ikloecker moved T5461: Kleopatra: Does not change OpenPGP keyserver configured in gpg.conf from Restricted Project Column to Restricted Project Column on the Restricted Project board.
Jun 1 2021, 11:43 AM · Restricted Project, kleopatra, Bug Report
ikloecker moved T5461: Kleopatra: Does not change OpenPGP keyserver configured in gpg.conf from Restricted Project Column to Restricted Project Column on the Restricted Project board.
Jun 1 2021, 11:43 AM · Restricted Project, kleopatra, Bug Report