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

<title>Yubico Forum</title>
<subtitle>...visit our web-store at</subtitle>
<link href="https://forum.yubico.com/index.php" />
<updated>2008-08-20T15:39:24+01:00</updated>

<author><name><![CDATA[Yubico Forum]]></name></author>
<id>https://forum.yubico.com/feed.php?f=3&amp;t=138</id>
<entry>
<author><name><![CDATA[chexum]]></name></author>
<updated>2008-08-20T15:39:24+01:00</updated>
<published>2008-08-20T15:39:24+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=138&amp;p=577#p577</id>
<link href="https://forum.yubico.com/viewtopic.php?t=138&amp;p=577#p577"/>
<title type="html"><![CDATA[Re: Is the HMAC key related to the Yubikey secret?]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=138&amp;p=577#p577"><![CDATA[
<div class="quotetitle">Simon wrote:</div><div class="quotecontent"><br />Good ideas!  Yes, the response should definitely include the OTP that is being validated, so the client can check this.<br /></div><br /><div class="quotetitle">Simon wrote:</div><div class="quotecontent"><br />We recommend that you use https and validate the api.yubico.com server certificate.  Then you aren't vulnerable to this attack.  You can also verify the timestamp in the response, it should be UTC time.<br /></div>Cool, thank you!<br /><br />Just to think out loud, I obviously prefer encrypted communications; the trouble in this case, that nowadays what using SSL/TLS ensures is just temporary domain control.  So, in the case of domain expiration, or the rare (ehrm..) case of domain poisoning, it might not be prohibitively difficult to acquire a certificate for an arbitrary hostname(*), which is then accepted by many clients.  Protection against is not quite convenient, you would either need to make sure the domain signer is not changing (but this is only making the window smaller), or build a separate &quot;trusted&quot; CA list, which is against at least common sense  <img src="https://forum.yubico.com/images/smilies/icon_e_wink.gif" alt=";)" title="Wink" />  <br /><br />Checking the timestamp may be an option, if your servers keep better time in the future <img src="https://forum.yubico.com/images/smilies/icon_e_smile.gif" alt=":)" title="Smile" />  But also it would need better time synch on the clients as well..<br /><br />(*) Sidenote: the way things are, I think if we relied on SSL/TLS much more, these attacks may became much more common.  <img src="https://forum.yubico.com/images/smilies/icon_eek.gif" alt=":shock:" title="Shocked" /><p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=230">chexum</a> — Wed Aug 20, 2008 3:39 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Simon]]></name></author>
<updated>2008-08-19T14:35:11+01:00</updated>
<published>2008-08-19T14:35:11+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=138&amp;p=560#p560</id>
<link href="https://forum.yubico.com/viewtopic.php?t=138&amp;p=560#p560"/>
<title type="html"><![CDATA[Re: Is the HMAC key related to the Yubikey secret?]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=138&amp;p=560#p560"><![CDATA[
<div class="quotetitle">chexum wrote:</div><div class="quotecontent"><br /><div class="quotetitle">Simon wrote:</div><div class="quotecontent">Arguable, we _could_ use https (and we do support https!) instead of this HMAC scheme.<br /></div><br />I was wondering about that, thanks.  There's something that irks me a bit.  By checking the response's HMAC, you will only learn that the response was originated at the server.  Without further client-side storage, you can not be sure, if the server's response is replayed by someone malicious.  Am I missing something?<br /><br />It looks to me if someone can take over my internet connection/DNS, s/he can replay a former &quot;success&quot; response to any authentication requests in plain HTTP, even without a yubikey.  The first idea would be to check the time stamp, however, this is what I've just got from the server:<br /><br />h=...<br />t=2008-08-08T10:08:44Z0773<br />status=OK<br /><br />Where does 10:08:44 UTC come from?  It's around 09:32 when I was trying this...  It seems this is the servers date (from the Date header), though I could rely only on authenticated data, like the t field. (And what's 0773?)<br /><br />My first instinct would be to add a challenge to the query which will be sent in the answer, which would be very easy to check, and prevent HTTP replays to be valid, without depending on times, and require nor client, nor server-side extra storage.<br /><br />How does sending extending a protocol with a c=uniquestring which would come back signed (if present)?  Or is there some other protocol feature which prevents the attack I imagined?   (Should I be using a separate topic for this question?)<br /><br />Thanks!</div><br /><br />Good ideas!  Yes, the response should definitely include the OTP that is being validated, so the client can check this.  We will work on changing this, I've filed a bug:<br /><br /><!-- m --><a class="postlink" href="http://code.google.com/p/yubikey-server-j/issues/detail?id=8">http://code.google.com/p/yubikey-server ... etail?id=8</a><!-- m --><br /><br />We recommend that you use https and validate the api.yubico.com server certificate.  Then you aren't vulnerable to this attack.  You can also verify the timestamp in the response, it should be UTC time.<br /><br />Thanks,<br />/Simon<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2">Simon</a> — Tue Aug 19, 2008 2:35 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[chexum]]></name></author>
<updated>2008-08-08T10:43:18+01:00</updated>
<published>2008-08-08T10:43:18+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=138&amp;p=535#p535</id>
<link href="https://forum.yubico.com/viewtopic.php?t=138&amp;p=535#p535"/>
<title type="html"><![CDATA[Re: Is the HMAC key related to the Yubikey secret?]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=138&amp;p=535#p535"><![CDATA[
<div class="quotetitle">Simon wrote:</div><div class="quotecontent"><br />Arguable, we _could_ use https (and we do support https!) instead of this HMAC scheme.<br /></div><br />I was wondering about that, thanks.  There's something that irks me a bit.  By checking the response's HMAC, you will only learn that the response was originated at the server.  Without further client-side storage, you can not be sure, if the server's response is replayed by someone malicious.  Am I missing something?<br /><br />It looks to me if someone can take over my internet connection/DNS, s/he can replay a former &quot;success&quot; response to any authentication requests in plain HTTP, even without a yubikey.  The first idea would be to check the time stamp, however, this is what I've just got from the server:<br /><br />h=...<br />t=2008-08-08T10:08:44Z0773<br />status=OK<br /><br />Where does 10:08:44 UTC come from?  It's around 09:32 when I was trying this...  It seems this is the servers date (from the Date header), though I could rely only on authenticated data, like the t field. (And what's 0773?)<br /><br />My first instinct would be to add a challenge to the query which will be sent in the answer, which would be very easy to check, and prevent HTTP replays to be valid, without depending on times, and require nor client, nor server-side extra storage.<br /><br />How does sending extending a protocol with a c=uniquestring which would come back signed (if present)?  Or is there some other protocol feature which prevents the attack I imagined?   (Should I be using a separate topic for this question?)<br /><br />Thanks!<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=230">chexum</a> — Fri Aug 08, 2008 10:43 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Simon]]></name></author>
<updated>2008-07-24T12:28:57+01:00</updated>
<published>2008-07-24T12:28:57+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=138&amp;p=476#p476</id>
<link href="https://forum.yubico.com/viewtopic.php?t=138&amp;p=476#p476"/>
<title type="html"><![CDATA[Re: Is the HMAC key related to the Yubikey secret?]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=138&amp;p=476#p476"><![CDATA[
Gorkab's understanding here is correct.<br /><br />Arguable, we _could_ use https (and we do support https!) instead of this HMAC scheme.  However, client-side HTTPS is rarely implemented well, so we needed a simpler solution.  For most clients, using https and trusting our server certificate should be good enough -- you don't need to deal with the HMAC key then.  However, none of our published clients utilize HTTPS and server certificate verification yet.<br /><br />/Simon<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2">Simon</a> — Thu Jul 24, 2008 12:28 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[gorkab]]></name></author>
<updated>2008-07-24T02:51:30+01:00</updated>
<published>2008-07-24T02:51:30+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=138&amp;p=470#p470</id>
<link href="https://forum.yubico.com/viewtopic.php?t=138&amp;p=470#p470"/>
<title type="html"><![CDATA[Re: Is the HMAC key related to the Yubikey secret?]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=138&amp;p=470#p470"><![CDATA[
ssl via https only verifies the server (via the server certificate, and how do you manage that in an  application reliably), but not the client.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=194">gorkab</a> — Thu Jul 24, 2008 2:51 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[gmik]]></name></author>
<updated>2008-07-23T13:14:48+01:00</updated>
<published>2008-07-23T13:14:48+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=138&amp;p=462#p462</id>
<link href="https://forum.yubico.com/viewtopic.php?t=138&amp;p=462#p462"/>
<title type="html"><![CDATA[Re: Is the HMAC key related to the Yubikey secret?]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=138&amp;p=462#p462"><![CDATA[
If I understand correctly, the HMAC is used to secure the query to and from the server.  If so, why not just https (ssl) on the server side?<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=204">gmik</a> — Wed Jul 23, 2008 1:14 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[gorkab]]></name></author>
<updated>2008-07-22T02:54:44+01:00</updated>
<published>2008-07-22T02:54:44+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=138&amp;p=456#p456</id>
<link href="https://forum.yubico.com/viewtopic.php?t=138&amp;p=456#p456"/>
<title type="html"><![CDATA[Re: Is the HMAC key related to the Yubikey secret?]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=138&amp;p=456#p456"><![CDATA[
I think I misunderstand the question here.   The outbound HMAC authenticates that the Yubico servers were actually getting a message from a valid user, and that the message was not tampered with in transit.   Conversely, the return HMAC verifies the answering server shares your 'secret' API key and is actually not being intercepted and modified in transit.<br /><br />Given this understanding, if you are using Yubico's public servers for production use, I would thing the hmac would be integral to validating the response is actually coming from them and not being intercepted or modified via a man in the middle attack.  You would not want to share your HMAC key.  You do want to use it in any code you write.<br /><br />Simon does say above that the HMAC key is unique per api ID and not tied to any specific key though if that was your actual question.<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=194">gorkab</a> — Tue Jul 22, 2008 2:54 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Simon]]></name></author>
<updated>2008-07-19T12:13:02+01:00</updated>
<published>2008-07-19T12:13:02+01:00</published>
<id>https://forum.yubico.com/viewtopic.php?t=138&amp;p=450#p450</id>
<link href="https://forum.yubico.com/viewtopic.php?t=138&amp;p=450#p450"/>
<title type="html"><![CDATA[Is the HMAC key related to the Yubikey secret?]]></title>

<content type="html" xml:base="https://forum.yubico.com/viewtopic.php?t=138&amp;p=450#p450"><![CDATA[
I got this question via e-mail, and I think others may have thought about this issue before and would be helped by having this answered in public, so here goes the question:<br /><br /><div class="codetitle"><b>Code:</b></div><div class="codecontent">The API/ID used for HMAC verification, is that to be considered a personal thing tied to a key ? Or just something You got one of per installation/service that uses the Yubico auth server ?<br /></div><br /><br />My answer is:<br /><br />he HMAC key is shared only between the server and you, and is not tied to a specific yubikey.<br /><br />We do use yubikey for authentication during HMAC key generation to reduce the number of &quot;bogus&quot; keys in the database.  People without an yubikey aren't likely to need the validation service interface right now anyway.<br /><br />It doesn't matter if the yubikey used for authentication of the HMAC-key generation stops working or is lost, it will not affect the security of the HMAC key (assuming the HMAC key is handled properly).<br /><br />I hope this answers your question.<br /><br />/Simon<p>Statistics: Posted by <a href="https://forum.yubico.com/memberlist.php?mode=viewprofile&amp;u=2">Simon</a> — Sat Jul 19, 2008 12:13 pm</p><hr />
]]></content>
</entry>
</feed>