[pkg-gnupg-maint] Bug#806638: gnupg: Transfer of subkey to Yubikey 4 smart card fails (assertion error)

David North david-dpkgs at dnorth.net
Sun Nov 29 16:59:34 UTC 2015

Package: gnupg
Version: 1.4.18-7
Severity: normal

I've recently obtained a Yubikey 4 and am trying to use it as a smart card with
gnupg. I see that gpg 1.x only supports card keys of up to 3072 bits - although
this device supports up to 4096 - so I have generated some sub-keys of that
length to keep on the card.

Unfortunately the transfer to the card fails:

gpg --edit-key david at dnorth.net




gpg: writing new key
gpg: ../../g10/app-openpgp.c:2271: build_privkey_template: Assertion `rsa_e_len <= rsa_e_reqlen' failed.

I've tried shortening the subkey length to 2048 bits, but I get exactly the same
error. This happens regardless of which slot I attempt to use on the card.

-- System Information:
Debian Release: 8.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages gnupg depends on:
ii  gpgv          1.4.18-7
ii  libbz2-1.0    1.0.6-7+b3
ii  libc6         2.19-18+deb8u1
ii  libreadline6  6.3-8+b3
ii  libusb-0.1-4  2:0.1.12-25
ii  zlib1g        1:1.2.8.dfsg-2+b1

Versions of packages gnupg recommends:
pn  gnupg-curl     <none>
ii  libldap-2.4-2  2.4.40+dfsg-1+deb8u1

Versions of packages gnupg suggests:
ii  eog           3.14.1-1
pn  gnupg-doc     <none>
ii  imagemagick   8:
ii  libpcsclite1  1.8.13-1
pn  parcimonie    <none>

-- no debconf information

More information about the pkg-gnupg-maint mailing list