{"id":1517,"date":"2013-09-08T11:31:03","date_gmt":"2013-09-08T16:31:03","guid":{"rendered":"https:\/\/scottaaronson.blog\/?p=1517"},"modified":"2017-01-12T12:31:14","modified_gmt":"2017-01-12T17:31:14","slug":"nsa-possibly-breaking-us-laws-but-still-bound-by-laws-of-computational-complexity","status":"publish","type":"post","link":"https:\/\/scottaaronson.blog\/?p=1517","title":{"rendered":"NSA: Possibly breaking US laws, but still bound by laws of computational complexity"},"content":{"rendered":"<p><span style=\"color: #ff0000;\"><strong>Update (Sept. 9):<\/strong><\/span> Reading more about these things, and talking to friends who are experts in applied cryptography, has caused me to do the unthinkable, and <em>change my mind<\/em> somewhat.\u00a0 I now feel that, while the views expressed in this post were OK as far as they went, they failed to do justice to the &#8230; <em>complexity<\/em> (har, har) of what&#8217;s at stake.\u00a0 Most importantly, I didn&#8217;t clearly explain that there&#8217;s an enormous continuum between, on the one hand, a full break of RSA or Diffie-Hellman (which still seems extremely unlikely to me), and on the other, &#8220;pure side-channel attacks&#8221; involving no new cryptanalytic ideas.\u00a0 Along that continuum, there are many plausible places where the NSA might be.\u00a0 For example, imagine that they had a combination of side-channel attacks, novel algorithmic advances, <em>and<\/em> sheer computing power that enabled them to factor, let&#8217;s say, ten 2048-bit RSA keys every year.\u00a0 In such a case, it would still make perfect sense that they&#8217;d want to insert backdoors into software, sneak vulnerabilities into the standards, and do whatever else it took to minimize their need to resort to such expensive attacks.\u00a0 But the possibility of number-theoretic advances well beyond what the open world knows certainly wouldn&#8217;t be ruled out.\u00a0 Also, as Schneier has emphasized, the fact that NSA has been aggressively pushing elliptic-curve cryptography in recent years invites the obvious speculation that they know <em>something<\/em> about ECC that the rest of us don&#8217;t.<\/p>\n<p>And that brings me to a final irony in this story.\u00a0 When a simpleminded complexity theorist like me hears his crypto friends going on and on about the latest clever attack that still requires exponential time, but that puts some of the keys in current use <em>just within reach<\/em> of gigantic computing clusters, his first instinct is to pound the table and shout: &#8220;well then, so why not just increase all your key sizes by a factor of ten?\u00a0 Sweet Jesus, the asymptotics are on your side!\u00a0 if you saw a killer attack dog on a leash, would you position yourself <em>just outside<\/em> what you guesstimated to be the leash&#8217;s radius?\u00a0 why not walk a mile away, if you can?&#8221;\u00a0 The crypto experts invariably reply that it&#8217;s a lot more complicated than I realize, because standards, and efficiency, and smartphones &#8230; and before long I give up and admit that I&#8217;m way out of my depth.<\/p>\n<p>So it&#8217;s amusing that one obvious response to the recent NSA revelations&#8212;a response that sufficiently-paranoid people, organizations, and governments might well actually take, in practice&#8212;precisely matches the na\u00efve complexity-theorist intuition.\u00a0 Just increase the damn key sizes by a factor of ten (or whatever).<\/p>\n<p><span style=\"color: #ff0000;\"><strong>Another Update (Sept. 20):<\/strong><\/span> In my original posting, I should also have linked to <a href=\"http:\/\/blog.cryptographyengineering.com\/2013\/09\/on-nsa.html\">Matthew Green&#8217;s excellent post<\/a>.\u00a0 My bad.<\/p>\n<hr \/>\n<p>Last week, I got an email from a journalist with the following inquiry.\u00a0 The recent <a href=\"http:\/\/www.wired.com\/threatlevel\/2013\/08\/black-budget\/\">Snowden revelations<\/a>, which made public for the first time the US government&#8217;s &#8220;black budget,&#8221; contained the following enigmatic line from the Director of National Intelligence: &#8220;We are investing in groundbreaking cryptanalytic capabilities to defeat adversarial cryptography and exploit internet traffic.&#8221;\u00a0 So, the journalist wanted to know, what could these &#8220;groundbreaking&#8221; capabilities be?\u00a0 And in particular, was it possible that the NSA was buying quantum computers from D-Wave, and using them to run Shor&#8217;s algorithm to break the RSA cryptosystem?<\/p>\n<p>I replied that, yes, that&#8217;s &#8220;possible,&#8221; but only in the same sense that it&#8217;s &#8220;possible&#8221; that the NSA is using the Easter Bunny for the same purpose.\u00a0 (For one thing, D-Wave themselves have said repeatedly that they have no interest in Shor&#8217;s algorithm or factoring.\u00a0 Admittedly, I guess that&#8217;s what D-Wave <em>would<\/em> say, were they making deals with NSA on the sly!\u00a0 But it&#8217;s also what the Easter Bunny would say.)\u00a0 More generally, I said that if the open scientific world&#8217;s understanding is anywhere close to correct, then quantum computing might <em>someday<\/em> become a practical threat to cryptographic security, but it isn&#8217;t one yet.<\/p>\n<p>That, of course, raised the extremely interesting question of what &#8220;groundbreaking capabilities&#8221; the Director of National Intelligence <em>was<\/em> referring to.\u00a0 I said my personal guess was that,\u00a0with ~99% probability, he meant various implementation vulnerabilities and side-channel attacks&#8212;the sort of thing that we <em>know<\/em> has compromised deployed cryptosystems many times in the past, but where it&#8217;s very easy to believe that the NSA is ahead of the open world.\u00a0 With ~1% probability, I guessed, the NSA made some sort of big improvement in classical algorithms for factoring, discrete log, or other number-theoretic problems.\u00a0 (I would&#8217;ve guessed even less than 1% probability for the latter, before the recent <a href=\"http:\/\/eprint.iacr.org\/2013\/095.pdf\">breakthrough by Joux<\/a> solving discrete log in fields of small characteristic in quasipolynomial time.)<\/p>\n<p>Then, on Thursday, a big <a href=\"http:\/\/www.nytimes.com\/2013\/09\/06\/us\/nsa-foils-much-internet-encryption.html?pagewanted=1&amp;_r=0&amp;hp\"><em>New York Times<\/em> article<\/a> appeared, based on 50,000 or so documents that Snowden leaked to the <em>Guardian<\/em> and that still aren&#8217;t public.\u00a0 (See also an <a href=\"http:\/\/www.theguardian.com\/world\/2013\/sep\/05\/nsa-how-to-remain-secure-surveillance\">important <em>Guardian<\/em> piece<\/a> by security expert Bruce Schneier, and <a href=\"http:\/\/www.theguardian.com\/commentisfree\/2013\/sep\/06\/nsa-surveillance-revelations-encryption-expert-chat\">accompanying Q&amp;A<\/a>.)\u00a0 While a lot remains vague, there might be more public information right now about current NSA cryptanalytic capabilities than there&#8217;s ever been.<\/p>\n<p>So, how did my uninformed, armchair guesses fare?\u00a0 It&#8217;s only halfway into the NYT article that we start getting some hints:<\/p>\n<p style=\"padding-left: 30px;\">The files show that the agency is still stymied by some encryption, as Mr. Snowden suggested in a <a title=\"Article from The Guardian\" href=\"http:\/\/www.theguardian.com\/world\/2013\/jun\/18\/edward-snowden-live-q-and-a-eight-things\">question-and-answer session<\/a> on The Guardian\u2019s Web site in June.<\/p>\n<p style=\"padding-left: 30px;\">\u201cProperly implemented strong crypto systems are one of the few things that you can rely on,\u201d he said, though cautioning that the N.S.A. often bypasses the encryption altogether by targeting the computers at one end or the other and grabbing text before it is encrypted or after it is decrypted&#8230;<\/p>\n<p style=\"padding-left: 30px;\">Because strong encryption can be so effective, classified N.S.A. documents make clear, the agency\u2019s success depends on working with Internet companies \u2014 by getting their voluntary collaboration, forcing their cooperation with court orders or surreptitiously stealing their encryption keys or altering their software or hardware&#8230;<\/p>\n<p style=\"padding-left: 30px;\">Simultaneously, the N.S.A. has been deliberately weakening the international encryption standards adopted by developers. One goal in the agency\u2019s 2013 budget request was to \u201cinfluence policies, standards and specifications for commercial public key technologies,\u201d the most common encryption method.<\/p>\n<p style=\"padding-left: 30px;\">Cryptographers have long suspected that the agency planted vulnerabilities in a standard adopted in 2006 by the National Institute of Standards and Technology and later by the International Organization for Standardization, which has 163 countries as members.<\/p>\n<p style=\"padding-left: 30px;\">Classified N.S.A. memos appear to confirm that the fatal weakness, discovered by two Microsoft cryptographers in 2007, was engineered by the agency. The N.S.A. wrote the standard and aggressively pushed it on the international group, privately calling the effort \u201ca challenge in finesse.\u201d<\/p>\n<p>So, in pointing to implementation vulnerabilities as the most likely possibility for an NSA &#8220;breakthrough,&#8221; I might have actually erred a bit too far on the side of technological interestingness.\u00a0 It seems that a large part of what the NSA has been doing has simply been strong-arming Internet companies and standards bodies into giving it backdoors.\u00a0 To put it bluntly: sure, if it wants to, the NSA can probably read your email.\u00a0 But <em>that isn&#8217;t mathematical cryptography&#8217;s fault<\/em>&#8212;any more than it would be mathematical crypto&#8217;s fault if goons broke into your house and carted away your laptop.\u00a0 On the contrary, properly-implemented, backdoor-less strong crypto is something that apparently <em>scares<\/em> the NSA enough that they go to some lengths to keep it from being widely used.<\/p>\n<p>I should add that, regardless of <em>how<\/em> NSA collects all the private information it does&#8212;by &#8220;beating crypto in a fair fight&#8221; (!) or, more likely, by exploiting backdoors that it itself installed&#8212;the mere <em>fact<\/em> that it collects so much is of course unsettling enough from a civil-liberties perspective.\u00a0 So I&#8217;m glad that the Snowden revelations have sparked a public debate in the US about how much surveillance we as a society want (i.e., &#8220;the balance between preventing 9\/11 and preventing Orwell&#8221;), what safeguards are in place to prevent abuses, and whether those safeguards actually work.\u00a0 Such a public debate is essential if we&#8217;re serious about calling ourselves a democracy.<\/p>\n<p>At the same time, to me, perhaps the most shocking feature of the Snowden revelations is just how <em>un<\/em>shocking they&#8217;ve been.\u00a0 So far, I haven&#8217;t seen anything that shows the extent of NSA&#8217;s surveillance to be <em>greater<\/em> than what I would&#8217;ve considered plausible <em>a priori<\/em>.\u00a0 Indeed, the following could serve as a one-sentence summary of what we&#8217;ve learned from Snowden:<\/p>\n<p style=\"padding-left: 30px;\">Yes, the NSA <em>is<\/em>, in fact, doing the questionable things that anyone not living in a cave had long assumed they were doing&#8212;that assumption being so ingrained in nerd culture that countless jokes are based around it.<\/p>\n<p>(Come to think of it, people living in caves might have been even <em>more<\/em> certain that the NSA was doing those things.\u00a0 Maybe that&#8217;s why they moved to caves.)<\/p>\n<p>So, rather than dwelling on civil liberties, national security, yadda yadda yadda, let me move on to discuss the implications of the Snowden revelations for something that <em>really<\/em> matters: a 6-year-old storm in theoretical computer science&#8217;s academic teacup.\u00a0 As many readers of this blog might know, Neal Koblitz&#8212;a respected mathematician and pioneer of elliptic curve cryptography, <del>who (from numerous allusions in his writings) appears to have some connections at the NSA<\/del> (on reflection, this is unfair to Koblitz; he does report\u00a0conversations with NSA people in his writings, but has never had any financial connection with NSA)&#8212;published a series of <a href=\"http:\/\/www.ams.org\/notices\/200708\/tx070800972p.pdf\">scathing<\/a> <a href=\"http:\/\/www.ams.org\/notices\/201003\/rtx100300357p.pdf\">articles<\/a>, in the <em>Notices of the American Mathematical Society<\/em> and elsewhere, attacking the theoretical computer science approach to cryptography.\u00a0 Koblitz&#8217;s criticisms were varied and entertainingly-expressed: the computer scientists are too sloppy, deadline-driven, self-promoting, and corporate-influenced; overly trusting of so-called &#8220;security proofs&#8221; (a term they shouldn&#8217;t even use, given how many errors and exaggerated claims they make); absurdly overreliant on asymptotic analysis; &#8220;bodacious&#8221; in introducing dubious new hardness assumptions that they then declare to be &#8220;standard&#8221;; and woefully out of touch with cryptographic realities.\u00a0 Koblitz seemed to suggest that, rather than demanding the security reductions so beloved by theoretical computer scientists, people would do better to rest the security of their cryptosystems on two alternative pillars: first, standards set by organizations like the NSA with actual real-world experience; and second, the judgments of mathematicians with &#8230;\u00a0<em>taste<\/em> and <em>experience<\/em>, who can just <em>see<\/em> what&#8217;s likely to be vulnerable and what isn&#8217;t.<\/p>\n<p>Back in 2007, my mathematician friend Greg Kuperberg pointed out the irony to me: here we had a mathematician, lambasting computer scientists for trying to do for cryptography what mathematics itself has sought to do for <em>everything<\/em> since Euclid!\u00a0 That is, when you see an unruly mess of insights, related to each other in some tangled way, systematize and organize it.\u00a0 Turn the tangle into a hierarchical tree (or dag).\u00a0 Isolate the <em>minimal<\/em> assumptions (one-way functions?\u00a0 decisional Diffie-Hellman?) on which each conclusion can be based, and spell out all the logical steps needed to get from here to there&#8212;even if the steps seem obvious or boring.\u00a0 Any time anyone has tried to do that, it&#8217;s been easy for the natives of the unruly wilderness to laugh at the systematizing newcomers: the latter often know the terrain less well, and take ten times as long to reach conclusions that are ten times less interesting.\u00a0 And yet, in case after case, the clarity and rigor of the systematizing approach has eventually won out.\u00a0 So it seems weird for a mathematician, of all people, to bet against the systematizing approach when applied to cryptography.<\/p>\n<p>The reason I&#8217;m dredging up this old dispute now, is that I think the recent NSA revelations might put it in a slightly new light.\u00a0 In his article&#8212;whose main purpose is to offer practical advice on how to safeguard one&#8217;s communications against eavesdropping by NSA or others&#8212;Bruce Schneier offers the following tip:<\/p>\n<p style=\"padding-left: 30px;\">Prefer conventional discrete-log-based systems over elliptic-curve systems; the latter have constants that the NSA influences when they can.<\/p>\n<p>Here Schneier is pointing out a specific issue with ECC, which would be solved if we could &#8220;merely&#8221; ensure that NSA or other interested parties weren&#8217;t providing input into which elliptic curves to use.\u00a0 But I think there&#8217;s also a broader issue: that, in cryptography, it&#8217;s unwise to trust any standard because of the prestige, real-world experience, mathematical good taste, or <em>whatever else<\/em> of the people or organizations proposing it.\u00a0 What was long a plausible conjecture&#8212;that the NSA covertly influences cryptographic standards to give itself backdoors, and that otherwise-inexplicable vulnerabilities in deployed cryptosystems are sometimes there because the NSA <em>wanted<\/em> them there&#8212;now looks close to an established fact.\u00a0 In cryptography, then, it&#8217;s not just for idle academic reasons that you&#8217;d like a publicly-available trail of research papers and source code, open to criticism and improvement by anyone, that takes you all the way from the presumed hardness of an underlying mathematical problem to the security of your system under whichever class of attacks is relevant to you.<\/p>\n<p>Schneier&#8217;s final piece of advice is this: &#8220;Trust the math.\u00a0 Encryption is your friend.&#8221;<\/p>\n<p><em>&#8220;Trust the math.&#8221;<\/em>\u00a0 On that note, here&#8217;s a slightly-embarrassing confession.\u00a0 When I&#8217;m watching a suspense movie (or a TV show like <em>Homeland<\/em>), and I reach one of those nail-biting scenes where the protagonist discovers that everything she ever believed is a lie, I sometimes mentally recite the proof of the Karp-Lipton Theorem.\u00a0 It always calms me down.\u00a0 Even if the entire universe turned out to be a cruel illusion, it would still be the case that NP \u2282 P\/poly would collapse the polynomial hierarchy, and I can tell you exactly why.\u00a0 It would likewise be the case that you couldn&#8217;t break the GGM pseudorandom function without also breaking the underlying pseudorandom generator on which it&#8217;s based.\u00a0 Math could be <em>defined<\/em> as that which can still be trusted, even when you can&#8217;t trust anything else.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update (Sept. 9): Reading more about these things, and talking to friends who are experts in applied cryptography, has caused me to do the unthinkable, and change my mind somewhat.\u00a0 I now feel that, while the views expressed in this post were OK as far as they went, they failed to do justice to the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false},"categories":[5,11],"tags":[],"class_list":["post-1517","post","type-post","status-publish","format-standard","hentry","category-complexity","category-nerd-interest"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/1517","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1517"}],"version-history":[{"count":17,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/1517\/revisions"}],"predecessor-version":[{"id":2305,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=\/wp\/v2\/posts\/1517\/revisions\/2305"}],"wp:attachment":[{"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1517"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1517"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scottaaronson.blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1517"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}