Just to crystallise my confusion before bed
what is the 'fixed' field and what is the 'uid' field, and how do they appear in the token output? ykpersonalize allows me to set both of these, but the TICKET struct described in the Security Evaluation only mentions the 6-byte uid. If that's the userId field, where does the 'fixed' field come in?
e.g. I am trying to set up YubiPAM 1.1 on my laptop to see the basic protocol work.
I do:
Code:
ykpersonalize -2 -a1b7c9370433d06a9bdec2500c1a0dffc -ofixed=h:112233445566 \
-ouid=h:112233445566 -v \
-osend-ref -o-oath-fixed-modhex
to programme configuration 2.
Then I associate my token with my user ID:
Code:
$ sudo ykpasswd -a mattbee
Public UID [max 32 hex chars]: 112233445566
Adding Yubikey entry for mattbee
AES key [exactly 32 hex chars]: 1b7c9370433d06a9bdec2500c1a0dffc
Private UID [exactly 12 hex chars]: 112233445566
Completed successfully.
but ykvalidate doesn't like it when I send it a token (I held down the button for the second config):
Code:
ykvalidate -u mattbee cccccccirlcbbdilbtigutelvjgbnnkgcvhcbifcctfb
mattbee: OTP is INVALID!
Using the Ruby code to try to see what's in my token seems even weirder:
Code:
require 'yubikey'
key = '1b7c9370433d06a9bdec2500c1a0dffc'
otp = readline.chomp
token = Yubikey::OTP.new(otp, key)
p "Device public id: #{token.public_id}"
p "Device secret id: #{token.secret_id}"
p "Device insertions: #{token.insert_counter}"
p "Session activation counter: #{token.session_counter}"
p "Session timestamp: #{token.timestamp}"
p "OTP random data: #{token.random_number}"
yields:
Code:
$ ruby -Ilib examples/otp.rb
cbdefghijklnrtuvbbddeeffgghhfkiregiinhbeefndutgbvlenhflvebbh
"Device public id: cbdefghijklnrtuvbbddeeffgghh"
"Device secret id: 112233445566"
"Device insertions: 65535"
"Session activation counter: 255"
"Session timestamp: 16777215"
"OTP random data: 65535"
that seems good that it can decode the secret-ID, but all the other fields are set to 1s, even after (re)inserting a few times. I assume it's something I've done wrong with ykpersonalize but I can't see what.