<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Benlog &#187; security</title>
	<atom:link href="http://benlog.com/articles/category/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://benlog.com</link>
	<description>security, privacy, transparency.</description>
	<lastBuildDate>Thu, 17 May 2012 17:09:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>encryption is (mostly) not magic</title>
		<link>http://benlog.com/articles/2011/12/21/encryption-is-mostly-not-magic/</link>
		<comments>http://benlog.com/articles/2011/12/21/encryption-is-mostly-not-magic/#comments</comments>
		<pubDate>Wed, 21 Dec 2011 20:17:08 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[crypto]]></category>
		<category><![CDATA[mozilla]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1878</guid>
		<description><![CDATA[A few months ago, Sony&#8217;s Playstation Network got hacked. Millions of accounts were breached, leaking physical addresses and passwords. Sony admitted that their data was &#8220;not encrypted.&#8221; Around the same time, researchers discovered that Dropbox stores user files &#8220;unencrypted.&#8221; Dozens &#8230; <a href="http://benlog.com/articles/2011/12/21/encryption-is-mostly-not-magic/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A few months ago, <a href="http://en.wikipedia.org/wiki/PlayStation_Network_outage">Sony&#8217;s Playstation Network got hacked</a>. Millions of accounts were breached, leaking physical addresses and passwords. Sony admitted that their data was &#8220;not encrypted.&#8221;</p>
<p>Around the same time, researchers discovered that <a href="http://en.wikipedia.org/wiki/Dropbox_%28service%29#Criticism">Dropbox stores user files &#8220;unencrypted.&#8221;</a> Dozens (hundreds?) closed their accounts in protest. They&#8217;re my confidential files, they cried, why couldn&#8217;t you at least encrypt them?</p>
<p>Many, including some quite tech-savvy folks, were quick to indicate that it would have been so easy to encrypt the data. Not encrypting the data proved Sony and Dropbox&#8217;s incompetence, they said.</p>
<p>In my opinion, it&#8217;s not quite that simple.</p>
<p>Encryption is easy, it&#8217;s true. You can download code that implements military-grade encryption in any programming language in a matter of seconds. So why can&#8217;t companies just encrypt the data they host and protect us from hackers?</p>
<p>The core problem is that, to be consumable by human users, data has to be decrypted. So the decryption key has to live somewhere between the data-store and the user&#8217;s eyeballs. For security purposes, you&#8217;d like the decryption key to be very far from the data-store and very close to the user&#8217;s eyeballs. Heck you&#8217;d like the decryption key to be *inside* the user&#8217;s brain. That&#8217;s not (yet) possible. And, in fact, in most cases, it isn&#8217;t even practical to have the key all that far from the data-store.</p>
<h4>encryption relocates the problem</h4>
<p>Sony needs to be able to charge your credit card, which requires your billing address. They probably need to do that whether or not you&#8217;re online, since you&#8217;re not likely to appreciate being involved in your monthly renewal, each and every month. So, even if they encrypt your credit card number and address, they also need to store the decryption key somewhere on their servers. And since they probably want to serve you an &#8220;update your account&#8221; page with address pre-filled, that decryption key has to be available to decrypt the data as soon as you click &#8220;update my account.&#8221; So, if Sony&#8217;s web servers need to be able to decrypt your data, and hackers break into Sony&#8217;s servers, there&#8217;s only so much protection encryption provides.</p>
<p>Meanwhile, Dropbox wants to give you access to your files everywhere. Maybe they could keep your files encrypted on their servers, with encryption keys stored only on your desktop machine? Yes&#8230; until you want to access your files over the Web using a friend&#8217;s computer. And what if you want to share a file with a friend while they&#8217;re not online? Somehow you have to send them the decryption key. Dropbox must now ask its users to manage the sharing of these decryption keys (good luck explaining that to them), or must hold on to the decryption key and manage who gets the key&#8230;. which means storing the decryption keys on their servers. If you walk down the usability path far enough – in fact not all that far – it becomes clear that Dropbox probably needs to store the decryption key not too far from the encrypted files themselves. Encryption can&#8217;t protect you once you actually mean to decrypt the data.</p>
<p>The features users need often dictate where the decryption key is stored. The more useful the product, the closer the decryption key has to be to the encrypted data. Don&#8217;t think of encryption as a magic shield that miraculously distinguishes between good and bad guys. Instead, think of encryption as a mechanism for shrinking the size of the secret (one small encryption key can secure gigabytes of data), thus allowing the easy relocation of the secret to another location. That&#8217;s still quite useful, but it&#8217;s not nearly as magical as many imply it to be.</p>
<h4>what about Firefox Sync, Apple TimeMachine, SpiderOak, Helios, etc.</h4>
<p>But but but, you might be thinking, there <em>are</em> systems that store encrypted data and don&#8217;t store the decryption key. <a href="http://www.mozilla.org/en-US/mobile/sync/">Firefox Sync</a>. Apple&#8217;s <a href="http://www.apple.com/timecapsule/">TimeMachine backup system</a>. The <a href="http://spideroak.com">SpiderOak</a> online backup system. Heck, even my own <a href="http://heliosvoting.org">Helios Voting System</a> encrypts user votes in the browser with no decryption keys stored anywhere except the trustees&#8217; own machines.</p>
<p>It&#8217;s true, in some very specific cases, you can build systems where the decryption key is stored only on a user&#8217;s desktop machine. Sometimes, you can even build a system where the key is stored nowhere durably; instead it is derived on the fly from the user&#8217;s password, used to encrypt/decrypt, then forgotten.</p>
<p>But all of these systems have significant usability downsides (yes, even my voting system). If you only have one machine connected to Firefox Sync, and you lose it, you cannot get your bookmarks and web history back. If you forget your Time Machine or SpiderOak password, and your main hard drive crashes, you cannot recover your data from backup. If you lose your Helios Voting decryption key, you cannot tally your election.</p>
<p>And when I say &#8220;you cannot get your data back,&#8221; I mean you would need a mathematical breakthrough of significant proportions to get your data back. It&#8217;s not happening. Your data is lost. Keep in mind: that&#8217;s the whole point of not storing the decryption key. It&#8217;s not a bug, it&#8217;s a feature.</p>
<h4>and then there&#8217;s sharing</h4>
<p>I alluded to this issue in the Dropbox description above: what happens when users want to share data with others? If the servers don&#8217;t have the decryption key, that means users have to pass the decryption key to one another. Maybe you&#8217;re thinking you can use public-key encryption, where each user has a keypair, publishes the public encryption key, and keeps secret the private decryption key? Now we&#8217;re back to &#8220;you can&#8217;t get your data back&#8221; if the user loses their private key.</p>
<p>And what about features like Facebook&#8217;s newsfeed, where servers process, massage, aggregate, and filter data for users before they even see it? If the server can&#8217;t decrypt the data, then how can it help you process the data before you see it?</p>
<p>To be clear: if your web site has social features, it&#8217;s very unlikely you can successfully push the decryption keys down to the user. You&#8217;re going to need to read the data on your servers. And if your servers need to read the data, then a hacker who breaks into the servers can read the data, too.</p>
<h4>so the cryptographer is telling me that encryption is useless?</h4>
<p>No, far from it. I&#8217;m only saying that encryption with end-user-controlled keys has far fewer applications than most people think. Those applications need to be well-scoped, and they have to accompanied by big bad disclaimers about what happens when you lose your key.</p>
<p>That said, encryption as a means of partitioning power and access on the server-side remains a very powerful tool. If you have to store credit card numbers, it&#8217;s best if you build a subsystem whose entire role is to store credit-card numbers encrypted, and process transactions from other parts of your system. If your entire system is compromised, then you&#8217;re no better off than if you hadn&#8217;t taken those precautions. But, if only part of your system is compromised, encryption may well stop an attacker from gaining access to the most sensitive parts of the system.</p>
<p>You can take this encryption-as-access-control idea very far. An MIT team just <a href="http://css.csail.mit.edu/cryptdb/">published CryptDB</a>, a modified relational database that uses interesting encryption techniques to strongly enforce access control. Note that, if you have the password to log into the database, this encryption isn&#8217;t going to hide the data from you: the decryption key is on the server. Still, it&#8217;s a very good defense-in-depth approach.</p>
<h4>what about this fully homomorphic encryption thing?</h4>
<p>OK, so I lied a little bit when I talked about pre-processing data. There is a kind of encryption, called homomorphic encryption, that lets you perform operations on data while it remains encrypted. The last few years have seen epic progress in this field, and it&#8217;s quite exciting&#8230;. for a cryptographer. These techniques remain extremely impractical for most use cases today, with an overhead factor in the trillions, both for storage and computation time. And, even when they do become more practical, the central decryption key problem remains: forcing users to manage decryption keys is, for the most part, a usability nightmare.</p>
<p>That said, I must admit: homomorphic encryption <em>is</em> actually almost like magic.</p>
<h4>the special case of passwords</h4>
<p>Passwords are special because, once stored, you never need to read them back out, you only need to check if a password typed by a user matches the one stored on the server. That&#8217;s very different than a credit-card number, which does need to be read after it&#8217;s stored so the card can be charged every month. So for passwords, we have special techniques. It&#8217;s not encryption, because encryption is reversible, and the whole point is that we&#8217;d like the system to strongly disallow extraction of user passwords from the data-store. The special tool is a one-way function, such as <tt>bcrypt</tt>. Take the password, process it using the one-way function, and store only the output. The one-way function is built to be difficult to reverse: you have to try a password to see if it matches. That&#8217;s pretty cool stuff, but really it only applies to passwords.</p>
<p>So, if you&#8217;re storing passwords, you should absolutely be passing them through a one-way function. You could say you&#8217;re &#8220;hashing&#8221; them, that&#8217;s close enough. In fact you probably want to say you&#8217;re salting and hashing them. But whatever you do, you&#8217;re not &#8220;encrypting&#8221; your passwords. That&#8217;s just silly.</p>
<h4>encryption is not a magic bullet</h4>
<p>For the most part, encryption isn&#8217;t magic. Encryption lets you manage secrets more securely, but if users are involved in the key management, that almost certainly comes at the expense of usability and features. Web services should strongly consider encryption where possible to more strictly manage their internal access controls. But think carefully before embarking on a design that forces users to manage their keys. In many cases, users simply don&#8217;t understand that losing the key means losing the data. As my colleague Umesh Shankar says, if you design a car lock so secure that locking yourself out means crushing the car and buying a new one, you&#8217;re probably doing it wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2011/12/21/encryption-is-mostly-not-magic/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Online Voting is Terrifying and Inevitable</title>
		<link>http://benlog.com/articles/2011/05/25/online-voting-is-terrifying-and-inevitable/</link>
		<comments>http://benlog.com/articles/2011/05/25/online-voting-is-terrifying-and-inevitable/#comments</comments>
		<pubDate>Wed, 25 May 2011 22:21:55 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[voting]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1657</guid>
		<description><![CDATA[Voting online for public office is a terrifying proposition to most security experts. The paths to subversion or failure are many: the server could get overwhelmed by attackers, preventing voting altogether the server could get hacked and the votes changed &#8230; <a href="http://benlog.com/articles/2011/05/25/online-voting-is-terrifying-and-inevitable/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Voting online for public office is a terrifying proposition to most security experts. The paths to subversion or failure are many:</p>
<ol>
<li> the server could get overwhelmed by attackers, preventing voting altogether</li>
<li> the server could get hacked and the votes changed surreptitiously</li>
<li> the users&#8217; machines could get compromised by a virus, which would then flip votes as it chooses with little or no trace</li>
<li> even if somehow we secure the entire digital channel, there&#8217;s still the issue of your spouse looking over your shoulder, strongly suggesting you vote a certain way</li>
</ol>
<p>So, terrifying. And yet, I&#8217;m now pretty sure it is inevitable.</p>
<h4>What human activity <em>isn&#8217;t</em> on the Internet?</h4>
<p>Today, we bank online, deposit checks and even pay vendors with our smart phones. We can change our mailing address with the postal service and pay parking tickets with our local governments online. We can shop online, socialize online, and debate with our Presidential candidates online. Newt Gingrich announced his Presidential campaign on Twitter.</p>
<p>Just about everyone now carries an Internet-connected personal device. The Internet is everywhere you want it, and just about everywhere you don&#8217;t. People are starting to experience the world through augmented reality, using online maps and satellite overlays matched with your current location. The Internet is only going to become more omnipresent, faster. Within a few years, it&#8217;s hard to imagine any human activity that doesn&#8217;t involve the Internet.</p>
<p>And yet, somehow, we expect people to still be voting in person, on paper? We can&#8217;t even get users to take SSL certificate warnings seriously, but we&#8217;re going to convince them that voting is so special it has to be done in person? I don&#8217;t think so.</p>
<h4>Don&#8217;t grab your pitchfork yet</h4>
<p>I&#8217;m not arguing that this is how it should be. I&#8217;m <em>definitely</em> not saying that we can secure online voting just like we can secure online banking. In fact I&#8217;ve made many of the original arguments, in my dissertation and <a href="http://benlog.com/articles/2007/03/02/on-voting-banking-and-bad-analogies/">on this blog</a>, shooting down the bogus arguments that go something like &#8220;hey, we can secure online banking, surely we can secure online voting!&#8221; No, we don&#8217;t know how to do that.</p>
<p>What I&#8217;m saying is that, <em>regardless</em> of the state of online voting security, I think it&#8217;s a losing battle to expect voting to remain the only activity we still do in person and on paper. With the Oscars moving to online voting, the Federal Voting Assistance Program making $15M available in grants for activities related to online voting (even if it supposedly doesn&#8217;t involve online vote casting), parts of Canada moving to online voting, France considering online voting for its 2M+ expats (more than the margin of victory in the last Presidential election), what you&#8217;re hearing is the sound of inevitability.</p>
<h4>Enforced Privacy is Dead</h4>
<p>There&#8217;s another interesting issue, when you think about problem (4): even if we keep voting on paper in person, voting requires enforced privacy: we have to make sure it&#8217;s just you in the voting booth, not you plus a coercer. That&#8217;s great. Now, how many ballots do you think we&#8217;re going to see next year published on Instagram?</p>
<p>We have a deeper problem here due to the now omnipresent Internet. Voluntary privacy is <em>not</em> dead, since users can choose to isolate themselves. But enforced privacy, privacy imposed on the voter, the kind needed to prevent coercion, that&#8217;s quite dead. I&#8217;m very concerned about what that means for democracy. But again, this is inevitable.</p>
<h4>Doing the Best We Can</h4>
<p>So, if it&#8217;s inevitable, maybe the best we can do is make online voting as secure as possible. We&#8217;ll probably have a few disasters, maybe even a few thrown elections. So we&#8217;d better start now on the problems we have.</p>
<p>I think we can solve Problem (2) with open-audit, end-to-end voting systems like <a href="http://heliosvoting.org">Helios</a> (but not only Helios, there are others.) I think we can minimize the risk of Problem (1) by moving to a longer voting period (1 week instead of 1 day). I suspect we have to eventually give up on some aspects of (4), whether or not we do online voting, though some technical tricks might make voter coercion a good bit more difficult (it&#8217;s never completely impossible). The hardest problem is (3): we have no way of ensuring that people are using trustworthy software that captures their intent properly.</p>
<p>Again, I&#8217;m not endorsing online voting for public office. I&#8217;m saying it&#8217;s inevitable, and it&#8217;s time to face that inevitability.</p>
<h4>Importance of the User Agent and why I joined Mozilla</h4>
<p>This issue of trustworthy user software is a much larger problem than voting. As human activity increasingly moves online, the central question is: what software is truly on the side of the user? How does the user know for sure that the software they&#8217;re using is their true agent? There&#8217;s only one piece of Internet architecture today that can be the user&#8217;s true agent, and that&#8217;s the Web browser (which technologists call the User Agent, unsurprisingly.) And, among the web browsers, there&#8217;s one that particularly stands out as the ultimate user agent, backed by a company whose mission is focused on the user and only the user.</p>
<p>That&#8217;s why I joined Mozilla. Because for voting and beyond, everything people do is online or soon to be online, and users better have an agent on their side. The best agent users can get today is Firefox, and I hope to contribute to making it an even better user agent in the next few years. </p>
<p>[It's worth noting that Mozilla has no intention of getting into the voting business, that's just my personal interest.]</p>
<p>OK, you may now get out your pitchfork.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2011/05/25/online-voting-is-terrifying-and-inevitable/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>(your) information wants to be free</title>
		<link>http://benlog.com/articles/2011/04/28/your-information-wants-to-be-free/</link>
		<comments>http://benlog.com/articles/2011/04/28/your-information-wants-to-be-free/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 05:46:42 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[data]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1631</guid>
		<description><![CDATA[A couple of weeks ago, Epsilon, an email marketing firm, was breached. If you are a customer of Tivo, Best Buy, Target, The College Board, Walgreens, etc., that means your name and email address were accessed by some attacker. You &#8230; <a href="http://benlog.com/articles/2011/04/28/your-information-wants-to-be-free/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A couple of weeks ago, Epsilon, an email marketing firm, was breached. If you are a customer of Tivo, Best Buy, Target, The College Board, Walgreens, etc., that means your name and email address were accessed by some attacker. You probably received a warning to watch out for phishing attacks (assuming it wasn&#8217;t caught in your spam filter).</p>
<p>Yesterday, the Sony Playstation Network of 75 million gamers <a href="http://www.reuters.com/article/2011/04/28/us-sony-idUSTRE73R0Q320110428">was compromised</a>. Names, addresses, and possibly credit cards were accessed by attackers. This may well be the largest data breach in history.</p>
<p>And a few days ago, it was discovered that <a href="http://radar.oreilly.com/2011/04/apple-location-tracking.html">iPhones keep track of your location</a> over extended periods of time and copy that data to backups, even if you explicitly tell your iPhone not to track your location. There are believable claims that <a href="http://www.pcmag.com/article2/0,2817,2383945,00.asp">law enforcement has already used this information</a> without a court order. Apple now says this was <a href="http://www.apple.com/pr/library/2011/04/27location_qa.html">a bug and they&#8217;re fixing it</a>.</p>
<p>In 1984, Stewart Brand famously said that <a href="http://en.wikipedia.org/wiki/Information_wants_to_be_free">information wants to be free</a>. John Perry Barlow reiterated it in the early 90s, and added &#8220;<a href="http://www.wired.com/wired/archive/2.03/economy.ideas_pr.html">Information Replicates into the Cracks of Possibility</a>.&#8221; When this idea was applied to online music sharing, it was cool in a &#8220;fight the man!&#8221; kind of way. Unfortunately, information replication doesn&#8217;t discriminate: your <em>personal data</em>, credit cards and medical problems alike, also want to be free. Keeping it secret is really, really hard.</p>
<p>I get the sense that many think Epsilon and Sony were stupidly incompetent, and Apple was evil. This fails to capture the nature of digital data. It&#8217;s just incredibly hard to secure data when one failure outweighs thousands of successes. In the normal course of development, data gets copied all over the place. It takes a concerted effort to enumerate the places where data end up, to design defensively against data leakage, and to audit the code after the fact to ensure no mistakes were made. One mistake negates all successes.</p>
<p>Here&#8217;s one way to get an intuitive feel for it: when building a skyscraper, workers are constantly fighting gravity. One moment of inattention, and a steel beam can fall from the 50th floor, turning a small oversight into a tragedy. The same goes for software systems and data breaches. The natural state of data is to be copied, logged, transmitted, stored, and stored again. It takes constant fighting and vigilance to prevent that breach. It takes <em>privacy and security engineering</em>.</p>
<p>The kicker is that, while it&#8217;s unlikely to get into the business of building skyscrapers by accident, it&#8217;s incredibly easy to find yourself storing user data long before you&#8217;ve laid out decent privacy and security practices: Sony built game consoles, and then one day they were suddenly storing user data. It&#8217;s also far too common for great software engineers to deceive themselves into thinking that securing user data is not so hard, because hey, they would never be as stupid as those Sony engineers.</p>
<p>So, am I excusing Epsilon, Sony, and Apple? Not at all. But if we keep thinking that they were just stupid/evil, then we are far from understanding and fixing the problem.</p>
<p>I&#8217;ve just finished reading <a href="http://gawande.com/the-checklist-manifesto">Atul Gawande&#8217;s The Checklist Manifesto</a>, which I strongly recommend. As industries mature (flying airplanes, practicing medicine, building complex software systems,&#8230;), they must build in processes to counteract inevitable human weaknesses. There&#8217;s bound to be resistance from experienced practitioners who see the introduction of process as insulting to their craft. Programmers are, in this sense, a lot like doctors. But it&#8217;s time to stop being heroes and start being professionals. Storing user data safely is easy until it&#8217;s not.</p>
<p>We are constantly fighting nature to meet our stated goals: we don&#8217;t want buildings to fall, disease to kill us, or private information to leak. For a little while, it&#8217;s okay to fail catastrophically and act surprised. But eventually, these failures are no longer surprising, they&#8217;re just negligent. That time of transition for software architects is now. Every company that dabbles in user data should assign a dedicated security and privacy team whose sole responsibility is to protect user data. We will not eliminate all failures, but we can do much, much better.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2011/04/28/your-information-wants-to-be-free/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>intelligently designing trust</title>
		<link>http://benlog.com/articles/2011/03/30/intelligently-designing-trust/</link>
		<comments>http://benlog.com/articles/2011/03/30/intelligently-designing-trust/#comments</comments>
		<pubDate>Wed, 30 Mar 2011 05:44:32 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[crypto]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1594</guid>
		<description><![CDATA[For the past week, every security expert&#8217;s been talking about Comodo-Gate. I find it fascinating: Comodo-Gate goes to the core of how we handle trust and how web architecture evolves. And in the end, this crisis provides a rare opportunity. &#8230; <a href="http://benlog.com/articles/2011/03/30/intelligently-designing-trust/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For the past week, every security expert&#8217;s been talking about <a href="https://blog.torproject.org/blog/detecting-certificate-authority-compromises-and-web-browser-collusion">Comodo-Gate</a>. I find it fascinating: Comodo-Gate goes to the core of how we handle trust and how web architecture evolves. And in the end, this crisis provides a rare opportunity.</p>
<h4>warning signs</h4>
<p>Last year, Chris Soghoian and Sid Stamm published a paper, Certified Lies [<a href="http://files.cloudprivacy.net/ssl-mitm.pdf">PDF</a>], which identified the very issue that is at the center of this week&#8217;s crisis. Matt Blaze provided, as usual, a <a href="http://www.crypto.com/blog/spycerts/">fantastic explanation</a>:</p>
<blockquote><p>
A decade ago, I observed that commercial certificate authorities protect you from anyone from whom they are unwilling to take money. That turns out to be wrong; they don&#8217;t even do that much.
</p></blockquote>
<p>A <em>Certificate Authority</em> is a company that your web browser trusts to tell it who is who on the Internet. When you go to <tt>https://facebook.com</tt>, a Certificate Authority is vouching that, yes, this is indeed Facebook you&#8217;re talking to directly over a secure channel.</p>
<p>What Chris and Sid highlighted is an interesting detail of how web browsers have chosen to handle trust: any Certificate Authority can certify any web site. That design decision was reasonable in 1994, when there were only two Certificate Authorities and the world was in a rush to secure web transactions. But it&#8217;s not so great now, where a Certificate Authority in Italy can delegate its authority to a small reseller, who can then, in turn, certify any web site, including Facebook and Gmail, using more or less the level of assurance the small reseller sees fit.</p>
<h4>what happened</h4>
<p>It looks like someone from Iran hacked into one of the small resellers three degrees of delegation away from Comodo to issue to some unknown entity (the Iranian government?) certificates for major web sites, including Google and Microsoft. This gave that entity the power to impersonate those web sites, even over secure connections indicated by your browser padlock icon. It&#8217;s important to understand that this is <em>not Google or Microsoft&#8217;s fault</em>. They couldn&#8217;t do anything about it, nor could they detect this kind of attack. When Comodo discovered the situation, they revoked those certificates&#8230; but that didn&#8217;t do much good because the revocation protocol does not fail safely: if your web browser can&#8217;t contact the revocation server, it assumes the certificate is valid.</p>
<h4>a detour via Dawkins, Evolution, and the Giraffe</h4>
<p>Richard Dawkins, the world-famous evolutionary biologist, illustrates the truly contrived effects of evolution on a giraffe. The laryngeal nerve, which runs from the brain to the larynx, takes a detour around the heart. In the giraffe, it&#8217;s a ludicrous detour: down the animal&#8217;s enormous neck, around the heart, and back up the neck again to the larynx, right near where the nerve started to begin with!</p>
<p>If you haven&#8217;t seen this before, you really need to spend the 4 minutes to watch it:</p>
<p><iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/cO1a1Ek-HD0" frameborder="0" allowfullscreen></iframe></p>
<p>In Dawkins&#8217;s words:</p>
<blockquote><p>
Over millions of generations, this nerve gradually lengthened, each small step simpler than a major rewiring to a more direct route.
</p></blockquote>
<h4>and we&#8217;re back</h4>
<p>This evolution is, in my opinion, exactly what happened with certificate authorities. At first, with only two certificate authorities, it made sense to keep certificate issuance as simple as possible. With each added certificate authority, it still made no sense to revamp the whole certification process; it made more sense each time to just add a certificate authority to the list. And now we have a giraffe-scale oddity: hundreds of certificate authorities and all of their delegates can certify anyone, and it makes for a very weak system.</p>
<p>This isn&#8217;t, in my mind, a failure of software design. It&#8217;s just the natural course of evolution, be it biology or software systems. We can and should try to predict how certain designs will evolve, so that we can steer clear of obvious problems. But it&#8217;s very unlikely we can predict even a reasonable fraction of these odd evolutions.</p>
<h4>the opportunity</h4>
<p>So now that we&#8217;ve had a crisis, we have an opportunity to do something that Nature simply cannot do: we can explore radically redesigned mechanisms. <em>We can intelligently design trust</em>. But let&#8217;s not be surprised, in 15 years, when the wonderful design we outline today has evolved once again into something barely viable.</p>
<h4>taking further example from nature?</h4>
<p>Nature deals with this problem of evolutionary dead-ends in an interesting way: there isn&#8217;t just one type of animal. There are thousands. All different, all evolving under slightly different selection pressures, all interacting with one another. Some go extinct, others take over.</p>
<p>Should we apply this approach to software system design? I think so. Having a rich ecosystem of different components is better. We shouldn&#8217;t all use the same web browser. We shouldn&#8217;t all use the same trust model. We should allow for niches of feature evolution in this grand ecosystem we call the Web, because we simply don&#8217;t know how the ecosystem will evolve. How do we design software systems and standards that way? Now that&#8217;s an interesting question&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2011/03/30/intelligently-designing-trust/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>the difference between privacy and security</title>
		<link>http://benlog.com/articles/2011/01/26/the-difference-between-privacy-and-security/</link>
		<comments>http://benlog.com/articles/2011/01/26/the-difference-between-privacy-and-security/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 16:51:15 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[privacy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1508</guid>
		<description><![CDATA[Facebook today rolled out new security features, both of which are awesome: SSL everywhere, and social re-authentication. True, SSL everywhere should probably be a default, even though I continue to believe that the cost is significantly underestimated by many privacy &#8230; <a href="http://benlog.com/articles/2011/01/26/the-difference-between-privacy-and-security/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Facebook today <a href="https://blog.facebook.com/blog.php?post=486790652130">rolled out new security features</a>, both of which are awesome: SSL everywhere, and social re-authentication. True, SSL everywhere should probably be a default, even though I continue to believe that the cost is significantly underestimated by many privacy advocates. Regardless, this announcement is great news.</p>
<p>The only nitpick I have, and I point it out because I think it&#8217;s significant in Facebook&#8217;s case, is that the announcement confuses privacy and security. The first paragraph mentions Data Privacy Day, then the general concept of controlling your data, then transitions to the new security features. But those are quite different.</p>
<p>Security is about <em>stopping the bad guys from stealing your data</em>. Privacy is about <em>controlling the good guys&#8217; handling of your data</em>. (Ron Rivest is said to have phrased this most eloquently, but I can&#8217;t find his quotation.)</p>
<p>So, SSL and social re-authentication provide security because they prevent bad guys from seeing your network traffic at the coffee shop or stealing your login. That&#8217;s fantastic, but it has little to do with privacy. If Facebook wanted to celebrate Data Privacy Day specifically, they might consider giving users more control over their data <em>on Facebook</em>. Maybe letting users control who gets to tag them in photos (i.e. not my stalker). Or letting users indicate fields by which advertisers cannot target them (i.e. sexual orientation.) Those would be privacy features.</p>
<p>I don&#8217;t mean to knock Facebook&#8217;s announcement: it&#8217;s great. But it&#8217;s about security, not privacy.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2011/01/26/the-difference-between-privacy-and-security/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Crisis in the Java Community&#8230; could they have used a secret-ballot election?</title>
		<link>http://benlog.com/articles/2010/12/09/crisis-in-the-java-community-could-they-have-used-a-secret-ballot-election/</link>
		<comments>http://benlog.com/articles/2010/12/09/crisis-in-the-java-community-could-they-have-used-a-secret-ballot-election/#comments</comments>
		<pubDate>Thu, 09 Dec 2010 20:06:40 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[crypto]]></category>
		<category><![CDATA[privacy]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[voting]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1472</guid>
		<description><![CDATA[There is a bit of a crisis in the Java community: the Apache Foundation just resigned its seat on the Java Executive Committee, as did two individual members, Doug Lea and Tim Peierls. From what I understand, the central issue &#8230; <a href="http://benlog.com/articles/2010/12/09/crisis-in-the-java-community-could-they-have-used-a-secret-ballot-election/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There is a bit of a crisis in the Java community: <a href="https://blogs.apache.org/foundation/entry/the_asf_resigns_from_the">the Apache Foundation just resigned its seat on the Java Executive Committee</a>, as did two individual members, <a href="http://gee.cs.oswego.edu/dl/html/jcp22oct10.html">Doug Lea</a> and <a href="http://tembrel.blogspot.com/2010/12/resigned-from-ec.html">Tim Peierls</a>. From what I understand, the central issue appears to be that Oracle, the new Java &#8220;owner&#8221; since they acquired Sun Microsystems, is paying lip service to the Java Community while taking the language and, more importantly, its licensing, into the direction they prefer, which doesn&#8217;t appear to be very open-source friendly.</p>
<p>That said, I&#8217;m not a Java Community expert, so I won&#8217;t comment much more on this conflict, other than to say, wait a minute, what&#8217;s this from Tim Peierls&#8217;s resignation note?</p>
<blockquote><p>
Several of the other EC members expressed their own disappointment while voting Yes. I&#8217;m reasonably certain that the bulk of the Yes votes were due to contractual obligations rather than strongly-held principles.
</p></blockquote>
<p>Wait a minute, the Executive Committee votes by public ballot? They&#8217;re influenced by contractual obligations? That&#8217;s fascinating, and that&#8217;s hardly democratic! It means that, even where standards bodies are concerned, the secret ballot might be a very interesting tool.</p>
<p>There are arguments against the secret ballot in this case, of course: maybe the Executive Committee members are representative of the Java Community, and as such they should serve their constituents? Much like legislators, their votes should be public so the community can decide whether or not to reelect them? In that case, contractual obligations to vote a certain way should be strictly disallowed or required to be published along with the vote&#8230; To whom are these Executive Committee members accountable? To themselves as well-intentioned guides of the Java community? To the people who elected them? It&#8217;s difficult to have it both ways, since one requires a secret ballot, and the other a public ballot.</p>
<p>Maybe the right solution is to publish all comments, but keep the ballots secret? There&#8217;s always a chance that a truly hypocritical member would consistently vote differently than their publicly stated opinions, but I&#8217;m not sure that risk is worse than the problems the Java Community just faced with what appears to be anything but a democratic vote. In a tough spot like this one, it seems to me that Executive Committee members should be able to vote their conscience without fear of retribution.</p>
<p>(Oh, and if the Java community is looking for a secure voting system, I might have a <a href="http://heliosvoting.org">suggestion</a>.)</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2010/12/09/crisis-in-the-java-community-could-they-have-used-a-secret-ballot-election/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OK, let&#8217;s work to make SSL easier for everyone</title>
		<link>http://benlog.com/articles/2010/10/26/ok-lets-work-to-make-ssl-easier-for-everyone/</link>
		<comments>http://benlog.com/articles/2010/10/26/ok-lets-work-to-make-ssl-easier-for-everyone/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 16:28:28 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1412</guid>
		<description><![CDATA[So in the wake of the FireSheep situation, which I described yesterday, the tech world is filled with people talking past each other on one important topic: should we just switch everything over to SSL? As I stated yesterday, I &#8230; <a href="http://benlog.com/articles/2010/10/26/ok-lets-work-to-make-ssl-easier-for-everyone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So in the wake of the FireSheep situation, which I <a href="http://benlog.com/articles/2010/10/25/keep-your-hands-off-my-session-cookies/">described yesterday</a>, the tech world is filled with people talking past each other on one important topic: should we just switch everything over to SSL?</p>
<p>As I stated yesterday, I don&#8217;t think that&#8217;s going to happen anytime soon. I would <em>love</em> to be wrong, because certainly if we <em>could</em> switch to SSL for everything, the Web would be significantly more secure. I just don&#8217;t think it&#8217;s going to be that easy. But let&#8217;s explore this a bit, because I think most people agree that there would be tremendous benefits.</p>
<p>A number of folks are saying &#8220;SSL is too expensive.&#8221; Others are saying &#8220;Google did it, they say it&#8217;s 1% overhead, you&#8217;re lying.&#8221; The main reference people are using for that latter claim is a fascinating presentation by Adam Langley of Google entitled <a href="http://www.imperialviolet.org/2010/06/25/overclocking-ssl.html">Overclocking SSL</a>. The gist of it is that, using only software, Google gets the overhead of SSL to be 1% CPU and 2% network. That sounds pretty cheap. That said, I&#8217;m skeptical. I&#8217;m far from the SSL configuration expert, of course, but I don&#8217;t think Adam Langley&#8217;s presentation paints a complete picture of the situation:</p>
<ol>
<li> <b>per-request overhead, or per-user-visit overhead?</b> When Google says &#8220;1% of CPU and 2% of network,&#8221; do they take into account the significantly increased number of requests due to reduced browser caching? Specifically, when going over SSL, browsers tend not to cache things like JavaScript files, images, etc&#8230; So when you click from page to page, your browser re-downloads a whole bunch of additional files on each click that they would not download if the same site were visited over HTTP. The server has no control over this. So, I suspect Google is looking at each request they get, and saying the SSL portion accounts for 1% CPU and 2% network. But, they&#8217;re probably not telling us how many extra requests overall they&#8217;re getting by user visit. I suspect it&#8217;s quite a bit higher, on the order of 300-400% the number of total requests per user visit, simply because those additional files don&#8217;t get cached. And what&#8217;s worse, those un-cached requests are typically large files, like graphics.</li>
<p></p>
<li> <b>fancy protocol tweaks.</b> Google is doing all sorts of fancy things to reduce the complexity of the SSL negotiation. That&#8217;s awesome. But it looks like I need to upgrade to an experimental version of Apache to get all those tweaks. Also, some of the recommendations in Adam&#8217;s presentation, e.g. &#8220;don&#8217;t make <tt>SSL_write</tt> calls with small amounts of data&#8221;, are very difficult for typical web developers to address, since they usually don&#8217;t control their web pipeline that well. Finally, it looks like Google has patched OpenSSL to be more efficient. Awesome. Can we see that patch? I&#8217;m sure Google has done a fantastic job on all of these protocol, algorithmic, and implementation optimizations. But these are not within the reach of most developers, even good developers.
</ol>
<p>Now, I&#8217;m not an SSL-naysayer! I would love to see SSL deployed everywhere. I just think we need to look at the hard data regarding the overhead this will create for companies and for consumers (no caching = increased bandwidth requirements). There&#8217;s one way forward I&#8217;d love to see happen: <b>Hey Google, how about open-sourcing all of those tweaks in one super awesome SSL proxy that we can all install blindly in front of our HTTP-only sites?</b> This proxy should implement the latest protocol tweaks, buffer the content in appropriately sized chunks, optimize the algorithm negotiation depending on the underlying hardware, etc. Then we can all experiment with this software, see how it affects performance, and make truly informed decisions about switching to SSL everywhere.</p>
<p>As a side note, I wonder whether one reason Google switched its main search UI to AJAX is that it gets around the issue of re-downloading static files over SSL, since JavaScript and graphics stay in place while only the raw results are updated&#8230; That is certainly one useful way to keep things snappy over SSL!</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2010/10/26/ok-lets-work-to-make-ssl-easier-for-everyone/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>keep your hands off my session cookies</title>
		<link>http://benlog.com/articles/2010/10/25/keep-your-hands-off-my-session-cookies/</link>
		<comments>http://benlog.com/articles/2010/10/25/keep-your-hands-off-my-session-cookies/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 22:05:40 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[crypto]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1401</guid>
		<description><![CDATA[For years, security folks &#8212; myself included &#8212; have warned about the risk of personalized web sites such as Google, Facebook, Twitter, etc. being served over plain HTTP, as opposed to the more secure HTTPS, especially given the proliferation of &#8230; <a href="http://benlog.com/articles/2010/10/25/keep-your-hands-off-my-session-cookies/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For years, security folks &#8212; myself included &#8212; have warned about the risk of personalized web sites such as Google, Facebook, Twitter, etc. being served over plain HTTP, as opposed to the more secure HTTPS, especially given the proliferation of open wifi networks. But warnings from security freaks rarely get people&#8217;s attention. A demonstration is worth a lot more, and that&#8217;s exactly what Eric Butler did with <a href="http://codebutler.com/firesheep">FireSheep</a>, a Firefox plugin that lets you instantly see who on your local network is surfing well-known sites, grab their unencrypted cookie, and &#8220;become&#8221; them on the given site. Nice work Eric!</p>
<p>(I must also point out Ben Laurie&#8217;s <a href="http://www.links.org/?p=1019">post on this topic</a> and his always-hilarious take, &#8220;these are not the credentials you&#8217;re looking for!&#8221;)</p>
<p>Some folks are wondering if this will be a watershed event where major sites will suddenly shift to serving everything over SSL. I don&#8217;t think so. The performance implications of serving everything, including static content, over SSL, are staggering. While working on my secure voting system <a href="http://heliosvoting.org">Helios</a>, I noticed that I could easily serve a static image over HTTP about 1500 times per second on a medium-sized server. Add SSL to that, and squeezing out more than 50 images per second becomes a significant challenge. Now, I&#8217;m sure there are folks who can tweak SSL far better than I, but it&#8217;s still going to be a significant amount of overhead, not to mention that caching content over SSL typically doesn&#8217;t happen, which means every graphic, every JavaScript file, is reloaded every time the user navigates to a new page. At the end of the day, a web site served over SSL is a significant amount of extra server-side overhead and, even if you do it right, it just won&#8217;t be as snappy in the browser. Users will complain, and that makes SSL-everywhere very unlikely. I would be happy to be proven wrong, but I just don&#8217;t think SSL everywhere is happening anytime soon.</p>
<p>What sucks is that there is no in-between. It would be nice if a web page could mix and match SSL and non-SSL components, so that images and JavaScript could be loaded without the overhead of SSL. Of course, that&#8217;s not nearly as secure, but it would defend against a passive attacker like FireSheep. Active attackers would still be able to cause damage, but then again active attackers are quite a bit harder to achieve and to defend against, so maybe an in-between defense is good enough. Unfortunately, if you try to mix and match secure and insecure resources, you get some nasty warnings / broken locks on most browsers. For good reason, too, since the browsers are defending against active attackers, but still, too bad there&#8217;s no usable way to achieve in-between security.</p>
<p>It would also be nice if web developers could easily use a more secure approach to authentication, one that doesn&#8217;t simply send over a cookie. Something like HTTP Digest Auth, only of course *not* Digest Auth itself since that doesn&#8217;t fit in nicely with the way web sites like to manage their users&#8217; sessions (timeouts, explicit logout, &#8230;) </p>
<h4>SessionLock Lite</h4>
<p>A couple of years ago, I proposed an in-between solution called SessionLock [<a href="http://www2008.org/papers/pdf/p517-adida.pdf">PDF</a>]. This approach uses a combination of JavaScript and message-passing via the URL fragment identifier to cause every link, every AJAX request, etc. to be signed. Think of this as a more powerful version of HTTP Digest Auth that allows web sites to fully control login/logout procedures. The <em>content</em> of the web sites you visit with SessionLock is not protected. If you look at what your friends are doing on Facebook, someone with FireSheep might be able to see that, too. But, crucially, they wouldn&#8217;t be able to post new status updates, add friends, view data you haven&#8217;t viewed yourself during that session, etc. Is that good enough? I&#8217;m not sure, but I do think it provides a much more intuitive level of protection: when you&#8217;re on a public wifi network, you should always assume someone is casually looking over your shoulder. But you shouldn&#8217;t have to worry that they&#8217;re completely taking over your keyboard (I mean, that&#8217;s just rude!)</p>
<p>Shockingly enough, SessionLock has not caught on, and I often cry myself to sleep at night wondering why&#8230; Maybe it was too complicated? So, for those web sites thinking about what to do to respond to FireSheep, I propose SessionLock Lite. It requires a modern browser, IE8+, FF3+, Safari 4+, or Chrome, and it doesn&#8217;t fully protect against FireSheep, but it makes FireSheep&#8217;s stolen sessions valid only for a very short period of time (a few seconds). Could this be a reasonable compromise?</p>
<p>The idea is this:</p>
<ul>
<li> the web site, say facebook.com, logs you in over SSL the way it currently does, and sets a <em>secure session cookie</em> that is only transmitted over SSL.</li>
<li> when the site redirects you to the plain HTTP site, the way it currently does, the plain HTTP site opens up an invisible IFRAME onto the SSL-protected version of the site.</li>
<li> the SSL IFRAME computes, every few seconds, a new token that is timestamped so it is valid for only a few seconds. This is likely done using HMAC and the secure cookie as the key. HMAC can be computed in JavaScript in a few milliseconds.</li>
<li> the new token is communicated to the containing HTTP frame using <tt>postMessage()</tt>, which is the main reason you need a modern browser.</li>
<li> the containing HTTP frame then uses this token as its unencrypted cookie.</li>
</ul>
<p>Effectively, the SSL channel is used to refresh the session cookie very rapidly, all locally in the browser, without making SSL requests to the server other than the initial request to a very small file when the page loads. This is particularly optimized for AJAX-heavy sites like Facebook and Twitter, where the SSL IFRAME will live on for minutes or hours. While you&#8217;re using the site, someone on FireSheep can use it, too. But the moment you stop using it, they can no longer use it either.</p>
<p>This is not anywhere near a complete solution, but it&#8217;s a very cheap solution that costs almost nothing performance-wise, requires changing very little code, and certainly reduces the damage FireSheep-wielding attackers can cause.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2010/10/25/keep-your-hands-off-my-session-cookies/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>faulty logic, even for good, is still faulty</title>
		<link>http://benlog.com/articles/2010/10/10/faulty-logic-even-for-good-is-still-faulty/</link>
		<comments>http://benlog.com/articles/2010/10/10/faulty-logic-even-for-good-is-still-faulty/#comments</comments>
		<pubDate>Sun, 10 Oct 2010 19:34:57 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[voting]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1361</guid>
		<description><![CDATA[So Alex Halderman and team hacked the DC Internet Voting pilot. The voting system they attacked was not particularly well secured, and the type of attack used is a fairly simple web input corruption attack with little novelty. This hack, &#8230; <a href="http://benlog.com/articles/2010/10/10/faulty-logic-even-for-good-is-still-faulty/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So Alex Halderman and team <a href="http://www.freedom-to-tinker.com/blog/jhalderm/hacking-dc-internet-voting-pilot">hacked the DC Internet Voting pilot</a>. The voting system they attacked was not particularly well secured, and the type of attack used is a fairly simple web input corruption attack with little novelty. This hack, however, performs a very useful task: educating election officials and the public about what hacks against an Internet Voting System look like.</p>
<p>What happens next is going to be very interesting. The folks who have been fighting hard against Internet Voting should be careful not to use the same faulty logic they&#8217;ve been criticizing for years. When the discussion was about paper was electronic voting machines, some election officials said &#8220;well, *I*&#8217;ve never seen anything go wrong, show me an example!&#8221; And the answer we, computer security specialists, gave was some variation of &#8220;<em>how do you know</em> nothing went wrong?&#8221; or, in the words of Dijkstra, &#8220;Program testing can be used to show the presence of bugs, but never to show their absence.&#8221;</p>
<p>What reasoning applies, then, when we <em>do</em> find a bug? We are faced with an effective attack against a <em>specific</em> Internet Voting system. It&#8217;s easy to get carried away&#8230; Verified Voting just declared the <a href="http://blog.verifiedvoting.org/2010/10/10/1037">Dangers of Internet Voting confirmed</a> saying:</p>
<blockquote><p>
we have a visceral demonstration of just how serious the threats really are.
</p></blockquote>
<p>yes, so far I agree,&#8230;</p>
<blockquote><p>
But do legislators and election officials fully understand what Dr. Halderman’s team has taught us? We’ve been given a lesson on how easy it is for attackers to penetrate and control not just this system, but any Internet voting system.
</p></blockquote>
<p>Ummm, no. That&#8217;s incorrect reasoning. Remember the important question: <em>how do you know?</em> We know that <em>this</em> system in question is insecure. But we have no proof that <em>all</em> Internet Voting systems are insecure. This is the same faulty logic of inappropriate generalization we accused the election officials of only months ago!</p>
<p>Now, once again, I need to clarify: I agree that Internet Voting for high-stakes elections is deeply problematic, and I&#8217;m against it. Interestingly, I don&#8217;t think this server-penetration hack represents the inherent problem with Internet Voting, because, given sufficient work, we could probably secure a voting server. The core problem is that <em>end-users&#8217; computers can&#8217;t be secured</em>, making it possible to defraud the election even if the server is very secure. But whatever I think, and whatever everyone else thinks, this particular hack does not prove anything about the security of all Internet Voting systems in general.</p>
<p>If we, as security professionals, attempt to leverage and over-generalize this one incident, we&#8217;re just as guilty of overlooking sound security reasoning to push a particular agenda, exactly what we saw some election officials doing in 2004-2006 with electronic voting machines. In the long run, this greatly undermines scientifically-based arguments against Internet Voting. The ends do not justify the means.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2010/10/10/faulty-logic-even-for-good-is-still-faulty/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Fort Knox vs. the Barking Dog</title>
		<link>http://benlog.com/articles/2010/10/06/fort-knox-vs-the-barking-dog/</link>
		<comments>http://benlog.com/articles/2010/10/06/fort-knox-vs-the-barking-dog/#comments</comments>
		<pubDate>Wed, 06 Oct 2010 05:51:05 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[security]]></category>
		<category><![CDATA[voting]]></category>

		<guid isPermaLink="false">http://benlog.com/?p=1324</guid>
		<description><![CDATA[Over the last few days, Alex Halderman and his team at the University of Michigan hacked an Internet Voting System being field-tested by the DC Board of Elections. First, we need to commend both Alex&#8217;s team for their dutiful analysis &#8230; <a href="http://benlog.com/articles/2010/10/06/fort-knox-vs-the-barking-dog/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Over the last few days, Alex Halderman and his team at the University of Michigan <a href="http://www.freedom-to-tinker.com/blog/jhalderm/hacking-dc-internet-voting-pilot">hacked an Internet Voting System being field-tested by the DC Board of Elections</a>. First, we need to commend both Alex&#8217;s team for their dutiful analysis of this system, and, more importantly, the DC Board of Elections for running an open security evaluation of their system. I say &#8220;more importantly&#8221; because there is very little good press to gain from such a test: in fact the DC Board of Elections is already getting a lot of grief, the hah-hah-they-got-haxored articles just write themselves. I think they did exactly the right thing: they experimented with a technology, and they did so by running an open security evaluation. Kudos to them. I sincerely hope that this is the beginning of a trend, and even those who criticize Internet Voting should take a few moments to first commend the DC Board of Elections.</p>
<p>The Halderman DC Internet Voting Hack is not specific to voting: it&#8217;s a fairly standard input-corruption attack on a web application. With more work and more security testing, the voting system will probably get better and more difficult to attack. More consistent input validation, running the server chrooted to limit the effects of this kind of attack, etc. Much can be done to make the voting application more secure. But, as Halderman and team correctly point out, it will never be fully secure, because nothing ever is.</p>
<p>The first and obvious conclusion is that Internet Voting for high-stakes public-office election is a very risky proposition, because suddenly your world of eligible attackers includes anyone with an Internet connection. But there&#8217;s a deeper conclusion, and I find it surprising that many voting security pros don&#8217;t see this more clearly: when we say &#8220;every system is vulnerable to attack&#8221;, that includes paper-based voting systems! Without an internet connection, it&#8217;s harder to attack a paper-based voting system, but it&#8217;s still doable. And the key problem is that, when a paper-based voting system gets attacked, the recovery story is not much better than that of an Internet Voting system.</p>
<p>The best example of this sad state of voting security is one I learned from Alex&#8217;s previous work hacking the Indian voting machines: in remote precincts in India, with their paper-ballot voting system (prior to the recent Electronic Voting Machines that have resulted in so much controversy), there&#8217;s long a type of attack called &#8220;precinct capture,&#8221; where attackers literally hijack a precinct and take the staff hostage while they stuff the ballot box with extra votes. Then they leave. Oh sure, you know who did it. But what can you possibly do to recover? Which votes do you discard?</p>
<p>My friend and voting technology veteran Jim Adler likes to talk about &#8220;Fort Knox vs. Barking Dog.&#8221; If you think about security like Fort Knox, where you focus on preventing someone from penetrating your defenses, you&#8217;ve got to invest incredible amounts of money and build incredibly sophisticated fences. If your defenses fail, and someone penetrates Fort Knox, gets the gold, and leaves, you are screwed. Because it&#8217;s gold, it&#8217;s not traceable, and once it&#8217;s stolen, it&#8217;s gone for good and there&#8217;s no way to recover.</p>
<p>The Barking Dog model is different. You still build fences. Maybe even a fancy lock. But more importantly, you get a well-trained dog, maybe even two or three for redundancy. And you assume that some of your fences will fail, because that&#8217;s what fences do when faced with smart intruders. When they do fail, and someone comes in, that&#8217;s where the barking dog comes in. Your defenses may fail, but your detectors will sound the alarm, allow you to respond and, hopefully, recover from the intrusion.</p>
<p>So back to voting with our new-found Knox v. Dog wisdom. Can we get a &#8220;barking dog&#8221; model of voting? The main reason it&#8217;s not so easy is because of the secret ballot: we want to ensure that, other than you, no one knows how you really voted. Because of this simple requirement, it&#8217;s very, very difficult to detect a problem. Even with paper-based systems, the answer is &#8220;sort of&#8221; at best. There&#8217;s a bunch of fascinating research into optimal auditing techniques, but the problem with all of these techniques is that the dog barks only under certain conditions, and even then only way too late. By the time you find out that something bad happened, there&#8217;s no way to recover. Consider again the Indian precinct capture attack. What can you possibly do to recover from that?</p>
<p>The Barking Dog is only useful if it barks in time for you to do something about it. That&#8217;s why I am increasingly convinced that, now that we have the technology to build systems that can be truly audited by the public thanks to individual tracking numbers and cryptographic auditing techniques, all while preserving the secret ballot, it&#8217;s simply sound engineering to do so. With these open-audit systems, any voter can be a barking dog.</p>
<p>So, we should clearly rethink our attempts at Internet Voting in high-stakes public-office elections. But, by the same token, we should rethink <em>all</em> election processes that do not provide recovery from error or attack. Paper-ballot systems may be noticeably less vulnerable to attack than Internet voting systems, but once they are attacked, they are hardly more recoverable. Now that we know how to do better, we should not rely on a Fort Knox, impenetrable-fence model of voting security, even with paper ballots.</p>
<p><b>UPDATE</b>: Jim dug up the archeological trail of the Barking Dog in voting technology: <a href="http://blog.jimadler.name/2004/04/votehere-releases-vhti-source-code.html">a VoteHere blog post referencing an MSNBC report on their technology</a>. Also, typo fix and clarification regarding the Indian precinct capture attack.</p>
]]></content:encoded>
			<wfw:commentRss>http://benlog.com/articles/2010/10/06/fort-knox-vs-the-barking-dog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

