<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="https://forum.yubico.com/feed.php?f=5&amp;t=693" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2011-07-14T01:59:22+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=5&amp;t=693</id>
<entry>
<author><name><![CDATA[matthewbloch]]></name></author>
<updated>2011-07-14T01:59:22+01:00</updated>
<published>2011-07-14T01:59:22+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=693&amp;p=2750#p2750</id>
<link href="https://forum.yubico.com/viewtopic.php?t=693&amp;p=2750#p2750"/>
<title type="html"><![CDATA[Notes on endianness]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=693&amp;p=2750#p2750"><![CDATA[
While writing some software to parse the tokens, I noticed that <!-- m --><a class="postlink" href="http://wiki.yubico.com/wiki/index.php/Yubikey">http://wiki.yubico.com/wiki/index.php/Yubikey</a><!-- m --> 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:<br /><br />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 <strong>big</strong> 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);<br /><br />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 <em>can</em> 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.<br /><br />3) the session counter and the time code are presented in the opposite order, <strong>little</strong> endian. That is to say the least significant byte comes first.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=1506">matthewbloch</a> — Thu Jul 14, 2011 1:59 am</p><hr />
]]></content>
</entry>
</feed>