This site is now 100% read-only, and retired.

XML logo

GnuPG 2.1.0 in debian experimental
Posted by dkg on Thu 6 Nov 2014 at 23:27
Today, i uploaded GnuPG 2.1.0 into debian's experimental suite. It's built for amd64 and i386 and powerpc already. You can monitor its progress on the buildds to see when it's available for your architecture.


GnuPG 2.1 offers many new and interesting features, but one of the most important changes is the introduction of elliptic curve crypto (ECC). While GnuPG 2.1 discourages the creation of ECC keys by default, it's important that we have the ability to verify ECC signatures and to encrypt to ECC keys if other people are using this tech. It seems likely, for example, that Google's End-To-End Chrome OpenPGP extension will use ECC. GnuPG users who don't have this capability available won't be able to communicate with End-To-End users.

There are many other architectural changes, including a move to more daemonized interactions with the outside world, including using dirmngr to talk to the keyservers, and relying more heavily on gpg-agent for secret key access. The gpg-agent change is a welcome one -- the agent now holds the secret key material entirely and never releases it -- as of 2.1 gpg2 never has any asymmetric secret key material in its process space at all.

One other nice change for those of us with large keyrings is the new keybox format for public key material. This provides much faster indexed access to the public keyring.

I've been using GnuPG 2.1.0 betas regularly for the last month, and i think that for the most part, they're ready for regular use.

Timing for debian

The timing between the debian freeze and the GnuPG upstream is unfortunate, but i don't think i'm prepared to push for this as a jessie transition yet, without more backup. I'm talking to other members of the GnuPG packaging team to see if they think this is worth even bringing to the attention of the release team, but i'm not pursuing it at the moment.

If you really want to see this in debian jessie, please install the experimental package and let me know how it works for you.

Long term migration concerns

GnuPG upstream is now maintaining three branches concurrently: modern (2.1.x), stable (2.0.x), and classic (1.4.x). I think this is stretches the GnuPG upstream development team too thin, and we should do what we can to help them transition to supporting fewer releases concurrently.

In the long-term, I'd ultimately like to see gnupg 2.1.x to replace all use of gpg 1.4.x and gpg 2.0.x in debian, but unlikely to to happen right now.

In particular, the following two bugs make it impossible to use my current, common monkeysphere workflow:

And GnuPG 2.1.0 drops support for the older, known-weak OpenPGPv3 key formats. This is an important step for simplification, but there are a few people who probably still need to use v3 keys for obscure/janky reasons, or have data encrypted to a v3 key that they need to be able to decrypt. Those people will want to have GnuPG 1.4 around.

Call for testing

Anyway, if you use debian testing or unstable, and you are interested in these features, i invite you to install `gnupg2` and its friends from experimental. If you want to be sensibly conservative, i recommend backing up `~/.gnupg` before trying to use it:

cp -aT .gnupg .gnupg.bak
sudo apt install -t experimental gnupg2 gnupg-agent dirmngr gpgsm gpgv2 scdaemon
If you find issues, please file them via the debian BTS as usual. I (or other members of the pkg-gnupg team) will help you triage them to upstream as needed.


Comments on this Entry

Re: GnuPG 2.1.0 in debian experimental
Posted by Anonymous (82.82.xx.xx) on Fri 7 Nov 2014 at 08:58
How do I switch from using GnuPG 1.4 in debian and only use GnuPG 2.1?

There is nothing in update-alternatives for it and when I try to purge gnupg I get informed that I would also have to purge signing-party and gnome.

[ Parent ]

Re: GnuPG 2.1.0 in debian experimental
Posted by Anonymous (62.210.xx.xx) on Fri 7 Nov 2014 at 09:47
# dpkg-divert --rename --divert /usr/bin/gpg1 --add /usr/bin/gpg
# ln -s /usr/bin/gpg2 /usr/bin/gpg

[ Parent ]

Re: GnuPG 2.1.0 in debian experimental
Posted by Anonymous (82.82.xx.xx) on Fri 7 Nov 2014 at 21:20
Thanks for introducing me to another tool I did not know.

However gpg2.1 is not able to cope with my keyring with 385 keys when refreshing:
gpg: keyserver refresh failed: Too many objects.

[ Parent ]

Re: GnuPG 2.1.0 in debian experimental
Posted by Anonymous (94.198.xx.xx) on Fri 7 Nov 2014 at 09:46
While it can probably replace gpg2, it cannot replace gnupg (gpg 1.x). Even upstream knows that.

And Md’s (hah, fun that *he*’s the one with obscure scenarios, for one) use case can be well met by gnupg1.

[ Parent ]

Posted by Anonymous (62.210.xx.xx) on Fri 7 Nov 2014 at 09:50
Do you know why GPG 2.1 discourages the creation of ECC keys? Is it still possible to create them and to use them?

[ Parent ]

Posted by dkg (38.109.xx.xx) on Fri 7 Nov 2014 at 14:35
[ View Weblogs ]
It discourages the creation of ECC keys because most of your correspondents will not be able to use ECC. That is, they will not be able to encrypt to your ECC keys, and they will not be able to verify your ECC signatures, because they are unlikely to have upgraded to 2.1.x themselves already.

I believe the plan is to have the capability more widely deployed and then to make the functionality more accessible.

[ Parent ]

Posted by Anonymous (62.210.xx.xx) on Fri 7 Nov 2014 at 15:11

Okay, that makes sense. It is, however, still relevant for people using GPG 1.2 to add and publish ECC encryption subkeys in addition to their RSA ones.

I hope there will be GPG smartcard able to do ECC encryption and signing, but I doubt that will come any soon…

[ Parent ]

Posted by dkg (38.109.xx.xx) on Fri 7 Nov 2014 at 15:25
[ View Weblogs ]
(i think you mean GPG 2.1, not GPG 1.2 above)

Gnuk (a free software implementation of a cryptographic token on the FST-01 open hardware USB device) has a release with experimental support for Ed25519 (a form of ECC) from earlier this year. NIIBE Yutaka is working on stabilizing this now, and i'm sure he would be interested in testers, bug reports, and contributions of code. You can buy an FST-01 online, and you can join the Gnuk users mailing list.

[ Parent ]

Re: GnuPG 2.1.0 in debian experimental
Posted by effigies (50.157.xx.xx) on Sun 18 Jan 2015 at 20:36
According to this post, as of GnuPG 2.1, gpg-agent should be able to provide auth keys listed in ~/.gnupg/sshcontrol to SSH directly, without a subkey-to-ssh-agent operation. Would that obviate the need to restore export-reset-subkey-passwd?

[ Parent ]

Re: GnuPG 2.1.0 in debian experimental
Posted by dkg (38.109.xx.xx) on Tue 20 Jan 2015 at 23:49
[ View Weblogs ]
The use of this feature requires the user to be using gpg-agent in its ssh-agent emulation mode. Unfortunately, the ssh-agent emulation mode for gpg-agent has semantics that are quite different from the semantics that OpenSSH's ssh-agent has defined (including the inability to enact timing and confirmation-prompt constraints requested by the user). I don't find it an adequate replacement for any of the workflows i'm comfortable with.

[ Parent ]