{"id":608,"date":"2006-10-10T17:14:16","date_gmt":"2006-10-11T01:14:16","guid":{"rendered":"\/?p=608"},"modified":"2006-10-10T17:21:45","modified_gmt":"2006-10-11T01:21:45","slug":"hans-gets-more-specific-about-yahoo-bbauth","status":"publish","type":"post","link":"https:\/\/www.identityblog.com\/?p=608","title":{"rendered":"Hans gets more specific about Yahoo BBAuth"},"content":{"rendered":"<p>Several readers have&nbsp;asked me to comment on the <a href=\"http:\/\/commented.org\/blog\/2006\/10\/10\/bbauth-security-lapse.html\" class=\"broken_link\">recent post<\/a> by Verisign&#39;s Hans Granqvist about &#8220;security problems in BBAuth&#8221;.&nbsp; He writes:<\/p>\n<blockquote><p>I have had <a href=\"http:\/\/commented.org\/blog\/2006\/10\/5\/bbauth-and-hmacs.html\" class=\"broken_link\">concerns about Yahoo!\u00e2\u20ac\u2122s choice of security of BBAuth<\/a>. Jeremy Zawodny <a href=\"http:\/\/tech.groups.yahoo.com\/group\/ydn-auth\/message\/54\" class=\"broken_link\">responds<\/a> to <a href=\"http:\/\/tech.groups.yahoo.com\/group\/ydn-auth\/message\/46\" class=\"broken_link\">my posting to ydn-auth list<\/a>:<\/p>\n<div style=\"margin-left: 30px\">\u00e2\u20ac\u0153While I can\u00e2\u20ac\u2122t comment on the choice of algorithm, I can say that some of the technology used in BBAuth was not developed solely for use with BBAuth.<\/div>\n<p>Okay, fair enough.<\/p>\n<p>But then he continues:<\/p>\n<div style=\"margin-left: 30px\">\u00e2\u20ac\u0153In other words, we\u00e2\u20ac\u2122re reusing some existing stuff that\u00e2\u20ac\u2122s been tested in the field and proven to work well for our needs.\u00e2\u20ac\u009d<\/div>\n<p>Now, this doesn\u00e2\u20ac\u2122t sound right. Not at all.<\/p>\n<p>MD5 has been broken for a few years now. According to Ferguson\u00e2\u20ac\u2122s and Schneier\u00e2\u20ac\u2122s <em><a href=\"http:\/\/www.schneier.com\/book-practical.html\">Practical Cryptography<\/a><\/em> it\u00e2\u20ac\u2122s possible to find MD5 collisions in 2**64 evaluations (using the birthday paradox). This was too easy 2003, and it sure is not more difficult now.<\/p>\n<p>Be that as it may. Perhaps these collisions are purely academic.<\/p>\n<p>What\u00e2\u20ac\u2122s worse is the lack of a proper HMAC. In Yahoo!\u00e2\u20ac\u2122s BBAuth, the <a href=\"http:\/\/developer.yahoo.com\/auth\/authcalls.html\" class=\"broken_link\">MAC is created<\/a> by <strong>hash(text + key)<\/strong> where \u00e2\u20ac\u02dc+\u00e2\u20ac\u2122 denotes string concatenation.<\/p>\n<p>This simplistic way of building a pseudo HMAC scheme is not secure. Readers of <em>Practical Cryptography<\/em> may want to turn to section 7.5 for more information. In short, tacking the key on to the end leads to key recovery attacks that are much easier to execute than they should be.<\/p>\n<p>What scares me is that this broken scheme apparently is used in plenty of other Yahoo! products. I would not be surprised if there are attackers trying to exploit this weakness <em>at this very moment<\/em>.<\/p>\n<p>My advice to Yahoo! is to change this to a proper HMAC <strong>right now<\/strong>. Other identity protocols, like <a href=\"http:\/\/openid.net\/\">OpenID<\/a> manages to require HMAC-SHA1 or HMAC-SHA256. There are OpenID libraries for all major programming languages available, so it\u00e2\u20ac\u2122s definitely not too hard to implement.<\/p><\/blockquote>\n<p>My thinking?<\/p>\n<p>I&nbsp;believe&nbsp;that when it comes to security, it&#39;s better to use an algorithm that has been widely vetted (like HMAC-SHA256), and to avoid creating new ones unless you really need to &#8211; or have a long runway to test them on.&nbsp;&nbsp;I also&nbsp;think protocols&nbsp;should use&nbsp;algorithm identifiers.&nbsp; With security, it may become necessary to&nbsp;migrate to new algorithms&nbsp;when we least want to, without blowing all the downlevel clients out of the water.&nbsp;<\/p>\n<p>But despite&nbsp;my &#8220;high-minded principles&#8221;, if you look at the actual content of what Hans calls &#8220;text&#8221; in the BBAuth protocol, it&nbsp;looks to me like it is&nbsp;full of entropy (a good thing): although it contains some fixed information, it also contains&nbsp;a token, which is variable and not calculable by an evesdropper; a timestamp, which makes&nbsp;long-running attacks impossible; and a shared secret, which makes multi-site catalog attacks impossible.&nbsp; So this is not toy cryptography given Yahoo&#39;s purposes.&nbsp; That isn&#39;t to say Hans doesn&#39;t make some good points.<\/p>\n<p>My&nbsp;concerns&nbsp;really&nbsp;originate with&nbsp;the user interface issues.&nbsp; And OpenID has the same problems&nbsp;to&nbsp;the&nbsp;extent that&nbsp;people&nbsp;end&nbsp;up with&nbsp;multiple identity providers (which they will).<\/p>\n<p>I&#39;m talking about the fact that&nbsp;users are redirected from one context to another quite different one.&nbsp; We have found that systems that work this way&nbsp;introduce a lot of &#8220;noise&#8221; &#8211; let&#39;s call it ambiguity &#8211; into the channel between the system and the user.&nbsp;<\/p>\n<p>The user can be confused &#8211; by accident or, worse, on purpose.&nbsp;<\/p>\n<p>It&#39;s the &#8220;I&#39;m-buying-a movie-from-someone-but-now-I&#39;m-at-Yahoo-and-now-I&#39;m-not&#8221; problem.&nbsp; In the midst of the redirections, the user can potentially be redirected to a wolf-in-sheep&#39;s-clothing, who can relieve her of her secrets and employ them for other purposes.&nbsp;<\/p>\n<p>Suppose that Google and MSN and AOL and eBay all&nbsp;do the same thing as&nbsp;Yahoo.&nbsp; Then things would get really confusing for the user, wouldn&#39;t they?&nbsp; As&nbsp;she visits different sites&nbsp;she would find herself&nbsp;redirected to a bunch of different home pages&#8230;&nbsp; MSN here, AOL there, and who knows what else.&nbsp; This kind of redirection is just not good from the point of view of users being certain about what&#39;s happening.&nbsp; It&#39;s similar to getting a URL in an email.&nbsp; This is one of the main reasons I think that a strong, consistent visual experience like InfoCards is key to building something safe, and why I want to see all of this converge.&nbsp; But of course, everyone knows I&#39;m like a broken record on this.<\/p>\n<p>Some of my concerns may not&nbsp;matter&nbsp;much when it comes to controlling access to&nbsp;your photos.&nbsp; But&nbsp;if this type of SSO&nbsp;were to become a massive success, that success would bring about its downfall.&nbsp; For it would then be worth attacking and very vulnerable at the same time.&nbsp; That&#39;s why I think it is best to combine it with the type of experiential system I&#39;ve been talking about before any of these problems arise.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>What if &#8211; in the midst of the redirection &#8211; users are redirected to a wolf-in-sheep&#39;s-clothing?<\/p>\n","protected":false},"author":68,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6,3,5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/posts\/608"}],"collection":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=608"}],"version-history":[{"count":0,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=\/wp\/v2\/posts\/608\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.identityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=608"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.identityblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}