Page MenuHome GnuPG

gnupg (gpg22)Milestone
ActivePublic

Members

  • This project does not have any members.
  • View All

Watchers

  • This project does not have any watchers.
  • View All

Recent Activity

Yesterday

werner changed the status of 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. from Open to Testing.

I did some test on Windows 10 using gnupg 2.2 with this patch and things work.

Tue, Jun 22, 11:33 AM · gnupg (gpg22), Windows, Bug Report
werner 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..

For testing ion Windows 10 you need to switch to "Legacy Console" and reboot.

Tue, Jun 22, 7:59 AM · gnupg (gpg22), Windows, Bug Report
gniibe 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..

I think that a patch like following is needed:

diff --git a/common/ttyio.c b/common/ttyio.c
index c385700de..55468bdf0 100644
--- a/common/ttyio.c
+++ b/common/ttyio.c
@@ -236,7 +236,21 @@ w32_write_console (const char *string)
   n = wcslen (wstring);
Tue, Jun 22, 7:24 AM · gnupg (gpg22), Windows, Bug Report
gniibe added a comment to T5482: Release GnuPG 2.2.28.

Regression with no-unicode font on Windows: T5491

Tue, Jun 22, 6:10 AM · Release Info, gnupg (gpg22)
gniibe renamed 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. from GnuPG 2.2.28 is not working with »encrypt-to« in gpg.conf without specifying another recipient. to Console output failure with no-unicode font: GnuPG 2.2.28 is not working with »encrypt-to« in gpg.conf without specifying another recipient..
Tue, Jun 22, 6:08 AM · gnupg (gpg22), Windows, Bug Report
gniibe 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..

When console font is not a Unicode font, it seems that the WriteConsoleW function returns ERROR_GEN_FAILURE.

Tue, Jun 22, 4:58 AM · gnupg (gpg22), Windows, Bug Report
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,

Tue, Jun 22, 1:45 AM · gnupg (gpg22), Windows, Bug Report

Mon, Jun 21

werner 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..

Please run

Mon, Jun 21, 5:16 PM · gnupg (gpg22), Windows, Bug Report
werner updated the task description for T5482: Release GnuPG 2.2.28.
Mon, Jun 21, 9:37 AM · Release Info, gnupg (gpg22)
werner triaged T5498: Release GnuPG 2.2.29 as Normal priority.
Mon, Jun 21, 9:37 AM · Release Info, gnupg (gpg22)
werner added a comment to T5482: Release GnuPG 2.2.28.

Regression for keyserver search by mail address: T5497

Mon, Jun 21, 9:35 AM · Release Info, gnupg (gpg22)

Thu, Jun 17

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,

Thu, Jun 17, 11:45 PM · gnupg (gpg22), Windows, 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?

Thu, Jun 17, 11:28 AM · gnupg (gpg22), Windows, Bug Report

Tue, Jun 15

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.

Tue, Jun 15, 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.

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

Mon, Jun 14

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).

Mon, Jun 14, 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.

Mon, Jun 14, 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.

Mon, Jun 14, 11:39 AM · yubikey, gnupg (gpg22), Bug Report
gniibe added a comment to T5482: Release GnuPG 2.2.28.

Regression Yubikey NEO: T5487

Mon, Jun 14, 10:18 AM · Release Info, gnupg (gpg22)

Thu, Jun 10

werner closed T5482: Release GnuPG 2.2.28 as Resolved.
Thu, Jun 10, 10:35 PM · Release Info, gnupg (gpg22)
werner set External Link to https://lists.gnupg.org/pipermail/gnupg-announce/2021q2/000460.html on T5482: Release GnuPG 2.2.28.
Thu, Jun 10, 10:35 PM · Release Info, gnupg (gpg22)
werner triaged T5482: Release GnuPG 2.2.28 as Normal priority.
Thu, Jun 10, 5:42 PM · Release Info, gnupg (gpg22)

Mon, Jun 7

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 are possible (there are 32 ways, at least) for a single secret key, because it's the feature of X25519.

Mon, Jun 7, 7:21 AM · gnupg (gpg22), Bug Report
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.

Mon, Jun 7, 2:57 AM · gnupg (gpg22), Bug Report

Fri, Jun 4

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?

Fri, Jun 4, 3:56 PM · gnupg (gpg22), 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.

