Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YubiKey 5.7 with ED25519 key added returns invalid object error #185

Open
phiekl opened this issue Aug 25, 2024 · 1 comment
Open

YubiKey 5.7 with ED25519 key added returns invalid object error #185

phiekl opened this issue Aug 25, 2024 · 1 comment
Labels
H-yubikey-5.7 Relevant to YubiKeys with firmware 5.7 S-blocked-on-upstream Status: Requires changes to an upstream dependency.

Comments

@phiekl
Copy link

phiekl commented Aug 25, 2024

Environment

  • OS: Debian 13/testing
  • age-plugin-yubikey version: 0.5.0 (via age-plugin-yubikey_0.5.0-1_amd64.deb)

What were you trying to do

Using age-plugin-yubikey with YubiKey 5.7.1 where slot 9a contains a ED25519 key (which is a new feature with 5.7.x).

What happened

$ age-plugin-yubikey
✨ Let's get your YubiKey set up for age! ✨

This tool can create a new age identity in a free slot of your YubiKey.
It will generate an identity file that you can use with an age client,
along with the corresponding recipient. You can also do this directly
with:
    age-plugin-yubikey --generate

If you are already using a YubiKey with age, you can select an existing
slot to recreate its corresponding identity file and recipient.

When asked below to select an option, use the up/down arrow keys to
make your choice, or press [Esc] or [q] to quit.

🔑 Select a YubiKey: Yubico YubiKey OTP+FIDO+CCID 00 00 (Serial: ...)
Error: Error while communicating with YubiKey: invalid object
$ age-plugin-yubikey -g --slot 1
Error: Error while communicating with YubiKey: invalid object
$ ykman piv info
PIV version:              5.7.1
PIN tries remaining:      3/3
PUK tries remaining:      3/3
Management key algorithm: TDES
Management key is stored on the YubiKey, protected by PIN.
CHUID: ...
CCC:   No data available
Slot 9A (AUTHENTICATION):
  Private key type: ED25519
  Public key type:  ED25519
  Subject DN:       CN=ssh
  Issuer DN:        CN=ssh
  Serial:           ...
  Fingerprint:      ...
  Not before:       2024-08-25T17:11:14+00:00
  Not after:        2044-08-20T17:11:14+00:00

Everything works like usual if I add a ECCP384 key to slot 9A instead.

EDIT: Same thing happens also if one of the slots contains a X25519 key (with a corresponding certificate).

@str4d
Copy link
Owner

str4d commented Aug 25, 2024

I expect this to be blocked on iqlusioninc/yubikey.rs#577 as the parsing is done there, but I'll see if there's a better way I can detect and handle this kind of error.

@str4d str4d added S-blocked-on-upstream Status: Requires changes to an upstream dependency. S-blocked-on-hw Status: We need to own a specific YubiKey version to make progress on this issue. labels Aug 25, 2024
@str4d str4d added H-yubikey-5.7 Relevant to YubiKeys with firmware 5.7 and removed S-blocked-on-hw Status: We need to own a specific YubiKey version to make progress on this issue. labels Nov 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
H-yubikey-5.7 Relevant to YubiKeys with firmware 5.7 S-blocked-on-upstream Status: Requires changes to an upstream dependency.
Projects
None yet
Development

No branches or pull requests

2 participants