Yubico / yubikey-personalization

YubiKey Personalization cross-platform library and tool
https://developers.yubico.com/yubikey-personalization/
BSD 2-Clause "Simplified" License
297 stars 83 forks source link

Blink LED when waiting for touch #166

Closed Ken-CA closed 3 years ago

Ken-CA commented 3 years ago

I have built a macOS application that leverages the yubico-c and yubikey-personalization libraries to allow programming of the AES Key and UID for OTP on multiple YubiKeys. The app programs a number of keys at once using a USB hub. The app includes a feature that validates a key to make sure that its new AES key and UID can be decrypted correctly from the OTP string once its been programmed. My question is... is there a way to make the LED on the Series 5C key to blink when I need the user to touch the tabs? I found something in the personalization library that deals with LED-inv capability (not sure what that is) but I did not find any support for forcing the LED to start blinking. Is this a possibility? Does the current library support anything like this? Thanks in advance.

klali commented 3 years ago

led-inv is about inverting the led behaviour.

There is nothing to make the led blink without the device needing to be touched, the blinking is used to communicate that the device needs approval for an action, and when touched that action will be taken.

Ken-CA commented 3 years ago

Thanks for the quick response Klali. I do understand your response... however, you stated that "there is nothing to make the led blink without the device needing to be touched". My question is that when using the OTP function of the key.. the key only blinks when the user touches it...not before. So, is there a way to "request" an OTP from the key... which would then light up the led indicating that the user must touch the key?

klali commented 3 years ago

No. You could for example program a challenge response credential with touch and request that, which would make it blink for the response to be sent. But that's different and you wouldn't get the OTP.