<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Eric Wustrow on Medium]]></title>
        <description><![CDATA[Stories by Eric Wustrow on Medium]]></description>
        <link>https://medium.com/@ewust?source=rss-de14e98fe6cd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*kZwJ5ZfjUM64N0li.jpg</url>
            <title>Stories by Eric Wustrow on Medium</title>
            <link>https://medium.com/@ewust?source=rss-de14e98fe6cd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 00:39:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ewust/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Meltdown and Spectre: Yet another semi-technical explanation]]></title>
            <link>https://medium.com/@ewust/meltdown-and-spectre-yet-another-semi-technical-explanation-e92081783509?source=rss-de14e98fe6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/e92081783509</guid>
            <category><![CDATA[respect]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[meltdown]]></category>
            <dc:creator><![CDATA[Eric Wustrow]]></dc:creator>
            <pubDate>Sat, 06 Jan 2018 07:19:40 GMT</pubDate>
            <atom:updated>2018-01-06T07:21:10.990Z</atom:updated>
            <content:encoded><![CDATA[<p>You may have seen over the past week several articles explaining two recently published vulnerabilities —<a href="https://meltdownattack.com/"> Meltdown and Spectre</a> — and how they work. While there are many fantastic articles already, I suspect most people’s eyes glaze over when they encounter words like “speculative execution” and “out of order processing”, unless they’ve taken advanced microarchitecture courses. But the implications of these vulnerabilities are far-reaching, and I suspect we will be haunted by this class of problem for years to come. For this reason, I think it’s important to understand (if only at a high level) how these attacks work.</p><h3>Background</h3><p>To understand the basics of Meltdown and Spectre, we need to remember one key insight: <strong>Computers are fantastically impatient devices</strong>. CPUs execute series of instructions at a fervent pace, on the order of billions of instructions per second. To consistently achieve this performance, modern CPUs employ all kinds of clever tricks, most of which are designed to be invisible to programmers, developers, and users beyond the obvious “whoa, this chip is <em>fast</em>”.</p><p>One such trick that many people are familiar with is <strong>caching</strong>, where the CPU remembers a small set of recently accessed memory in a relatively fast bank of memory closer to the chip, in hopes that future loads from those memory locations can be responded to faster. Loads from memory locations that haven’t been cached might take on the order of 100s of nanoseconds, while reads from cache might take only 10 nanoseconds.</p><p>Another trick CPUs employ is <strong>pipelining</strong>, where the CPU breaks instructions up into smaller parts and executes them in series, much like an assembly line for building a car. Each “station” in this pipeline does something specific, just like an assembly line: one station welds the body, one installs the engine, another puts in the drivetrain, and eventually someone paints it. Each station is only doing one thing, but put together they assemble a whole car. And even though each station has to wait for the previous one to complete, nobody ever sits idle because there are multiple cars being built at the same time in various stages of completion. This is exactly what CPUs do, but with low-level machine code instructions instead of cars.</p><p>So far, this is all review for most programmers that took a basic architecture course, but here is where things start to get complicated. First, while the pipeline works if we only ever do one thing (e.g. build one kind of car), it doesn’t work so well if we have to switch tasks and start building another kind of car. If after we’ve completed our 100th car, Elon Musk says we’re going to build trucks instead of cars, and we should scrap everything we’re doing and retool the assembly line to build them, we still have a bunch of cars in various stages of completion on our assembly line. All of that work is wasted, and the workers will grumble in unison.</p><p>CPUs have a similar problem: sometimes they’re partway through executing one series of instructions, when all of a sudden they have to start executing another series altogether. This can happen in the case of a <strong>branch</strong>, which could be because your code had an <em>if</em> statement or conditional loop in it that requires the CPU jump to some other part of code. In these cases, the CPU has to do a <strong>pipeline flush</strong>, removing all the partially completed instructions from the assembly line, and start over (now building trucks instead of cars).</p><p>But as we said before, CPUs are impatient and they hate sitting idle. To avoid the thumb-twiddling agony that is a pipeline flush, CPUs will try their hardest to always be doing something useful. One way that a CPU can avoid a pipeline flush is by accurate <strong>branch prediction</strong>, where the CPU makes a really good guess as to where the new series of instructions is going to come from when it sees a branch. Modern CPUs try to do this <em>even before</em> all the operands of a branch are known. For example, if your branch goes left if X is 0, and right otherwise, the CPU will try to guess if it should go left or right without even knowing the value of X. If it guesses correctly, it can avoid the pipeline flush, and always be executing useful instructions.</p><p>This is as if a clever factory worker notices that Elon only ever seems to build 100 of anything before getting bored and moving on to another project, and so when the 100th car enters the first station of the assembly line, the clever worker notices that Elon has been tweeting about trucks a lot, and makes the 101st thing to enter the assembly line a truck instead of another car. Maybe the worker is wrong (and is fired), but if they’re right, the assembly line is always doing something useful.</p><p>The final piece of the puzzle is the most bizarre: CPUs execute instructions <strong>out of order</strong>. This means that if you wrote a program that did Instruction 1 and then Instruction 2, the CPU might look at that and decide that Instruction 2 is going to take longer, so it had better get started on that before Instruction 1, in the hopes that both instructions will complete at the same time. The details of this are complicated, but essentially if a CPU is waiting for one instruction to complete, it will try to execute other <em>future instructions</em> in the meantime while it waits. Now of course, it can’t actually let those other instructions complete before the first instruction, so it has to keep their results a secret until the first one completes. Only after the first instruction finally completes, the CPU has already done the next few instructions, and can immediately share their results. Efficient!</p><h3>Meltdown</h3><p>Now that we have the background, let’s look at how Meltdown works. In Meltdown, the attacker can run code in unprivileged user space, and the goal is to read protected kernel memory. Normally, trying to read directly from kernel memory would result in a <em>segfault</em>, and the attacker would not learn anything about the contents of the kernel’s memory. However, as we’ll see, Meltdown lets us indirectly read this restricted memory anyway.</p><p>To illustrate Meltdown, let’s imagine a very basic system, with a small 16-byte cache, and 256-bytes of memory, split between the kernel and the userspace program. In this example, the program is reading from its memory, by issuing a read call and storing the result in register r2. At the end of this execution, the CPU will load the requested memory (address 0xF0) into the cache, and the value of r2 will be the contents of that memory (0x88).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N2B9tN9hYgLdudhz2yWaOQ.png" /></figure><p>Note that if we were to next read the entirety of probe_buf (all 16 bytes), and time how long it takes to read each value, reading probe_buf[0] would be the fastest because its value is currently in the cache.</p><p>As an example, we might get these timings if we read from each of the entries in probe_buf (corresponding to the cache):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*TpvtwAAbLyZWqzVA7chDKw.png" /></figure><p>In this case, probe_buf[0] will return in 12 nanoseconds, while all the others will take longer due to the increased time to read from memory. Thus, we can indirectly observe what addresses have been loaded into cache, and which ones have not. So far, this doesn’t tell us anything we didn’t already know, but it’s a useful trick to know about.</p><p>As we said before, trying to read directly from kernel memory will result in a segfault:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_PDc1IdvkH0MPEcl7Sky9Q.png" /></figure><p>If we try to do this, the value of r4 will <em>not </em>contain the restricted contents (0x05), and the program will crash. However, recall that the CPU is impatient, and cannot wait to execute more instructions. While one stage of the CPU’s pipeline is checking whether this program is actually allowed to read the contents of address 0x02, the prior stages in the assembly line are happily looking at future instructions, and starting to execute parts of them.</p><p>Let’s reset our cache, and run a slightly different program instead. This one too will segfault…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U2oHc0ZBPyrSTfU2XGzh9w.png" /></figure><p>And again, line 4 will not complete, and r4 will not contain the value in probe_buf[0x05]; as soon as the CPU figures out that we aren’t allowed to do the memory access in line 3, it will segfault and crash the program. But remember, the CPU has hungrily been starting to work on parts of instructions that will come after this one, not yet knowing that this instruction is supposed to crash our program.</p><p>In this case, the CPU has cleverly observed that line 4 will be a read from memory, and so it would like to start working on that as soon as possible. However, the address the CPU needs to load from in line 4 depends on the result of line 3 (in particular, the result of the restricted memory). This means there is a race between two CPU pipeline stages for line 3: the stage that forwards the read result from line 3 to line 4 (so it can issue its memory read), and the pipeline stage that determines the read on line 3 is restricted and should segfault the program.</p><p>You might think who wins this race shouldn’t matter: even if line 4 gets the result of the restricted read, so what? Its results are never going to be committed to the architectural state of the CPU, because line 3 is going to segfault the program. In other words, line 4 can’t actually complete before line 3, and line 3 is going to segfault our program. Therefore, it shouldn’t matter if we let line 4 have a little fun and partially complete, right?</p><p>Almost.</p><p>While line 4 won’t update any architectural state (e.g. r4 will remain unchanged), by executing instructions out of order, the CPU will have issued a read to probe_buf[*kernel_addr]. Importantly, even though the results of this read get squashed in the pipeline flush that happens when line 3 segfaults, this read will <strong>update the cache!</strong></p><p>Now, if the program catches this segfault, it can then read the contents of all 16 probe_buf bytes. We don’t particularly care about the <em>contents </em>of this array (we filled it, after all), but we care about how long it takes to read each entry. In short, we are testing if each entry in the probe_buf array is in cache or not. If it is, then we know it has been recently read by the CPU.</p><p>In this example, reading from probe_buf[0x05] will result in the shortest time, because it was cached. And because we set up the <strong>speculative read </strong>in line 4 to be probe_buf[*kernel_addr], we learn that the protected *kernel_addr contains the value 0x05.</p><p>If the value in the restricted *kernel_addr had been different (say, 0x08), then line 4 would speculatively cause a different part of probe_buf to be cached (specifically, probe_buf[0x08]). And when we do our cache timing analysis on probe_buf, we would find that index 0x08 took the shortest amount of time, letting us know the value of restricted kernel memory.</p><p>Amusingly, we can actually compute using the restricted value:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DpPXiIwyM7XM94XK8reQDg.png" /></figure><p>In this example, we again segfault on line 3, but the CPU will still execute the parts of line 4 and 5. In line 4, we bitshift off the lower 4 bits of r3, letting us measure the upper 4 bits of the restricted kernel memory target. In our example, these bits happen to be 0, causing us to load probe_buf[0]. When we do our timing analysis by reading from probe_buf again, we’ll find that value returns the fastest.</p><h3>Spectre</h3><p>With Meltdown, the attacker gets to run their own code on the target computer, and uses it to reveal secret information on that device. However, with Spectre, the attacker uses the victim’s own code against themselves to leak data from the victim. Spectre allows an attacker to reveal private memory from any application, potentially even doing so remotely across the Internet. For example, Spectre could leak your browser’s memory to an attacker who is running Javascript in a web page you visit.</p><p>Spectre uses a subtle variation on the technique we discussed in Meltdown. To investigate it, let’s look at this toy code example, adopted from the <a href="https://spectreattack.com/spectre.pdf">Spectre paper</a>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*HQYrdQML02411bdE-snhTA.png" /></figure><p>This is pretty harmless code that one might encounter in the wild. We’ll assume that x is provided by an attacker, but note the attacker can’t simply read off the end of array1, as you would in a typical buffer overflow. This is because x is first compared to array1_size, making sure that the access of array1[x] on line 1 will be in bounds.</p><p>Assuming that k is a single byte, and array2 is of size at least 256, the access on line 2 will also be in bounds. Thus, given fairly reasonable assumptions, this program should not allow an attacker that controls x to be able to read arbitrary memory.</p><p>However, as with Meltdown, Spectre makes us question our understanding of computers and code.</p><p>To see how the CPU is going to look at the above code, let’s compile it into our mock-assembly language:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*PbX-KQ8A4sVl4VwpjYaoiA.png" /></figure><p>Imagine the attacker sets x (r1) to something malicious outside the bounds of array1. The lines of assembly we would expect the CPU to execute would look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*yympOTVzm4kB7lO2XadsRA.png" /></figure><p>The CPU loads the array1_size into r5 on line 4, compares it to x (r1) on line 5, and then, noticing that it doesn’t pass the comparison checks, skips down to the end on line 9.</p><p>But remember, our CPU has an insatiable appetite for executing instructions. And line 4 might actually take a while to complete, because it’s a slow load from memory. It can try to execute the next few lines, but they depend on the result of line 4. However, this doesn’t stop modern CPUs. Instead, the CPU will try to predict the branch, without knowing what the value of r5 (array1_size) actually is. To aid in its prediction, the CPU can remember the last time it encountered this particular branch, and remember what it did then. But if the attacker provided a legitimate value of x on the previous runs, the CPU’s branch predictor might easily (mis)predict this branch as not taken. In other words, the previous times the CPU encountered this branch, it then executed lines 7 and 8. Why should this time be any different?</p><p>Again, these lines will not actually fully execute: the CPU won’t update r6 and r7 in a way that is observable to the programmer, and it will eventually hear back from the memory read on line 4, realize it mispredicted the branch, and squash the results. But the CPU is <em>speculating </em>that those lines will eventually be run, so why not execute them now while we wait for line 4? No harm, no foul, right?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*zxMmMIy0qNkfYDsh6xmrfg.png" /></figure><p>This should look familiar.</p><p>As before, the CPU won’t actually update the state, but it does perform the read operations. And as before, this will change the set of addresses loaded into cache. In particular, array2[k] will be loaded into this program’s cache. But the value of k is actually an <em>unbounded </em>read on array1, at an offset of the attacker’s choosing! So if the attacker knows that 8675309 bytes after array1, there’s a juicy secret byte (maybe a byte of the program’s Bitcoin private key), then the attacker sets x = 8675309, and the CPU will set k = array1[8675309]. Then, on line 8, the CPU uses that secret value to index into array2, affecting the cache.</p><p>Here, the attacker can’t do the same direct cache timing trick as in Meltdown to reveal k, but they can measure it in a similar way. One way the attacker can do this is by simply calling this function again, with a different value of x that is within the bounds of array1. If the value of array1[x] matches the secret value of k from the previous run (array1[8675309]), then the lookup of array2[k] in the second run will return much faster than if it was not the same, because the previous run will have cached it. With enough guesses of x, the attacker learns the true value of k in the initial speculative run, even though the CPU never directly stored it!</p><p>The <a href="https://spectreattack.com/spectre.pdf">Spectre paper</a> goes into more detail about how to do this timing more accurately, performs this attack in Javascript, and goes on to describe how to abuse indirect jumps and a ROP-style attack to leak data from almost anything, so if you’re curious about other variants of this attack, I highly encourage you to read the paper.</p><h3>Defenses</h3><p>Defending against Meltdown and Spectre will be tricky. The root of this problem lies in the design of our CPUs, and it’s a design so ingrained in the way we build computers, that nearly every chip manufactured today has some set of these speculative “features”.</p><p>Almost certainly we are going to have to fix a hardware problem in software; recalling all of the potentially vulnerable CPUs is intractable. Already, <a href="https://support.google.com/faqs/answer/7625886">novel solutions</a> have been proposed (and some <a href="https://en.wikipedia.org/wiki/Kernel_page-table_isolation">deployed</a>), but time will tell if these are robust enough to thwart variants and tweaks on these attacks, or if future CPU optimizations will bring us right back to where we started.</p><p>Defenses for some of these problems will come easily, but so too will additional exploits on unpatched systems. It will be simultaneously fascinating and horrifying to see how these vulnerabilities develop in the coming months and years. Either way, I don’t suspect this will be the last we hear of Meltdown or Spectre.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e92081783509" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hurricanes, Immigration, and Climbing]]></title>
            <link>https://medium.com/@ewust/hurricanes-immigration-and-climbing-ace8121d1f45?source=rss-de14e98fe6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/ace8121d1f45</guid>
            <category><![CDATA[immigration]]></category>
            <category><![CDATA[hurricane-harvey]]></category>
            <dc:creator><![CDATA[Eric Wustrow]]></dc:creator>
            <pubDate>Fri, 25 Aug 2017 22:49:10 GMT</pubDate>
            <atom:updated>2017-08-25T22:49:10.306Z</atom:updated>
            <content:encoded><![CDATA[<p>Hurricane Harvey is headed to southern Texas, prompting thousands to evacuate their homes to avoid the life-threatening storm. While it’s hard enough to convince people to leave their homes and take the storm seriously, the U.S. Customs and Border Patrol intentionally made this decision harder for undocumented residents by <a href="https://www.texastribune.org/2017/08/24/hurricane-harvey/">leaving its immigration checkpoints open north of the border</a>. The CBP claims that its checkpoints won’t deter illegal immigrants from evacuating, but this is a gross misunderstanding of human rationalization.</p><p>I’m reminded of how I’ve felt deciding to bail from rock climbs when it looks like a storm is approaching. Sometimes, retreating to avoid a storm involves leaving pricey climbing equipment behind, and making the choice to leave $30-$100 worth of climbing gear to allow you to bail is surprisingly hard when the threat to your life remains vague or uncertain. What if the storm clears and you wasted your gear for nothing? You’d feel pretty silly then! On the other hand, if you save that $30, keep climbing, and end up in a lightning storm, you’ll wish you had the opportunity to spend $30,000 to save your life, but by then it’s too late. The correct — but often difficult — decision is to bail.</p><p>But imagine you’re an undocumented resident in southern Texas. You and your family know the storm is approaching, but it’s not totally certain that you’ll die if you stay: maybe the storm will pass, or miss your home, or you’ll get lucky some other way. On the other hand, if you try to evacuate to safety, CBP will almost certainly catch you, and you and your family will be deported. I’ll admit that I struggle enough deciding to leave easily-affordable climbing gear when there’s any amount of uncertainty that things might not go wrong. But here, instead of a few pieces of climbing gear, CBP is forcing people to consider leaving behind their jobs, families, and livelihoods to avoid the risk of a deadly storm. That’s an impossible decision, and not one we should be encouraging anyone to have to make.</p><p>The argument that CBP is simply doing their job and not “abandoning their law enforcement duties” is unconscionable. The CBP’s job is not to put illegal<br>residents in deadly situations. Doing so betrays the underlying abhorrent belief shared by too many that this is a game, that these aren’t real people, that their lives are somehow less important than a political ideology and rhetoric that for some reason must be upheld, come hell or high water.<br>Previous hurricanes such as Matthew and Isaac have seen CBP close checkpoints to allow people to move faster and without fear of deportation during emergencies. Are we now considering lives as worth less in 2017 than 2016, simply because of a change in political climate?</p><p>We make all kinds of decisions where routine law enforcement takes a backseat to saving lives. Police officers will stop pursuit of a car if it starts to head past a school or crowded pedestrian zones, to avoid potentially injuring innocent bystanders. Hospitals allow drug users to be admitted anonymously without involving police, to encourage treatment of overdose victims who might otherwise die in the street to avoid a drug charge. Even some wilderness search and rescue operations are completely free of charge in order to discourage people in dire situations from getting themselves into a worse one while contemplating the cost of a helicopter evacuation.</p><p>Operating border patrol checkpoints is not more important than lives. Hurricane Harvey is coming, and it doesn’t care about the economic impacts of cheap undocumented labor. It’s going to flood homes and leave people stranded regardless of their color, creed, or citizenship status. It’s on us to avoid politicizing a storm and do the right thing: Let people evacuate freely without forcing unnecessary consideration of what they might have to leave behind.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ace8121d1f45" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[In defense of the Guardian’s WhatsApp story]]></title>
            <link>https://medium.com/@ewust/in-defense-of-the-guardians-whatsapp-story-9da5a45d49c9?source=rss-de14e98fe6cd------2</link>
            <guid isPermaLink="false">https://medium.com/p/9da5a45d49c9</guid>
            <category><![CDATA[whatsapp]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[encryption]]></category>
            <dc:creator><![CDATA[Eric Wustrow]]></dc:creator>
            <pubDate>Mon, 23 Jan 2017 19:08:31 GMT</pubDate>
            <atom:updated>2017-01-23T19:08:31.328Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently, the Guardian <a href="https://www.theguardian.com/technology/2017/jan/13/whatsapp-backdoor-allows-snooping-on-encrypted-messages">published a story</a> claiming that WhatsApp’s end-to-end encryption was inadequate, detailing a vulnerability that allowed WhatsApp’s servers to silently change a user’s key and force undelivered messages to be encrypted and resent under this new key, allowing WhatsApp to remotely decrypt messages for targeted users.</p><p>Shortly after publication, a number of prominent security and cryptography experts <a href="http://technosociology.org/?page_id=1687">published a rebuttal</a>, claiming the story was irresponsible and calling for its retraction. The rebuttal’s argument is that this “vulnerability” is actually a known and carefully considered property of WhatsApp: the developers had to settle a trade-off between security and usability, and the developers reasonably choose usability.</p><p>However, despite having a great deal of respect for the experts that signed this rebuttal, I disagree with their conclusion.</p><p>There’s no doubt that end-to-end encryption is hard to get right, and that security applications have difficult usability trade-offs where difficult decisions must be made. But these difficult choices do not excuse vulnerabilities that are clearly within an application’s threat model (the set of capabilities and adversaries that we wish to defend against).</p><p>And to be clear, “WhatsApp could be (compelled to be) malicious” is within the threat model of the application. If it weren’t, we wouldn’t need end-to-end encryption at all. We could simply trust the WhatsApp servers and use TLS between clients and the server to protect messages. But WhatsApp has gone to the effort of adopting Open Whisper System’s implementation of off-the-record end-to-end encryption. Furthermore, they <a href="https://www.whatsapp.com/faq/en/general/28030015">claim</a> that “WhatsApp’s end-to-end encryption ensures only you and the person you’re communicating with can read what is sent, and nobody in between, not even WhatsApp.” We <em>should</em> be worried about the WhatsApp server being compromised or compelled to do things against the will of its users.</p><p>Still, the rebuttal points out that the exploitation of this vulnerability is “a remote scenario requiring an adversary capable of many difficult feats.” While true, it is also true that this “remote scenario” is well within the threat model for WhatsApp.</p><p>Hand-waving over security holes in cryptographic protocols or applications is not an appropriate response to a vulnerability, and we don’t do this for other protocols. When we discover problems with TLS, we fix them: When the <a href="http://www.isg.rhul.ac.uk/tls/Lucky13.html">Lucky Thirteen attack</a> was published, security experts did not dismiss it as requiring an “adversary capable of many difficult feats.” Instead, we <a href="https://www.imperialviolet.org/2013/02/04/luckythirteen.html">hardened the constant-time code in CBC modes</a>, or removed CBC modes entirely. When <a href="https://weakdh.org/imperfect-forward-secrecy-ccs15.pdf">evidence suggested</a> the NSA and other well-funded adversaries may be able to perform discrete logarithm attacks on common small Diffie-Hellman groups, we didn’t label this as a “remote scenario”. Rather, <a href="https://weakdh.org/sysadmin.html">we moved to server-specific Diffie-Hellman groups</a> or moved away from finite field Diffie-Hellman key exchanges. When we discover vulnerabilities in cryptographic protocols, we fix them or stop using them altogether.</p><p>So what can we do about the WhatsApp vulnerability? What’s the fix here? That’s where things get tricky: There is no silver bullet or easy answer. WhatsApp could warn users when a key has changed, but as the rebuttal points out, users may become frustrated by extraneous warnings or prompts that require them to approve key changes. Worse yet, those frustrated users might choose to stop using the app and switch to plaintext or other less secure (but more user-friendly) messaging applications, ultimately harming users. This is a difficult challenge, and remains an open problem to solve. But just because we don’t have an easy solution to a problem doesn’t mean that we can ignore trying to solve it. If the best you can do is not enough to defend against your threat model, your application is not secure. At the very least, we should not be making false claims, such as “not even WhatsApp can read your messages” when the developers purposefully decided on a trade-off that makes that not true by default.</p><p>It is important that we allow stories like the Guardian’s to point out when the Emperor isn’t wearing any clothes. Even though WhatsApp is doing everything right in terms of the best practices that we know about does not mean they have done enough. WhatsApp’s version of end-to-end encryption is a step in the right direction, and helps protect billions of people from mass surveillance. But the best we have been able to come up with should not be immune from criticism, even if we think that criticism will cause non-expert users to do non-expert things. It is irresponsible to tell users white lies under the belief that it’s ultimately for their own good.</p><p>In this case, the rebuttal warns that the Guardian story will cause users to distrust WhatsApp, and switch to less secure apps for communication. The rebuttal likens the article to publishing a headline “VACCINES KILL PEOPLE”, which might cause more people to refuse vaccination, ultimately killing more people. However, there is a subtle but important difference between that claim and the Guardian article. Vaccines are not currently lying prominently on vaccination websites and throughout the medical community about the impossibility of death. In contrast, WhatsApp is specifically telling users that they do not have to trust the WhatsApp servers for the privacy of their messages, when in fact they do. Rather than worry about what damage such uncomfortable truths could do to non-expert users, we should instead be worried about the original false statements that lulled users into a belief that they were safe when they weren’t. WhatsApp should not claim their messages are end-to-end encrypted when the trade-offs they have consciously made leave room for WhatsApp to circumvent these protections.</p><p>This vulnerability was responsibly disclosed to WhatsApp several months before the Guardian article was published. Instead of fixing the problem, or clarifying the statements about the protection they provide, Facebook (WhatsApp’s parent company) responded to the researchers by essentially saying this was “expected behavior” and that they wouldn’t fix it. That’s an insane position to take about a vulnerability that’s not only inside your threat model, but is the main threat that motivates using end-to-end encryption in the first place. If end-to-end encryption is not important for WhatsApp users, it should be removed in favor of a simpler protocol. If it is important (and I think it is), why isn’t it worth talking about if not fixing this particular vulnerability?</p><p>I don’t think users should stop using WhatsApp over this vulnerability; encouraging users to switch to other applications would very likely put even more users at risk. But I also think that WhatsApp should not get a free pass simply because we don’t actually know how to provide real end-to-end encryption to a billion users in a usable way. Instead, we should not tell users that something is end-to-end encrypted when by default it is not.</p><p>Secure messaging is a hard problem, and there remain many open problems to be solved. WhatsApp is pushing end-to-end encryption in a positive direction, protecting a huge number of users, and should be applauded for moving us toward a more secure world. But it has not yet fully solved this difficult problem, and it’s important that we in the security community keep them honest, rather than help cover up partial truths for what we believe to be the greater good.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9da5a45d49c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>