LWN: Comments on "Verified cryptography for Firefox 57" https://lwn.net/Articles/733675/ This is a special feed containing comments posted to the individual LWN article titled "Verified cryptography for Firefox 57". en-us Sat, 04 Oct 2025 08:37:04 +0000 Sat, 04 Oct 2025 08:37:04 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net parenthetical correctness https://lwn.net/Articles/734963/ https://lwn.net/Articles/734963/ Garak <div class="FormattedComment"> and if the title had read<br> <p> Verified cryptography for Firefox 57 (mozilla security blog)<br> <p> than presumably ms and I would have had different reactions. Something akin to, e.g.<br> <p> Firefox takes a Quantum leap forward with new developer edition (ars technica)<br> <p> I.e. if it weren't for the "(ars technica)" there, I would be disturbed by the verbiage as an LWN headline choice. Sigh.<br> </div> Thu, 28 Sep 2017 05:04:06 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/734676/ https://lwn.net/Articles/734676/ tterribe <div class="FormattedComment"> As important as (if not more important than) branches are memory access patterns. I think this is the source of trouble in most problematic AES implementations. See Section 5.1 of RFC 7748.<br> <p> An excellent property for side-channel-resistant attacks to have is that all memory accesses are completely deterministic, i.e., the locations that are read from or written to are not dependent on the secret key or the plain text.<br> </div> Sun, 24 Sep 2017 03:09:05 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/734514/ https://lwn.net/Articles/734514/ smitty_one_each <div class="FormattedComment"> The scare quotes make the point effectively.<br> </div> Thu, 21 Sep 2017 17:09:04 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/734107/ https://lwn.net/Articles/734107/ gowen <blockquote><i>I think it was Fermat's, but I'm sure there have been several, where some mathematician presented a proof of something completely unrelated and then added, almost in a footnote, "by the way, Fermat's is a trivial subset of this proof".</i></blockquote>This was Wiles and Fermat, but its worth noting that reducing FLT to a footnote was a jokey way by Wiles to bury the lede. He knew what the big story was here, and everyone in the room (who were basically the worlds foremost minds on modular forms) knew the best-known implication of the Taniyama-Shinmura Conjecture - and hence where Wiles was likely to end up - well before that point. FWIW - I believe the lectures ended "Corollary: Fermat's Last Theorem" Tue, 19 Sep 2017 14:09:00 +0000 sorting https://lwn.net/Articles/733934/ https://lwn.net/Articles/733934/ HelloWorld <div class="FormattedComment"> Right, I actually explicitly excluded quantum computers in my original post. Thanks for your post, it was very insightful.<br> </div> Tue, 19 Sep 2017 02:32:27 +0000 sorting https://lwn.net/Articles/734022/ https://lwn.net/Articles/734022/ ncm <div class="FormattedComment"> Aggressively missing the point is not an improvement over idly or negligently missing the point.<br> </div> Mon, 18 Sep 2017 16:11:58 +0000 sorting https://lwn.net/Articles/733931/ https://lwn.net/Articles/733931/ matthias <div class="FormattedComment"> The point of ncm was, that you always have to make assumptions to prove anything. For the lower bound of sorting, you have to assume comparison based sorting. For proving lower bounds on cracking cryptography you need other assumptions. E.g. most of the complexity theory is build on the assumption that all sensible models of computation can simulate each other with polynomial overhead. An assumption that is not necessarily true for quantum computers. <br> <p> It is very unlikely that a proof that some encryption is secure can be made without any assumptions. It works for the One-Tine-Pad, where even the information theory says, that the encryption cannot be broken. But this is a very special case. The BB84 quantum cryptography protocol was proved secure. However, the proof assumes that our understanding of quantum mechanics is correct. I do not see any way, how such a proof could be done without this assumption. <br> <p> Somewhere below, you give the example that there is no rational solution for x^2=2. Of course mathematicians can disprove the existence of some well defined mathematical object. The point is that breaking a cryptographic scheme is not that well defined. Once you establish a precise mathematical definition, this definition will imply certain assumptions, e.g., model of computation.<br> <p> I want to mention two more very prominent assumptions that no one has proven, but that are fundamental to all complexity theory: <br> 1. The Church-Turing Thesis stating that the functions computable in our universe are exactly the Turing computable functions.<br> 2. Consistency of ZFC (fundamental to maths in general, cannot be proven in ZFC).<br> <p> You should not misunderstand me. I do not say that proofs are worthless. I did my PHD in theoretical computer science, so I know the value of proofs. A formal proof saying ECC is unbreakable (by Turing machines) would be worth a lot (especially as it would imply P!=NP). However, if one of the two above assumptions would turn out to be false, someone could come up with different maths (this could be what ledow meant). I believe in both assumptions, but I do not believe that we can ever proof them to be true.<br> </div> Sun, 17 Sep 2017 22:21:14 +0000 sorting https://lwn.net/Articles/733913/ https://lwn.net/Articles/733913/ HelloWorld <div class="FormattedComment"> It's not that I miss the point, it's that there's no point to miss. <br> </div> Sun, 17 Sep 2017 13:11:02 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733896/ https://lwn.net/Articles/733896/ biergaizi <div class="FormattedComment"> The Curve25519 ECC algorithm is side-channel resistance by design, everything is constant time, no branches in the code path. There may be other side-channels but the major ones are closed by design. ChaCha20, a steam cipher, still designed by Daniel J. Bernstein, is also side-channel resistance. If the code is verified, I assume the implementation is as secure as design.<br> <p> In contrast, it's nearly impossible to implement AES withing leaking timings, until the algorithm implemented by the hardware. The design of CBC mode in SSL/TLS is the worst one, first there's Lucky13 attack exploiting timings, the fix is using constant time code, e.g. no "if" statement is allowed, implementing logic using XOR/AND/NOT, etc, program like Brainf**k, unfortunately the fix itself causes another timing leak, the padding oracle of CVE-2016-2107, only discovered years later.<br> <p> It's 2017, and one can say if someone still designs algorithms and cryptosystems on paper, but practically completely impossible to implement on physical computers without leaking timings, then the design itself is not good at all in the first place.<br> <p> Immature fields can be an exception, like Post-Quantum Cryptography. Unfortunately we waited for 15 years for an algorithm design that solves practical issues, and now a new wave of "secure on paper, extremely difficult to implement on physical computers" algorithms are coming, inevitably...<br> </div> Sun, 17 Sep 2017 04:38:38 +0000 sorting https://lwn.net/Articles/733895/ https://lwn.net/Articles/733895/ ncm <div class="FormattedComment"> I see that you miss the point.<br> </div> Sun, 17 Sep 2017 04:36:37 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733885/ https://lwn.net/Articles/733885/ HelloWorld <div class="FormattedComment"> Right, point taken. <br> </div> Sat, 16 Sep 2017 19:48:25 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733879/ https://lwn.net/Articles/733879/ mpr22 For an N-bit key, a cryptanalytical attack that takes K * 2^(ceil(N/64)) operations where K &lt;&lt; 2^64 is still, in the strict mathematical sense, exponential in N... but N has to be pretty damn big before you're safe from that attack. Sat, 16 Sep 2017 18:22:29 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733875/ https://lwn.net/Articles/733875/ dahveed311 <div class="FormattedComment"> Agreed. I come here because this isn't buzzfeed. <br> </div> Sat, 16 Sep 2017 17:05:46 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733873/ https://lwn.net/Articles/733873/ HelloWorld <div class="FormattedComment"> <font class="QuotedText">&gt; It's not really about exponential time, or the complexity. Just that you can't do the decryption without having to try all of the possible keys. </font><br> Those boil down to the same thing. Do you actually know what exponential complexity means in this context?<br> </div> Sat, 16 Sep 2017 16:42:07 +0000 sorting https://lwn.net/Articles/733868/ https://lwn.net/Articles/733868/ farnz <p>Note that with the Halting Problem, the get-out is that you can divide programs into three piles, but not two: <ol> <li>Programs that definitely halt. <li>Programs that definitely do not halt. <li>Programs that might or might not halt. </ol> <p>The trick to proving termination in real-world situations is twofold; first, minimise the number of programs you put into category 3. Then, declare that all programs in category 3 are unknowable, and it's an error case to deal with one of them - for many practical uses of the halting problem, this amounts to declaring that programs in category three do not halt. Sat, 16 Sep 2017 09:30:47 +0000 sorting https://lwn.net/Articles/733866/ https://lwn.net/Articles/733866/ HelloWorld <div class="FormattedComment"> <font class="QuotedText">&gt; Radix sort is O(n)</font><br> Yes, the O(n * log(n)) result applies to comparison-based algorithms, which radix sort is not. This is well-known and not a real counter-argument to my point, because you can avoid the problem by simply not making that sort of assumption.<br> <p> <font class="QuotedText">&gt; Despite that the Halting Problem is proven insoluble, we routinely prove that particular programs reliably terminate.</font><br> It is proven that there is no program that can reliably determine for all programs whether or not they're going to halt. This is very different from saying that there is no program that can reliably determine for any programs whether or not they're going to halt. The fact that we can prove termination for *some* programs doesn't say anything about the halting problem, and that you seem to think it does tells more about your math education (or lack thereof) than anything else. <br> </div> Sat, 16 Sep 2017 08:55:55 +0000 sorting https://lwn.net/Articles/733781/ https://lwn.net/Articles/733781/ ncm <div class="FormattedComment"> Radix sort is O(n).<br> <p> It is sometimes possible to make proofs about existence of algorithms, but all too often the proof relies on hidden assumptions that your opponent is happy to violate. Despite that the Halting Problem is proven insoluble, we routinely prove that particular programs reliably terminate.<br> <p> All there is to say whenever somebody does what you have just proven impossible is "huh" -- an expressian universal to all languages, even those not used to express proofs.<br> <p> A proof that a library function really satisfies a spec despite all the peculiar properties of what programming languages call integers is a notable achievement. A proof that the spec has all the properties claimed for it would be another.<br> </div> Sat, 16 Sep 2017 06:03:04 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733849/ https://lwn.net/Articles/733849/ simcop2387 <div class="FormattedComment"> It's not really about exponential time, or the complexity. Just that you can't do the decryption without having to try all of the possible keys. DES (single DES) was broken before some changes to it by NSA researchers because of badly chosen parameters that allowed it to be vulnerable to differential crypt-analysis. it still takes exponential time related to the key size, but you no longer would have to try all possible keys.<br> </div> Fri, 15 Sep 2017 19:08:55 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733801/ https://lwn.net/Articles/733801/ Wol <div class="FormattedComment"> And how many of these things turn out to be solved almost by accident?<br> <p> I think it was Fermat's, but I'm sure there have been several, where some mathematician presented a proof of something completely unrelated and then added, almost in a footnote, "by the way, Fermat's is a trivial subset of this proof".<br> <p> I think everyone knew a big announcement was coming, but really didn't expect a Fermat proof to be announced and dismissed in such a trivial manner!<br> <p> Cheers,<br> Wol<br> </div> Fri, 15 Sep 2017 13:34:38 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733797/ https://lwn.net/Articles/733797/ hmh <div class="FormattedComment"> Side-channels are also a real, and very troublesome issue when implementing crypto. One thing even gnupg doesn't get fully correct yet, for example, is fully constant-time bignumber math which is power and timing-invariant relative to the data being processed (it is mostly acceptable to be variable according to the data type size, though, since this is assumed to be known to the adversary in every crypto algorithm design).<br> <p> And code full of side-channels would still be perfectly correct, you need some rather extreme constraints to have noise, power, time, cache, and even execution-unit/performance-counter side-channel protections... for example, not only two multiplications need to always take the same time, they must always do the same number of muls/adds/etc (time, power) *in the same sequence* (power, RF noise), with the same memory ordering pattern (cache)...<br> <p> Do note gnupg (and openssl, etc) have all sort of defenses to mitigate known such side-channels that have been proved to be exploitable, but they're not perfect. This one reason why I mostly assume only half of the secret keys are not being leaked somehow (thus using twice the currently recommended size at the very least).<br> </div> Fri, 15 Sep 2017 11:34:36 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733790/ https://lwn.net/Articles/733790/ ballombe <div class="FormattedComment"> There is a big asymmetry here:<br> If you prove that ECDL cannot be solved in polynomial time in general, you will probably get the Field medal if you are young enough.<br> However, if you prove that ECDL can be solved in subexponential time, chance are you will not be awarded the Field medal.<br> <p> Why ? because there a precedent for breaking similar algorithms, while there is no precedent for negative proofs<br> (this is an instance of the P=NP problem).<br> <p> The truth is a large number of mathematicians expect ECDL to be solvable in subexponential time, so are unlikely to work toward proving the opposite.<br> </div> Fri, 15 Sep 2017 11:07:46 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733793/ https://lwn.net/Articles/733793/ BillyBob <div class="FormattedComment"> I'd argue that most LWN readers understand what 'formal verification' is.<br> </div> Fri, 15 Sep 2017 10:51:01 +0000 finally someone who knows what he's talking about https://lwn.net/Articles/733784/ https://lwn.net/Articles/733784/ Wol <div class="FormattedComment"> This is what I moan about when I say Science isn't Maths.<br> <p> The whole point of a proof in maths is that it shows your assumptions are self-consistent.<br> <p> The whole point of a proof in science is that it shows your assumptions are in line with reality.<br> <p> And a lot of the comments here show that people have difficulty grasping the difference (yes, that seems to be the norm :-(<br> <p> That's why, when you're presenting a proof like this, it's important to state all your assumptions (like the grandparent post does), but it's also why peoples' eyes glaze over because it's all maths and so many people seem to be scared of maths :-(<br> <p> Cheers,<br> Wol<br> </div> Fri, 15 Sep 2017 08:35:16 +0000 finally someone who knows what he's talking about https://lwn.net/Articles/733766/ https://lwn.net/Articles/733766/ HelloWorld <div class="FormattedComment"> Thank you for this interesting comment!<br> </div> Thu, 14 Sep 2017 23:20:30 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733755/ https://lwn.net/Articles/733755/ roc <div class="FormattedComment"> It's not just verified to be free of large classes of bugs, but it's verified to be a correct implementation (of Curve25519 in this case), i.e. it produces the correct answers for all inputs.<br> <p> People who are interested should read about the overarching project: <a href="https://project-everest.github.io/">https://project-everest.github.io/</a><br> <p> "Verified as unbreakable" is not yet present in this case, but it's a realistic goal for the future, for the right definition of the term. We are able to verify that various cryptographic protocols are "unbreakable", in the sense that if the endpoints implement those protocols correctly and certain algorithmic hardness results hold, then an adversary who can only observe and manipulate what's on the wire learns nothing about certain data (e.g. the contents of packets). Work like Everest can prove the correctness of the endpoint implementations. The hardness assumptions can only be defeated by an adversary who makes mathematical breakthroughs --- we're talking Fields Medal-worthy work --- or if you use too-small key sizes. Against verified crypto, plausible attacks will be either direct attacks against endpoints, or attacks that learn something other than what the protocol was protecting (e.g. packet timing instead of packet contents).<br> </div> Thu, 14 Sep 2017 22:42:10 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733745/ https://lwn.net/Articles/733745/ HelloWorld <div class="FormattedComment"> <font class="QuotedText">&gt; "Verified" seems like a pretty odd word to use for that even if you're ignorant enough to believe that such a thing is possible. (Which I suspect that very few LWN readers are.)</font><br> I don't see why it wouldn't be possible. An encryption algorithm can be considered unbreakable if there is no algorithm that can decrypt an encrypted text in less than exponential time on average without knowing the key. And I wouldn't know any reason in principle why such a property would be impossible to prove. Mathematicians prove the non-existence of things all the time. Euclid did it more than 2000 years ago when he proved that there are no natural numbers p and q such that (p/q)^2 = 2.<br> <p> Anyway, I don't think you should be calling people ignorant in cases like this.<br> </div> Thu, 14 Sep 2017 20:55:35 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733741/ https://lwn.net/Articles/733741/ HelloWorld <div class="FormattedComment"> <font class="QuotedText">&gt; You can't ever verify that it's unbreakable. That's like asking "we guarantee that someone can't invent new maths in the next decade that we currently know nothing of?"</font><br> An encryption algorithm can be considered unbreakable by conventional (that is, non-quantum) computers if there is no algorithm that can decrypt an encrypted text in less than exponential time on average without knowing the key. I can't see why proving that would be any less possible than proving that there is no sorting algorithm faster than O(n*log(n)), and this has in fact been proven. Is it difficult? Sure, it might require completely new approaches to complexity theory. But saying it's impossible is tantamount to saying that nobody can ever invent this new math that we currently know nothing of. Oh, the irony…<br> </div> Thu, 14 Sep 2017 20:41:27 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733732/ https://lwn.net/Articles/733732/ derobert <div class="FormattedComment"> Vulnerabilities like Heartbleed show that the code can be a problem, too. (Given, that was OpenSSL not NSS).<br> </div> Thu, 14 Sep 2017 18:46:22 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733731/ https://lwn.net/Articles/733731/ riddochc <div class="FormattedComment"> That was my reaction too. "So the previous version wasn't verified to have cryptography? Good thing someone checked, then, just in case."<br> <p> </div> Thu, 14 Sep 2017 18:34:52 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733724/ https://lwn.net/Articles/733724/ flussence <div class="FormattedComment"> It wouldn't really make a difference if it *was* mathematically unbreakable, since the code's never been the weak link in the chain. The pathetically broken CA system has always been the problem here.<br> </div> Thu, 14 Sep 2017 18:01:40 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733706/ https://lwn.net/Articles/733706/ xtifr <div class="FormattedComment"> "Verified" seems like a pretty odd word to use for that even if you're ignorant enough to believe that such a thing is possible. (Which I suspect that very few LWN readers are.) My misreading was that they've finally confirmed that Mozilla has cryptography &lt;em&gt;at all&lt;/em&gt;. :)<br> </div> Thu, 14 Sep 2017 16:19:03 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733705/ https://lwn.net/Articles/733705/ ms <div class="FormattedComment"> <font class="QuotedText">&gt; The algorithm is mathematically verified to be converted to code correctly. That's about the best way you can put it. And you can't stick that in a headline.</font><br> <p> You totally could - especially on LWN :)<br> </div> Thu, 14 Sep 2017 16:11:21 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733703/ https://lwn.net/Articles/733703/ ledow <div class="FormattedComment"> Not really.<br> <p> You can't ever verify that it's unbreakable. That's like asking "we guarantee that someone can't invent new maths in the next decade that we currently know nothing of?"<br> <p> Code verification, however, just verifies that the code does what it says it would do and doesn't get caught in the traps available.<br> <p> To be honest, it doesn't even mean that the code doesn't leak memory, or pass out encrypted data to the world, or have a backdoor for the NSA. Unless the specification it was "verified" against says that too.<br> <p> The algorithm is mathematically verified to be converted to code correctly. That's about the best way you can put it. And you can't stick that in a headline.<br> <p> The algorithm could still be wrong. Or processors could still mess up certain assumptions (e.g. that people can't sniff the key mid-operation), etc.<br> <p> To be honest, given the expense of verifying code like this, I'd be happier if they just put that effort/money into verifying ECC itself, rather than a particular implementation of it.<br> </div> Thu, 14 Sep 2017 15:56:07 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733704/ https://lwn.net/Articles/733704/ rvfh <div class="FormattedComment"> As usual on LWN, the title is the original article title...<br> </div> Thu, 14 Sep 2017 15:55:04 +0000 Verified cryptography for Firefox 57 https://lwn.net/Articles/733700/ https://lwn.net/Articles/733700/ ms <div class="FormattedComment"> I don't think I've ever whinged about a title before on LWN (or actually much at all on LWN), but I would suggest this is close to being misleading. The code has been verified to be free of large classes of bugs. But I worry the title can suggest the cryptography has been "verified as unbreakable". Maybe it's just me.<br> </div> Thu, 14 Sep 2017 15:30:03 +0000