Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 11:47 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Notes on endianness
PostPosted: Thu Jul 14, 2011 1:59 am 
Offline

Joined: Fri Jan 21, 2011 11:24 pm
Posts: 6
Location: York, UK
While writing some software to parse the tokens, I noticed that http://wiki.yubico.com/wiki/index.php/Yubikey is lacking notes on endianness of the fields, and you would only notice these details after reading the code. Since I can't edit the wiki page myself, I'd like to see these brief notes added:

1) the plaintext public ID, as shipped from the factory, and matching the decimal number written onto the reverse of the key, is presented in big endian order. That is to say, the most significant byte is the first and the least significant byte the last. That's why most tokens start with a line of 'c' characters (zero);

2) the secret ID has no decimal representation or record, so you can treat it as big-endian, little-endian or just six bytes. You can do the same with the public ID too, but by changing it, the key loses its ability to output the number that's been helpfully printed on it.

3) the session counter and the time code are presented in the opposite order, little endian. That is to say the least significant byte comes first.


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group