Yubico Forum
https://forum.yubico.com/

after using ykpersonalize, device no longer seen
https://forum.yubico.com/viewtopic.php?f=30&t=1910
Page 1 of 1

Author:  bobjunga [ Wed Jun 03, 2015 7:22 pm ]
Post subject:  after using ykpersonalize, device no longer seen

I am using ppa:yubico/stable on Ubuntu 14.04 LTS

After running
Code:
      sleep 0.1
      ykpersonalize -1 -ofixed="$pubID" -ouid="$privID" -a"$aesKey
      sleep 0.2

The yubikey device will not respond to any of the yk* command line tools. For example:
Code:
    [A]bobg@Avature-TP1407E:~$ ykinfo -a
    Yubikey core error: timeout

This device is successfully programmed with the new OTP crendentials and pressing the button types the OTP via the keyboard.

Also, the device is recognized by the ykpersonalize-gui app and if I reprogram the same OTP credentials via the gui, then the device is fixed and once again responds to the command line tools.

Any ideas?

--BobG

Author:  bobjunga [ Thu Jun 04, 2015 1:48 am ]
Post subject:  Re: after using ykpersonalize, device no longer seen

I have compiled from source and debugged and discovered that actually, its only the serial number that can not be read. All the other attributes that ykinfo can retrieve work fine. -a does not work because the serial is the first thing it tries to read.

When it tries to retrieve the serial number, it sends SLOT_DEVICE_SERIAL (0x10) and times out waiting for the device to set the RESP_PENDING_FLAG (0x40).

With a 'good' yubikey, the yk_wait_for_key_status reads the status as 0x89 a few times and then reads 0xc0 which matches the 0x40 mask.

On a 'bad' yubikey the status starts out as 0x89 also, but instead of changing to 0xc0, it changes to 0x00.

I am trying to look up in the HID standard what those status bits mean to see if there is meaning in it transitioning to 0 instead of 0xc0.


--BobG

Author:  bobjunga [ Mon Jun 22, 2015 8:47 pm ]
Post subject:  Re: after using ykpersonalize, device no longer seen

I would still like an answer to this. I have a hundred yubikeys to provision and I am afraid to do it from the command line because after using ykpersonalize from the command line, not only is the serial number not readable, but the ccid USB interface does not work either. From NEO manager UI, no apps are shown after I write a new OTP with ykpersonalize command line tool. Initially we are only using the OTP but I got NEOs so that we could use some sort of Public/Private key app in the future and I don't know if this is permanently ruining the CCID USB interface on the devices.

I spent a lot of time going through the code and trying to figure this out on my own, and I could really use some help now.

--BobG

Author:  dain [ Tue Sep 22, 2015 1:48 pm ]
Post subject:  Re: after using ykpersonalize, device no longer seen

There's a flag you need to set when programming the slot to make the serial visible, this is done by adding -oserial-api-visible to the programming command.

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/