"Yubikey core error: Timeout" with HMAC challenge-response #89

Closed
opened 2025-01-19 01:11:44 +08:00 by elaralia · 7 comments
elaralia commented 2025-01-19 01:11:44 +08:00 (Migrated from github.com)

Hi! This is kind of two issues, but both cause the same problem.

When I try to add a HMAC challenge-response slot using ykpersonalize, although it says "successful", there is still nothing programmed to the slot. If I take -oserial-api-visible out of the command, it fails with Yubikey core error: write error.

ykpersonalize -v -2 -ochal-resp -ochal-hmac -ohmac-lt64 -oserial-api-visible -ochal-btn-trig fails to actually change the otp slots:
Image

Using yubikey-personalization-gui results in the same thing, although it reads successful write. My udev rules are all updated correctly. It may be worth noting that trying to write with this used to fail:
Image
Image

However this wasn't a massive issue, as I could still write it with
ykman otp chalresp -t -g 2, which would work fine, and can be interacted with through ykman otp calculate:
Image

But using it as a HMAC key gives Yubikey core error: Timeout. I think this may be to do with not having the correct configuration through ykman, because I think that the -oserial-api-visible is needed for it to work with this:
Image

Hi! This is kind of two issues, but both cause the same problem. When I try to add a HMAC challenge-response slot using ykpersonalize, although it says "successful", there is still nothing programmed to the slot. If I take `-oserial-api-visible` out of the command, it fails with `Yubikey core error: write error`. `ykpersonalize -v -2 -ochal-resp -ochal-hmac -ohmac-lt64 -oserial-api-visible -ochal-btn-trig` fails to actually change the otp slots: ![Image](https://github.com/user-attachments/assets/b771f31c-e844-4a74-8938-6f652584389c) Using `yubikey-personalization-gui` results in the same thing, although it reads successful write. My udev rules are all updated correctly. It may be worth noting that trying to write with this used to fail: ![Image](https://github.com/user-attachments/assets/ab1b0777-d017-422b-8de2-5169c4feedad) ![Image](https://github.com/user-attachments/assets/125eec0d-df33-4c15-805a-43d6a4b48b59) However this wasn't a massive issue, as I could still write it with `ykman otp chalresp -t -g 2`, which would work fine, and can be interacted with through `ykman otp calculate`: ![Image](https://github.com/user-attachments/assets/68dd4ce3-95ec-487a-8e0f-bb30206091be) But using it as a HMAC key gives `Yubikey core error: Timeout`. I think this may be to do with not having the correct configuration through ykman, because I think that the `-oserial-api-visible` is needed for it to work with this: ![Image](https://github.com/user-attachments/assets/fac234c3-3f1c-44de-89f1-f378031afd84)
pmnlla commented 2025-01-19 11:02:16 +08:00 (Migrated from github.com)

@qcoral 👀

@qcoral 👀
elaralia commented 2025-01-20 00:59:26 +08:00 (Migrated from github.com)

Maybe related that ykman otp delete seems to always act as if it fails, although it still deleted the slot:
Image

Maybe related that `ykman otp delete` seems to always act as if it fails, although it still deleted the slot: ![Image](https://github.com/user-attachments/assets/8fc8bf1f-9840-4414-bfb5-39cfd3657780)
polhenarejos commented 2025-01-20 01:22:18 +08:00 (Migrated from github.com)

Please provide:

  • Board you are using
  • Version of OS
  • Version of client software

(Offtopic: may I ask you the software console/terminal? It looks nice)

Please provide: - Board you are using - Version of OS - Version of client software (Offtopic: may I ask you the software console/terminal? It looks nice)
elaralia commented 2025-01-20 02:19:50 +08:00 (Migrated from github.com)
  • The board is a raspberry pi pico (just the regular 2040)
  • OS is arch linux with 6.6.72 kernel
  • Both yubikey-manager and yubikey-personalization are latest versions
    • ykman version 1:5.5.1-3
    • yubikey-personalization version 1.20.0-4
    • yubikey-personalization-gui version 3.1.25-3
  • The version on the pico is 6.2, from last wednesday

I also now have the error Yubikey core error: write error after reinstalling on the pico to double check it was fully updated, although I was also getting this error yesterday after updating then. I no longer remember what I did to fix it, might have just restarted:
Image

The terminal is foot, with fish running on Hyprland. I didn't do much, it's from these dotfiles. Definitely very pretty :)

- The board is a raspberry pi pico (just the regular 2040) - OS is arch linux with 6.6.72 kernel - Both `yubikey-manager` and `yubikey-personalization` are latest versions - ykman version `1:5.5.1-3` - yubikey-personalization version `1.20.0-4` - yubikey-personalization-gui version `3.1.25-3` - The version on the pico is `6.2`, from last wednesday I also now have the error `Yubikey core error: write error` after reinstalling on the pico to double check it was fully updated, although I was also getting this error yesterday after updating then. I no longer remember what I did to fix it, might have just restarted: ![Image](https://github.com/user-attachments/assets/026330b3-1d89-478f-8639-8addbc5aac29) The terminal is foot, with fish running on Hyprland. I didn't do much, it's from [these dotfiles.](https://github.com/end-4/dots-hyprland/tree/main) Definitely very pretty :)
polhenarejos commented 2025-01-20 03:02:50 +08:00 (Migrated from github.com)

I fixed the deletion problem but I do not see the problem with chalresp.

First, personalization tools are no longer maintained, so I'll not give support for them since they are discontinued.

If you do:

ykman otp chalresp -t -g 2
ykman otp calculate -T -d 6 2 12345678

doesn't work?

I fixed the deletion problem but I do not see the problem with chalresp. First, personalization tools are no longer maintained, so I'll not give support for them since they are discontinued. If you do: ``` ykman otp chalresp -t -g 2 ykman otp calculate -T -d 6 2 12345678 ``` doesn't work?
elaralia commented 2025-01-20 16:05:21 +08:00 (Migrated from github.com)

ykman otp calculate works fine, it's only when used with ykchalresp, although I don't know if that is part of ykman or yuibkey-personalize:
Image

`ykman otp calculate` works fine, it's only when used with `ykchalresp`, although I don't know if that is part of `ykman` or `yuibkey-personalize`: ![Image](https://github.com/user-attachments/assets/3931de48-94e3-4bbf-bea8-932ac9f28cb8)
elaralia commented 2025-01-23 02:38:09 +08:00 (Migrated from github.com)

I've adjusted the code I was using it for to use ykman, but it isn't a drop in replacment; it has a much larger file size when packaged as an ELF binary (due to being in python), meaning my initramfs is larger than prefered. It does work properly with ykman however, so I'll close this issue and maybe support for ykchalresp could be added in the future at some point?

This is an awesome project btw, really interesting to go through!

I've adjusted the code I was using it for to use ykman, but it isn't a drop in replacment; it has a much larger file size when packaged as an ELF binary (due to being in python), meaning my initramfs is larger than prefered. It does work properly with ykman however, so I'll close this issue and maybe support for ykchalresp could be added in the future at some point? This is an awesome project btw, really interesting to go through!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dearsky/pico-fido#89