<?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=3&amp;t=1318" />

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2014-03-04T10:19:56+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=3&amp;t=1318</id>
<entry>
<author><name><![CDATA[Klas]]></name></author>
<updated>2014-03-04T10:19:56+01:00</updated>
<published>2014-03-04T10:19:56+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1318&amp;p=5025#p5025</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1318&amp;p=5025#p5025"/>
<title type="html"><![CDATA[Re: Validation Protocol Version 2.0 - HMAC-SHA1 signature]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1318&amp;p=5025#p5025"><![CDATA[
Hello,<br /><br />That site isn't doing base64 decoding of your key..<br /><br />Let's do a little example..<br /><br />We're using id 15618 and key Eibja2kRFXXoW6hjZaiyBtWnCBA=<br />With the string id=15618&amp;nonce=0102030405060708090a0b0c0d0e0f&amp;otp=ccccccbteuddjivcnlfefefrccdcjrfjfvgjnfkcklge quickhash.com gives us XsQI1OJZ+R0KsAokpdAAhHQQavQ= but the correct signature is Jt19GpDOAraTYRFBHSofYZFEwjE=<br /><br /><!-- m --><a class="postlink" href="https://api.yubico.com/wsapi/verify/2.0?id=15618&amp;nonce=0102030405060708090a0b0c0d0e0f&amp;otp=ccccccbteuddjivcnlfefefrccdcjrfjfvgjnfkcklge&amp;h=Jt19GpDOAraTYRFBHSofYZFEwjE=">https://api.yubico.com/wsapi/verify/2.0 ... ofYZFEwjE=</a><!-- m --><br /><!-- m --><a class="postlink" href="https://api.yubico.com/wsapi/verify/2.0?id=15618&amp;nonce=0102030405060708090a0b0c0d0e0f&amp;otp=ccccccbteuddjivcnlfefefrccdcjrfjfvgjnfkcklge&amp;h=XsQI1OJZ+R0KsAokpdAAhHQQavQ=">https://api.yubico.com/wsapi/verify/2.0 ... AAhHQQavQ=</a><!-- m --><br /><br />and finally some perl code:<br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">#!/usr/bin/perl<br /><br />use Digest::SHA qw(hmac_sha1);<br />use MIME::Base64;<br /><br />my $key = decode_base64(&quot;Eibja2kRFXXoW6hjZaiyBtWnCBA=&quot;);<br />my $string = &quot;id=15618&amp;nonce=0102030405060708090a0b0c0d0e0f&amp;otp=ccccccbteuddjivcnlfefefrccdcjrfjfvgjnfkcklge&quot;;<br />my $sig = encode_base64(hmac_sha1($string, $key));<br />$string .= &quot;&amp;h=$sig&quot;;<br />warn $string;<br /></div><br /><br /><br />/klas<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2019">Klas</a> — Tue Mar 04, 2014 10:19 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[raj]]></name></author>
<updated>2014-02-19T13:35:29+01:00</updated>
<published>2014-02-19T13:35:29+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1318&amp;p=4958#p4958</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1318&amp;p=4958#p4958"/>
<title type="html"><![CDATA[Re: Validation Protocol Version 2.0 - HMAC-SHA1 signature]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1318&amp;p=4958#p4958"><![CDATA[
While being thankful for your reply, I'm afraid that I cannot use it for anything, since I've already read the guide from where you copy/pasted the steps.<br />I followed every step the best I could, but still nothing.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2816">raj</a> — Wed Feb 19, 2014 1:35 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Tom]]></name></author>
<updated>2014-02-19T13:28:55+01:00</updated>
<published>2014-02-19T13:28:55+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1318&amp;p=4956#p4956</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1318&amp;p=4956#p4956"/>
<title type="html"><![CDATA[Re: Validation Protocol Version 2.0 - HMAC-SHA1 signature]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1318&amp;p=4956#p4956"><![CDATA[
The protocol uses HMAC-SHA-1 signatures. The HMAC key to use is the client API key.<br /><br />Generate the signature over the parameters in the message. Each message contains a set of key/value pairs, and the signature is always over the entire set (excluding the signature itself), and sorted in alphabetical order of the keys. More precisely, to generate a message signature do:<br /><br />1- Alphabetically sort the set of key/value pairs by key order.<br />2- Construct a single line with each ordered key/value pair concatenated using '&amp;', and each key and value contatenated with '='. Do not add any linebreaks. Do not add whitespace. For example: `a=2&amp;b=1&amp;c=3`.<br />3- Apply the HMAC-SHA-1 algorithm on the line as an octet string using the API key as key.<br />4- Base 64 encode the resulting value according to RFC 4648, for example, `t2ZMtKeValdA+H0jVpj3LIichn4=`.<br />5- Append the value under key 'h' to the message.[/list]<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2195">Tom</a> — Wed Feb 19, 2014 1:28 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[raj]]></name></author>
<updated>2014-02-19T09:42:54+01:00</updated>
<published>2014-02-19T09:42:54+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=1318&amp;p=4954#p4954</id>
<link href="https://forum.yubico.com/viewtopic.php?t=1318&amp;p=4954#p4954"/>
<title type="html"><![CDATA[Validation Protocol Version 2.0 - HMAC-SHA1 signature]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=1318&amp;p=4954#p4954"><![CDATA[
I got the protocol working pretty first, so that's all good. But for increased security, we'd like to add the 'h' parameter to the url, but no matter what I try, I always get the response &quot;BAD_SIGNATURE&quot;.<br /><br />As for now, I am using this site to generate the signature: <!-- m --><a class="postlink" href="https://quickhash.com/">https://quickhash.com/</a><!-- m --> Algorithim is SHA1 with &quot;Use HMAC Method?&quot; checked and output set to Base64.<br />The HMAC key I use is the 'Secret Key' I get from <!-- m --><a class="postlink" href="https://upgrade.yubico.com/getapikey/">https://upgrade.yubico.com/getapikey/</a><!-- m -->.<br />The id parameter in the url is also from the /getapikey site.<br /><br />If I input this in the quickhash input box: id=15401&amp;nonce=askjdnkajsndjkasndkjsnad&amp;otp=ccccccdbrldiifthrjbbjlvgkcguceiheninhbubtgil<br />And then click generate I get this output: by7jCdAlZI1osGspmzHIGQEjnZ4=<br /><br />So I go to this url: <!-- m --><a class="postlink" href="http://api.yubico.com/wsapi/2.0/verify?id=15401&amp;nonce=askjdnkajsndjkasndkjsnad&amp;otp=ccccccdbrldiifthrjbbjlvgkcguceiheninhbubtgil&amp;h=by7jCdAlZI1osGspmzHIGQEjnZ4=">http://api.yubico.com/wsapi/2.0/verify? ... HIGQEjnZ4=</a><!-- m --><br /><br />And get this response:<br />h=vA0nh/B/o/NqgjbaTiwFdP7QBFU=<br />t=2014-02-19T08:39:59Z0949<br />status=BAD_SIGNATURE<br /><br /><br />Any and all help would be appreciated!<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2816">raj</a> — Wed Feb 19, 2014 9:42 am</p><hr />
]]></content>
</entry>
</feed>