Fri, Jun 4, 10:57 AM · gnupg (gpg22), Bug Report
aheinecke closed T5424: GnuPG w32: Expand environment variables when reading registry paths as Resolved.

Works. My initial tests also failed because on Windows 64 the registry value has to be placed in the WOW6432NODE

Fri, Jun 4, 10:09 AM · gnupg (gpg22), Restricted Project
aheinecke changed the status of T5424: GnuPG w32: Expand environment variables when reading registry paths from Open to Testing.

Apologies,.. I used ctags on read_w32_registry_string and that jumped me to build-aux/speedo/w32/g4wihelp.c which has a read_w32_registry_string that does not expand....
Now I found the w32-reg.c in common which looks completely fine.

Fri, Jun 4, 9:39 AM · gnupg (gpg22), Restricted Project
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.

Fri, Jun 4, 7:33 AM · gnupg (gpg22), Bug Report
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.

Fri, Jun 4, 6:52 AM · gnupg (gpg22), Bug Report
gniibe added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

Better to have

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)))";
Fri, Jun 4, 6:00 AM · gnupg (gpg22), Bug Report
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.

Fri, Jun 4, 5:59 AM · gnupg (gpg22), Bug Report

Thu, Jun 3

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.

Thu, Jun 3, 3:04 PM · gnupg (gpg22), Bug Report
gniibe claimed T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..
Thu, Jun 3, 8:26 AM · gnupg (gpg22), Bug Report

Wed, Jun 2

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.

Wed, Jun 2, 9:56 PM · gnupg (gpg22), Bug Report
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.

Wed, Jun 2, 9:51 PM · gnupg (gpg22), Bug Report
werner added a comment to T3972: 100% CPU usage endles loop of gpg --list-keys.

It is a different trust model. The man page has some information but we meanwhile doubt that it will ever be of great use. It is over designed to be actually useful. Just don't care. For further questions, please use the mailing lists.

Wed, Jun 2, 7:18 PM · gnupg (gpg22)
melodie added a comment to T3972: 100% CPU usage endles loop of gpg --list-keys.

If I did enable "tofu" that was not on purpose and I would not know how. What are tofu related questions? Is there a doc you can point me to? (Also is tofu.db an annoyance, and if so in which way?)

Wed, Jun 2, 6:48 PM · gnupg (gpg22)
werner added a comment to T3972: 100% CPU usage endles loop of gpg --list-keys.

TOFU is not used by default and thus the tofu.db does only matter if you have enabled TOFU. Its purpose is to track the use of keys and it also stored information which you explictly gave in response to TOFU related questions.

Wed, Jun 2, 5:46 PM · gnupg (gpg22)
melodie added a comment to T3972: 100% CPU usage endles loop of gpg --list-keys.

Hello,
I just hit the same issue in Ubuntu 18.04.5 LTS with gpg version 2.2.4-1ubuntu1.4 and the command line provided on post https://dev.gnupg.org/T3972#127356 by dkg has helped me fix it.
The faulty key was from the Tor project.

Wed, Jun 2, 5:20 PM · gnupg (gpg22)
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).

Wed, Jun 2, 5:14 PM · gnupg (gpg22), Bug Report
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):

Wed, Jun 2, 5:11 PM · gnupg (gpg22), Bug Report
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.

Wed, Jun 2, 5:06 PM · gnupg (gpg22), Bug Report
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;
    }
Wed, Jun 2, 5:04 PM · gnupg (gpg22), Bug Report
werner placed T5424: GnuPG w32: Expand environment variables when reading registry paths up for grabs.

Well, we have always expanded envvars in registry values. You need to create the value as an REG_EXPAND_SZ type, though.

Wed, Jun 2, 3:04 PM · gnupg (gpg22), Restricted Project
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".

Wed, Jun 2, 11:47 AM · gnupg (gpg22), Bug Report
werner edited projects for T5424: GnuPG w32: Expand environment variables when reading registry paths, added: gnupg (gpg22); removed gnupg.
Wed, Jun 2, 11:08 AM · gnupg (gpg22), Restricted Project
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.

Wed, Jun 2, 1:35 AM · gnupg (gpg22), Bug Report
dkg added a comment to T5464: Failure to import Curve25519 ECDH secret subkey to the GnupG..

investigating the subkey in python:

Wed, Jun 2, 1:20 AM · gnupg (gpg22), Bug Report
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.

Wed, Jun 2, 1:16 AM · gnupg (gpg22), Bug Report