<?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=487" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2010-02-24T09:14:27+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=5&amp;t=487</id>
<entry>
<author><name><![CDATA[YuvalRon]]></name></author>
<updated>2010-02-24T09:14:27+01:00</updated>
<published>2010-02-24T09:14:27+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=487&amp;p=2080#p2080</id>
<link href="https://forum.yubico.com/viewtopic.php?t=487&amp;p=2080#p2080"/>
<title type="html"><![CDATA[Re: Getting my secret key for yubikeys.secret field]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=487&amp;p=2080#p2080"><![CDATA[
Hi Samir<br /><br />After a little more effort - the validation finally worked!<br /><br />What you described is exactly what I did yesterday - but - the SQL script provided in the setup guide (<!-- l --><a class="postlink-local" href="http://forum.yubico.com/yubico-val-server/db.htm">yubico-val-server/db.htm</a><!-- l -->) is not updated! <br /><br />The reasons it kept failing were:<br />1. The userId column is NotNull in the provided schema but there was no value provided to that field in your SQL line:<br />mysql&gt; insert into yubikeys  (id,client_id,active,created,accessed,tokenId,secret) values (1,1,1,now(),now(),'ZgBa94ej','df+EBzB/oYhNTLwYBfni4A==');<br />This SQL will fail because it doesn't set a NN column. I worked it around by adding a default value to that column which was: '' (this is not very healthy for normal DB usage). Perhaps you can explain what is that column for if it's not in use?<br />2. There was no sessionUse column - I added one with INT(11) just because I saw other column with the same definition.<br /><br />Please provide a corrected SQL script for the DB schema creation (recommend also to review/update the setup guide).<br /><br />Thanks for your help, much appreciated<br />Yuval<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=1077">YuvalRon</a> — Wed Feb 24, 2010 9:14 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[samir]]></name></author>
<updated>2010-02-24T08:31:24+01:00</updated>
<published>2010-02-24T08:31:24+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=487&amp;p=2079#p2079</id>
<link href="https://forum.yubico.com/viewtopic.php?t=487&amp;p=2079#p2079"/>
<title type="html"><![CDATA[Re: Getting my secret key for yubikeys.secret field]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=487&amp;p=2079#p2079"><![CDATA[
From the information provided by you, it seems that there is some problems with tokenid.<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">tokenId=&lt;the first 8 chars from the ConvertModhex.java Base64 output&gt;<br /></div><br /><br />The tokenid that needs to be inserted in the database is the first 12 modhex characters of the YubiKey OTP converted into Base64 format.<br /><br />We successfully installed the Java based Yubico OTP validation server in our test environment. <br /><br />For testing, we reprogrammed one of our YubiKeys using the YubiKey configuration utility available for download at the link given below:<br /><br /><!-- m --><a class="postlink" href="http://www.yubico.com/developers/personalization/">http://www.yubico.com/developers/personalization/</a><!-- m --><br /><br />We used the following hex encoded parameters for reprogramming the YubiKey:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">tokenId aka YubiKey ID aka Public Identity: 66005af787a3 <br />UserId  aka Private Identity: 86137d745f3f <br />secret aka AES Key aka cryptographic key (shared secret): 75ff8407307fa1884d4cbc1805f9e2e0   <br /></div><br />After reprogramming the YubiKey, the YubiKey is emitting following OTP:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">hhccglvijilefbbgfcbvnfnreirvgkfgdhngcndiegtb<br /></div><br />As we need to insert the tokenId and secret in Base64 format, we converted them to Base64 values using the Modhex Calculator available at the link given below:<br /><br /><!-- m --><a class="postlink" href="http://radius.yubico.com/demo/Modhex_Calculator.php">http://radius.yubico.com/demo/Modhex_Calculator.php</a><!-- m --> <br /><br />The Base64 converted values are as follows:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">tokenId (first 12 characters of the OTP aka YubiKey ID aka Public Identity i.e hhccglvijile) = &quot;ZgBa94ej&quot; (without quotes)<br />secret (AES Key i.e 75ff8407307fa1884d4cbc1805f9e2e0)  = &quot;df+EBzB/oYhNTLwYBfni4A==&quot; (without quotes)<br /></div><br />We inserted these values in the OTP validation server database using the following command (userId is optional):<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">mysql&gt; insert into yubikeys  (id,client_id,active,created,accessed,tokenId,secret) values (1,1,1,now(),now(),'ZgBa94ej','df+EBzB/oYhNTLwYBfni4A==');<br /></div><br />The YubiKey record using the above mentioned insert command looks as follows:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent"><br />+----+-----------+--------+---------------------+---------------------+----------+--------+--------------------------+---------+------+------+------------+<br />| id | client_id | active | created             | accessed            | tokenId  | userId | secret                   | counter | low  | high | sessionUse |<br />+----+-----------+--------+---------------------+---------------------+----------+--------+--------------------------+---------+------+------+------------+<br />|  1 |         1 |      1 | 2010-02-24 03:32:10 | 2010-02-24 03:32:10 | ZgBa94ej |        | df+EBzB/oYhNTLwYBfni4A== |       0 |    0 |    0 | NULL       |<br />+----+-----------+--------+---------------------+---------------------+----------+--------+--------------------------+---------+------+------+------------+<br /></div><br />After that we were able to successfully validate the OTPs.<br /><br />We would appreciate if you can convert your tokenId and secret parameter to Base64 format, insert the YubiKey record as described above and try again.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=1076">samir</a> — Wed Feb 24, 2010 8:31 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[YuvalRon]]></name></author>
<updated>2010-02-23T17:18:56+01:00</updated>
<published>2010-02-23T17:18:56+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=487&amp;p=2074#p2074</id>
<link href="https://forum.yubico.com/viewtopic.php?t=487&amp;p=2074#p2074"/>
<title type="html"><![CDATA[Re: Getting my secret key for yubikeys.secret field]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=487&amp;p=2074#p2074"><![CDATA[
Thanks Samir<br /><br />I completed the AES generation successfully with YubikeyConfig 2.1 - but I still don't manage to validate my Yubikey on my local server. <br /><br />I send the following:<br /><!-- m --><a class="postlink" href="http://localhost:8080/yubikey-server-j/verify?id=1&amp;otp=">http://localhost:8080/yubikey-server-j/verify?id=1&amp;otp=</a><!-- m --><em>&lt;YUBIKEY_OTP&gt;</em><br /><br />But keep getting response:<br />t=2010-02-23T17:56:03Z0599<br />status=BAD_OTP<br />h=A16px0d0pV9IclCwjEGa8b4xnYg=<br /><br /><br />I uploaded the AES key with the other identity details to the Yubico server and tested it - the online Yubico server validates the OTPs fine - which makes me think I didn't put the correct data in my DB &quot;yubikeys&quot; table.<br /><br />Here is what I put into the table:<br />id=1<br />client_id=1<br />active=1<br />created='2010-02-22 13:38:00'<br />accessed='2010-02-22 13:38:00'<br />tokenId=<em>&lt;the first 8 chars from the ConvertModhex.java Base64 output&gt;</em><br />userId=1<br />secret=<em>&lt;the AES key -but I don't have it in base64&gt;</em><br />counter=NULL<br />low=NULL<br />high=NULL<br /><br />Looks like my AES key is in Hex because it is a string that has 32 0-9 and a-f digits.<br /><br />I tried to convert it to Base64 by <!-- m --><a class="postlink" href="http://www.yubico.com/demo/Modhex_Calculator.php">http://www.yubico.com/demo/Modhex_Calculator.php</a><!-- m --> (btw it's linked to RADIUS.yubico.com... from <!-- m --><a class="postlink" href="http://www.yubico.com/developers/modhex/">http://www.yubico.com/developers/modhex/</a><!-- m --> which is broken) but appearantly the calculator doesn't work - the php script always throws an exception. <br />Other calculators converted to base64 but the converted string didn't respond correctly either - I still get BAD_OTP response.<br /><br />Please help - what should be the values in each field (should counter, low and high be other than NULL?) and how do I convert my AES to Base64?<br /><br />Thanks,<br />Yuval<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=1077">YuvalRon</a> — Tue Feb 23, 2010 5:18 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[samir]]></name></author>
<updated>2010-02-23T10:18:39+01:00</updated>
<published>2010-02-23T10:18:39+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=487&amp;p=2070#p2070</id>
<link href="https://forum.yubico.com/viewtopic.php?t=487&amp;p=2070#p2070"/>
<title type="html"><![CDATA[Re: Getting my secret key for yubikeys.secret field]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=487&amp;p=2070#p2070"><![CDATA[
Please find answers to your questions as follows:<br /><br />1. Who (or what) should I talk to in Yubico, to get my secret key? I can provide a valid OTP of course.<br /><br />Answer: <br /><br />In order to streamline the process for users who want to program their own AES keys in YubiKeys and still have a working key online we have changed the process of handling AES Keys at the online validation server.<br /><br />At the high level you will no longer be able to copy or download the individual AES key from the YMS server. Instead if you need access to the AES key, you will have to use a YubiKey programming tool (YubiKey Configuration utility) to program your own AES key into a YubiKey and then upload the same AES key(s) to the server (to be used online) using the following link:<br /><br /><!-- m --><a class="postlink" href="http://www.yubico.com/developers/aeskeys/">http://www.yubico.com/developers/aeskeys/</a><!-- m --><br /><br />The step by step instructions for uploading the AES Key can be found at the following forum link:<br /><br /><!-- l --><a class="postlink-local" href="http://forum.yubico.com/viewtopic.php?f=2&amp;t=402&amp;p=1754">viewtopic.php?f=2&amp;t=402&amp;p=1754</a><!-- l --><br /><br />2. Just to make sure, is the secret key going to the secret field in yubikeys table in b64?<br /><br />Answer:<br /><br />The secret key aka AES Key will be stored in the &quot;secret&quot; field of &quot;yubikeys&quot; table in base64 format.<br /><br />3. Is that key the actual AES key of my device?<br /><br />Answer: <br /><br />The secret key aka AES key stored in the &quot;yubikeys&quot; table is actually the AES Key of your YubiKey.<br /><br />We hope this helps!<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=1076">samir</a> — Tue Feb 23, 2010 10:18 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[YuvalRon]]></name></author>
<updated>2010-02-22T15:09:45+01:00</updated>
<published>2010-02-22T15:09:45+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=487&amp;p=2066#p2066</id>
<link href="https://forum.yubico.com/viewtopic.php?t=487&amp;p=2066#p2066"/>
<title type="html"><![CDATA[Getting my secret key for yubikeys.secret field]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=487&amp;p=2066#p2066"><![CDATA[
Hello<br /><br />I'm currently trying to work with the wsapi validation server, i'm using the Java version with Tomcat 6 and MySQL.<br />I am working with the server setup tutorial at:<br /><!-- l --><a class="postlink-local" href="http://forum.yubico.com/yubico-val-server/setup.htm">yubico-val-server/setup.htm</a><!-- l --><br /><br />I have successfully built the schema and deployed the validation server to Tomcat.<br /><br />However, in section 6 &quot;Import Yubikey records into the database.&quot;, it says I should get the Device ID (successfully got it from <em>ConvertModhex [OTP]</em> ) and the secret key.<br />About providing the secret key, it says:<br />&quot;The secret is requested from the privisioning party or from Yubico directly. It is b64-encoded. An example looks like 'jHFA3cWwEd.....xEo742R4=' &quot;<br /><br />So my questions are:<br />1. Who (or what) should I talk to in Yubico, to get my secret key? I can provide a valid OTP of course.<br />2. Just to make sure, is the secret key going to the <em>secret</em> field in <em>yubikeys</em> table in b64?<br />3. Is that key the actual AES key of my device?<br /><br />Thanks,<br />Yuval<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=1077">YuvalRon</a> — Mon Feb 22, 2010 3:09 pm</p><hr />
]]></content>
</entry>
</feed>