Be wary of one-time pads and other crypto unicorns
freedom-to-tinker.com
freedom-to-tinker.com
At the very lowest level, a cipher can catastrophically fail, like FEAL-4 did.
Going up through the levels, your block cipher mode (the adapter layer that allows a fixed-size cipher to encrypt a whole message) could be improperly constructed. Your random number generator could be biased. Your messages could be unauthenticated. You can accidentally create an oracle from observable behavior. Your key exchange could be insecure. Your UX could be insecure, so it's impossible to tell who you're talking to. Your encryption could be off by default.
Of all the levels where modern cryptosystems are going to fail, a catastrophic failure of the cipher itself is the least likely. It is fantastically unlikely that a secure messaging app is going to fall because AES is broken. And the best fundamental attacks on the worst ciphers still make demands of attackers that are unrealistic for message apps.
So the whole idea of using a one time pad to secure a messaging app is alarming. It's like an engineer told you they were going to design a bridge out of, I don't know, lithium to save on weight.
There are lots of ways for a cryptosystem to fail. Unlike fundamental cipher breaks, which are so extraordinarily rare as to be discountable, some of them are very, very likely. In cryptography engineering, the way these problems are mitigated is to use standardized, well-known, well-tested constructions. Any time you leave the golden path --- an AEAD stream cipher construction --- you're risking lots of flaws across every layer of your cryptosystem. Doing that to avoid an AES break is malpractice.
Also, as this post points out: this app didn't even use an OTP. It used a stream cipher keyed by the HMAC-DRBG (iirc) embedded in JVM SecureRandom. So there's that, too.
Similar is the claim that it uses a proprietary algorithm.
https://www.schneier.com/crypto-gram/archives/1999/0215.html
In the wake of the Snowden revelations, its incredibly important that we bootstrap a usable new generation of software with security at its core. But I'm worried that lots of people will be afraid to make security a core feature of their product because of the bad press they'll get if they do it a little bit wrong. Frankly the security community does not have a history of making systems that my mum can use. We really need an army of software engineers to work on fixing this problem and I don't think blog posts like this are helping. (Notable exception is Textsecure).
In this case, as I understood the press release:
- The QR code is used to initialize a direct (encrypted) bluetooth / wifi direct connection. Taking a picture of the QR code isn't enough to get the one-time pad.
- Cameras on modern mobile phones should be able to generate more than enough entropy (even if this isn't happening yet).
But there is no discussion of these points so far. Everybody is just piling hate on the product for its failings. We need to be better than that if we want a secure app ecosystem.
So you have a bunch of what are effectively scientists who aren't all that familiar with how products get made (first build something, release it, then refine it over time through feedback) and you have a bunch of developers who aren't familiar with how security products are managed (you don't release anything until you're willing to put people's lives on your product).
What you're left with is an ecosystem of developers releasing code that's not cryptographically sound because they need feedback and a community to help them refine the software, and crypto scientists who scream bloody murder every time they find a bug because, "what if the next Snowden uses your new tool!?!"
Everyone's right in this argument, it's just hard to bridge the gap between these two very different schools of thought.
In fact everyone who even considers touching anything crypto-related should know one simple thing - do not invent your own schemas!
Perhaps you could forward that minimal training to the openssl folks, and maybe you could singlehandedly solve the security crisis currently taking place in software.
Nope, because that's not what I claimed.
What classes? What books? What certifications or degrees?
I'm not saying that with minimal training you can write an OpenSSL equivalent, or even create a novel cryptosystem on top of OpenSSL, people writing software products generally shouldn't be creating novel cryptosystems in the first place (and I speak as someone that implements crypto-systems for a living, usually very well defined crypto-systems from banking standards).
The fact that you think it's that easy is a wonderful example of why there's such a disconnect between developers and crypto experts.
What they can do is use existing, secure constructions, which at least gives them a fighting chance. Inventing new stuff does not.
If that's not what you meant, then I understand.
The nearest I can see to that is where I said - "With fairly minimal training one can learn to use existing, secure constructions." - which I think I've qualified/explained now?
My reading of what you wrote is: it doesn't take much training to use Libsodium. To the extent that providing cryptographic security is important, you can solve the problem by delegating it to the Nacl designers and Sodium implementors. That's mostly true.
I did not see you making an argument about how simple the entire security problem was to solve.
Since when is learning a single crypto library the end-all solution to writing good crypto software?
You might have said that!
>> Since when is learning a single crypto library the end-all solution to writing good crypto software?
It's not, but it's a start, a start which all of these stories that hit HN and get torn to pieces are missing.
-- edit --
When I made my comment that you can learn to use existing things with minimal training I should have padded it out by telling you the reason I was saying that - learning to use well-understood crypto primitives, and (if you can) pre-provided crypto implementations is far from all you need to make secure software. But it's a start.
"Hey, come and look at our neat new crypto, it's awesome!" is a big red flag, and it's a red flag with a subtext that reads: We don't know what we're doing.
Software that does use good constructions and good implementations can still be done very badly, it's true.
To go back to your first comment, you say there's this gap between the way crypto people work and the way developers develop - that may well be so, but in most of the messaging apps we see here on HN the developer hasn't really even attempted to bridge that gap.
Think about it like cooking a meal - you're asking what it takes to become a top chef but in the case we're discussing they didn't even start their marinara sauce with tomatoes.
Writing secure software is hard and covers a lot more than your choice of ciphers, protocols etc. It's possible to make all the right choices and still make insecure software for so many reasons. OpenSSL was referenced up-thread - simple buffer overruns/lack of bounds checking is one way in which that failed (heartbleed).
In order to write secure software one needs first to define what we're aiming at, what does secure mean in the domain in which we operate? And that's non-trivial in itself.
But by choosing well-known constructions and (hopefully) well tested implementations we can minimise some classes of potential problems.
Actually implement cryptographic attacks before trying to design crypto.
That's not just my recommendation; it's also what Bruce Schneier has been writing for decades.
The problem with my suggestion is that most people who work their way from block cipher attacks through RSA error oracles are "scared straight", and lose the desire to plunk fancy crypto into their applications. Once you see how subtle some of the most devastating attacks are, you start to see why so few crypto engineers write chat apps.
I fail to see the problem...
The clear message you are trying to communicate is that the security community hyperventilates over security problems to the detriment of the community. That's not what happens. Look at Lavabit --- another example: the problem with serverside encrypted Internet email was absolutely written off as hyperventilation, to the detriment of every single Lavabit user, whose communications were almost certainly recorded and are, as a result of the way Lavabit handled a request for Snowden's communications, retroactively decrypted.
All I'm saying here is that there's a disconnect between security and usability that needs to be bridged, and sometimes one side forgets about the difficulty of correctly implementing the other.
Security people freak out at new amateur encryption tools because when they don't, those tools get adopted by hapless users who entrust real secrets with them. It's not a theoretical concern; it happens over and over again in the real world. It happened to Snowden twice, once with Cryptocat and once with Lavabit. In both instances, crypto experts begged people not to use those tools. In both instances, misguided privacy advocates pushed back on the crypto experts. The tools either didn't get fixed (because, in Lavabit's case, they couldn't be) or didn't get fixed in time. Almost certainly, NSA has decrypted intercepts as a result.
It's happening right now with other tools. It will, with certainty:100%, happen again with Cryptocat.
During the snake oil era of medicine, people used to take radium tonics as a cure-all. That's what these tools are: radium tonics.
"Don't use the tool" is a cryptographically sound piece of advice, given what you know about the specific implementation, but it's utterly useless for Cryptocat, from a product standpoint. What's a developer supposed to do when a crypto expert just says, "no"? That's terrible feedback, it needs to be better, and it can be better (sometimes it actually is better, I think you've mentioned in the past that you've lent a hand to Cryptocat).
As with every other "theory vs. practice" discussion, the theorists need to tone down the rhetoric, and the practitioners need to actually listen to what the theorists are saying.
The right thing to happen with Cryptocat is for it to be scrapped. Its security issues pervade beyond bad cryptography. Its users are literally better off with Google Hangouts or iMessage.
And, in fact, the same was true of Lavabit: there was no recommendation that would allow a mail service that worked (for users) the same way Google Mail to resist serious attacks. But that was the premise of the system! It needed to be scrapped.
That's unambiguously bad, because the software industry thrives on failing a lot until a good solution is found.
There needs to be a way to develop crypto software that falls in a land of, "Don't use this yet, but maybe someday after we're done testing it, you can start using it and be secure" rather than "nope, just scrap the whole thing".
"the software industry thrives on failing a lot until a good solution is found"
may be at the heart of the disagreement. It is true that some parts of the software industry are best served by this style of iterative failure based progress, but it is unfair to say that the entirety of software is best developed this way.
There exist whole classes of problems where the failure modes of their solutions are quite simply worse than any potential value those solutions can provide. Those class of problems should NOT be iteratively developed, rather they should be rigorously engineered and formally verified.
I suspect your disagreement stems from whether you think crypto systems exist inside or outside that problem set.
Except where it is important. Failing a lot in crypto can have deadly consequences that are not visible until it is too late.
He probably shouldn't. That's pretty much the point.
(--edit-- or he should consult with people who have studied this, find out about best practice, use existing solutions where possible, etc etc)
This is the problem -- you and others are trying to perpetuate the idea that software must always be "complete" the moment it's put on GitHub. Why must Joe Developer adhere to your rigorous definition of what a software product is?
Joe Developer should be free to tinker, and if he wants to tinker with crypto, crypto experts should let him. Currently they don't, and that's why we don't have any good crypto software.
He can tinker.
He can learn.
He can do any of the many excellent free courses, tutorials and challenges on the net.
He can implement attacks against toy problems, and real problems.
And eventually, he can get deeper into implementing it.
What he will absolutely and rightly be shot down for is making unverifiable claims about the security or what he's tinkering with, and try to profit from his claims.
I'm sorry if you have a problem with that.
It's a nice straw man, but not what I suggested at all.
When he launched an app that claimed to be the new safest thing ever, surely? Perhaps with an unbreakable One-Time-Pad. You know, the stuff we're commenting on here...
Nope, not at all the stuff we're commenting on. We're commenting on the stuff that hasn't been written yet and probably won't be written at all because of your negative attitude.
I'm not sure what it is you want here. Nobody's telling you not to use it. Nobody's telling you not to tinker. Everyone's encouraging you to learn, and giving you advice on the best way of doing that. You seem to want every bad, amateurish attempt at novel crypto, accompanied by self aggrandising copy, to be hailed as if it was awesome. It's not.
Again, you strawman me. Where in my argument did I talk about making outrageous claims? I would very much appreciate it if you separated "make outrageous claims" from "develop open source security software".
You appear to be annoyed that folks write take-downs on software like the one linked to by the article. This is the outrageous claim. If you feel this is not what you're saying then fine, I'm not sure we actually have an argument.
>> I would very much appreciate it if you separated "make outrageous claims" from "develop open source security software".
There's no reason not to develop OSS security software. There's every reason to put up big warnings saying you can't vouch for its security. There's every reason to ask people who know what they're talking about to take a look, and to be humble when they point out flaws, and to rework it if that's the case. There's every reason to take some of the excellent free courses.
But there's also no reason to go off-piste. Why develop this crazy new OTP scheme? There's existing crypto for exactly these use cases. Leave the devising and proving of new crypto constructs to the deeply-versed and the academics, who know how to prove this stuff (and disprove it).
It's like saying "I can't write my OSS networking project because people keep telling me not to rewrite the TCP stack without learning about TCP first". Do you need to rewrite the stack? If so, if you want to do a good job then it's going to take a hell of a lot of knowledge and training. Why not use the OS API?
I don't know what you think I wrote, but no one here at any time suggested writing a new crypto scheme.
It's 4 days later. I've made my point over and over again, and you understand it. You have even restated my point yourself, in your second paragraph.
I'm done. You agreed with me, and everything else you're trying to talk about is just you begging to be validated. I can't feed this anymore, sorry.
Can I ask you, when I say - "people writing software products generally shouldn't be creating novel cryptosystems" - what is it you hear?
Do you hear someone saying "you shouldn't be writing software that uses encryption" ?
Because that's not what I'm saying.
A cryptosystem is something like what's going on here - we have messages secured by OTPs, generated using SecureRandom and exchanged over an encrypted channel using an AES key displayed on the screen for the other party to scan.
So what I'm saying is "hey, why not use the industry standards for your crypto? Inventing cryptosystems is way hard and you probably got it wrong. You can still make your cool apps on top of it!"
> Joe Developer sees this advice and decides not to write crypto software.
False. Moe Manager stomps his foot and makes Joe Developer wire together "something good enough", regardless of Joe's qualifications. Since neither Joe nor Moe are able to tell how good a crypto system is, they invariably end up with something in the awful-to-kludge spectrum. Both Moe and Joe need to be repeatedly reminded that they don't know enough about this non trivial problem to make good enough calls.
> That's unambiguously bad, because the software industry thrives on failing a lot until a good solution is found.
"Unambiguosly bad" is a thought stopper, a rhetoric trick. This just means that since you don't like any of the options made available to you by reality (like... paying big bucks to a real expert), self deception is preferable.
Now, the fact that our software industry thrives on failure... I am ashamed to say that this just means our industry is really good at externalizing the consequences of our own incompetence to the customers. This is all good and fun, until real lives are on the line. Crypto is one of those cases, so it is one of those lines you don't cross.
> There needs to be a way to develop crypto software that falls in a land of, "Don't use this yet, but maybe someday after we're done testing it, you can start using it and be secure" rather than "nope, just scrap the whole thing".
Are you familiar with the term "Security by Design"? It is one of those pesky realities I was talking about. It basically says that you cannot create a product giving no concern to security, sprinkle some crypto fairy dust on top of it, and magically turn it into a secure product. If you try to do that, you'll end up with a product with broken security.
Which is not all that bad in practice. There are lots of useful products that we all are better of having in insecure form than not having at all. But if the whole point of product X is to be "Y, but done securely" there is no redeeming feature that can save X from the axe.
I guess I could point out that there lies, in a continuum of software, a place for experimental products which offer nothing other than the exploration of an idea and the opportunity to refine said idea through testing and discussion. I could also point out that your strawman of "sprinkle some crypto fairy dust" is entirely irrelevant to this conversation, and that your lack of understanding of how threat actors are modeled is evident in your inability to comprehend a tool that might protect against certain threats but can acceptably not protect against all threats.
But I think those points would fall on the "ears" of someone who just wants to be combative. Maybe someone else will pick up where you left off and engage in a more honest and less antagonizing manner, but this deep in the comment tree, "here be dragons".
Other than that, if you prefer to have non combative discussions, please stop bossing professionals around and tell them what to do. Specially if they are not providing a service you paid money for.
But it's funny, because what you're saying here (don't "boss" people around) is similar to what I am saying, with regard to experimental crypto software. The crypto experts need to let the developers develop, and find a constructive way to contribute to that process, rather than chicken-little every time a bug appears.
Imagine software that comes out, stating: "This software is not meant to do anything other than hide your porn from your mother. Please do not use this software to do anything other than protect yourself against a threat who has limited understanding of computers and software."
As that software matures, the disclaimer could expand to, "This software is not meant to do anything other than protect information against low-level criminal activity. Please do not use this software to do anything other than to protect your information from larceny or identity theft. This software will not protect you against a sophisticated or well-resourced actor."
Eventually expanding to, "This software has been tested by a community of crypto experts. While there is currently no known reason why this software won't protect your information from all bad actors, there is no guarantee in place that your information is absolutely safe. Always exercise extreme caution when protecting your data from sophisticated actors."
The idea being that, once an experimental piece of software becomes "good enough", it can be used to protect against a more diverse threat model.
The idea that you have to ship an NSA-proof product on day 1 is completely unfeasible and will never happen, and the crypto scientists out there need to realize that.
What I am trying to point out is that you cannot fix a flawed Security Design by incremental improvements. I am not talking about individual coding defects or even desirable features that have been left temporarily unimplemented on purpose. I am talking about Stupid!Ideas that get implemented because there was nobody around that recognized them as such, and then the usual traits of human nature (denial, previous investment bias, rationalization, etc) prevents the incumbents from scrapping those ideas until insurmountable evidence is assembled.
The article in question talks about using One Time Pads (OTPs) to conceal secrets. This is an idea that sounds good, OTP is mathematically proven to be "unbreakable" and all that... The problem is when theory meets practice and nobody asks the hard question: How are sender and receiver going to share the OTP prior to sending the real message.
This is not a trivial question to ask, giving the fact that OTP must have the same amount of bits as the message it is protecting. You can also not "recycle" a single OTP for many messages (that would be a Many Time Pad, which by definition violates the very preconditions that make OTP secure).
So, you end up with the scheme used in spy movies (I have no idea how real spies worked during the Cold War). Each spy carries around a code-book of OTPs that he received in hand by a trusted contact. The fact of being in possession of such book is itself a proof of being a spy so he was to take great care to hide it, which is hard because it is a whole book (OTP, lots a lots of messages). Also, the spy agency will have the cumbersome work of providing a different code-book to each spy (because otherwise, when the enemy catches one spy, they could theoretically run the OTP on all previous communications from suspected spies and have each one of them rounded and shot before the word comes out that the first spy was in prison).
This example also serves to illustrate another point. Maybe a Bad!Idea can be made to work in a limited way, if need is dire and resources are plenty. But any organization which kept secrets of real importance and tried to rely on this kind of solution would end up eaten alive by any adversary that had heard the words "asymmetric cryptography" spoken together.
I really can't find in anything I've written where I talked about writing a "bad" piece of crypto software. In fact, I've been talking about a potentially "good" piece of crypto software that isn't getting written because no software is perfect, but that's what crypto experts are demanding out of the gate.
Can you more succinctly sum up what you're trying to say? Do you think software shouldn't be written in the crypto space unless it's perfect from v0.0.0? I can't imagine you think that, so I'm wondering what exactly it is you're arguing here.
This dismisses the talents of DJB who is one of the better software developers and a very good cryptographer.
>... The first step is always optical, and that is an exchange of an AES 256bit key, plus an authentication key, and so those are the keys to encrypt the One-time pad as it’s being transferred ...
This software does not use one-time pad. It uses AES-256 with some extra hoops. Authors are either incompetent, thinking that having message-sized chunk of random data somewhere during encryption is 'one-time pad', or dishonest, using 'one-time pad' as empty buzzword. Both are huge red flags against using that software
In other words they are hyping and trying to sell people something that is at best equally secure to current things and more likely less secure.
Plus, even bad press is getting your name out there, another form of marketing which can be spun by the company into revenue.
If, as the article says, the QR code gives a symmetric AES key, then yes it could well be enough to get the OTP if you've eavesdropped on the traffic as well.
>> But there is no discussion of these points so far. Everybody is just piling hate on the product for its failings. We need to be better than that if we want a secure app ecosystem.
What we need to be better at is recognising that "Hey, look at my brand-new awesome crypto-system!" is a huge red flag, and what we should be looking for is "Hey, we're using tried and tested protocol X, which we're pretty confident about".
From an app-writer's perspective I can see why they want to announce that they've made this awesome new security system - they want to differentiate themselves, and security is in the public eye right now so seems to be a selling point. Human nature being what it is, new and shiny is eye-catching and good for sales. But we really want pretty much the opposite here.
People that want to do the latter should go out of their way to avoid appearing to be the former, not call up Techcrunch to show off their unicorn.
That is what the team at Ionic Security* is doing. With about 50 open engineering positions we are hiring :)
My email is adam at our domain.
* I'm the founder/CTO
The actual problems here are that the claims made by Zendo are 1) pointless and 2) impossible. They're pointless because one-time pads offer zero real-world security benefit over a modern symmetric cipher. They're impossible because there's no way to securely generate and share a one-time pad the way they're saying.
For example, you say the QR code is used to initiate a direct, encrypted wireless connection. Encrypted how, exactly? With a symmetric cipher! Either a symmetric cipher is good enough to keep things secret, in which case the one-time pad is pointless, or a symmetric cipher is not good enough to keep things secret, in which case the one-time pad is compromised in flight.
If you want to make security a core feature and not get criticized, all you have to do is get your security right. If you want to get your security right, bring in a professional. Any crypto professional worth anything could have pointed out all these problems within five minutes of being given a summary of their design. They either didn't consult with a professional, or they did and ignored the advice.
Blog posts like this may not help bring about the security revolution you want, but they sure are helping to prevent a security disaster in the form of a bunch of completely broken programs leaking our info every which way while pretending to be secure.
If companies launched with a real crypto review, this wouldn't happen. On the flip side, most companies wouldn't launch at all because their product is simply inherently insecure. Or, it addresses a mostly useless threat model. For instance, it requires you to trust their server while claiming to be super duper secret.
Even Silent Circle, which touts some famous names, talks up their secure PSTN service which is so obviously interceptable it's bizarre to make any security claim at all.
The problem with crypto your mum can use is that key management is a pain in the ass. And if users don't verify and maintain their own keys, most systems are useless against strong threats. zRTP is the closest thing to great, because there's a simple in-but-out-of-band key verification system built in.
And if you day your mum doesn't need that much security, she just doesn't wanna be in a dragnet or have her ISP read her email, then choosing, say, Gmail, and emailing other users with TLS-enabled SMTP servers gets her pretty damn far (if SMTP actually verified certs). But that's not a very sexy product, is it? (Despite being what many corporations do -- configure explicit SMTP-TLS policies.)
For instance, a messaging protocol that authenticates its participants can be strongly privacy-preserving for the initiator or recipient, but as far as we know, not both. One side can initiate the connection anonymously, but at some point one or the other must identify themselves before the other.
Another issue is that crypto is not, and may never be, at the point where anyone can securely assemble a protocol from raw primitives (e.g., AES or SHA-2) without specialized knowledge. These primitives provide security features that are well-defined mathematically, but that definition may not map well to intuitive real-world security properties. As an example, a one-time pad done correctly is information-theoretically secure. But it's trivial to tamper with, because there's no authentication of the message. AES-CBC has the property of indistinguishability under chosen-plaintext (IND-CPA) and chosen-ciphertext (IND-CCA1) attacks, both of which are considered necessary properties for a block cipher to be secure. For a long time, we though this was good enough. Unfortunately, IND-CCA1 didn't model adaptive chosen-ciphertext attacks, where an attacker uses the outcome of previous decryption attempts on chosen ciphertexts to influence his next choice of ciphertext to submit for decryption. Authenticated modes provide indistinguishability under adaptive chosen-ciphertext attacks (IND-CCA2), but unauthenticated modes like CBC remain popular (they do still have their use, but you need to understand what the risks and tradeoffs are before using an unauthenticated mode like CBC).
We likewise don't know of a good, user-friendly way to authenticate identities without the use of a central authority (à la certificate authorities) or a web of trust (à la GPG). Both suck. With CA-style authentication, if a CA is compromised, you lose many of the security guarantees. This is perhaps good enough for e-commerce, where governments typically have little incentive to steal credit card numbers, but it's potentially catastrophic for communication between political dissidents. A web of trust is perhaps better for this kind of use-case, but nobody knows how to make the process of bootstrapping the web of trust simple, the decision of who to trust is inherently complicated (Alice trusts Bob and Carol, who both sort of know Dave who vouches for Eve implicitly; how should Alice feel about Eve?). You can hide that complication at the cost of decreasing the utility (trust conservatively) or increasing the risk (trust liberally). Or you can expose that complexity and let individuals weigh the risks themselves.
The more of these decisions and choices you hide from the user, the more user-friendly you can make your system. But the cost is control over exactly whom and how you trust. Unfortunately, if you build one easy-to-use system for people to securely share cat photos and one hard-to-use system for political dissidents, it's easy to identify the political dissidents.
Anyone who solves this problem deserves a fucking Nobel.
"Wary" is the key word. If I have a true physical RNG, I can certainly make 2 DVDs full of identical random numbers. I can share one with you -- physically, not using email or barcodes. We can then communicate in the open, saying something like "beginning at position x on the DVD, here is my message" and nobody can read the part of the message that travels between the crypto functions
They can still read my keystrokes, or gain entrance to where I work and video record me. They can gain useful information simply based on the pattern of you and I communicating. They even may be able to surreptitiously copy our OTP by using compromised software. But the OTP part is secure.
The real problem is that the entire OSI stack is a leaking piece of crap. It's been broken at every level. So even if you have "perfect" crypto? It doesn't matter so much.
ADD: Nothing's stopping you from using a OTP on top of a normal set of crypto algorithms. I like the OTP idea -- I'm just not sure in the current environment you're getting anything from it.
> The real problem is that the entire OSI stack is a leaking piece of crap.
How is breaking into your computer an issue of the OSI stack? Are you using "OSI stack" as synonymous to "the whole operating system with all its running processes"?
A good private key encryption scheme doesn't have that limitation. That makes it better than a one-time pad for most practical situations.
Homomorphic encryption is still very much an emerging tech. For most applications it's still too slow. There's all sorts of cool things we can build when it gets a bit more mature, but for now it's not unreasonable that there's no press coverage of it.
On secure obfuscation - there was actually a wired article about this (unsurprisingly the title was rather overhyped and click-baity), so I don't think it's fair to say it didn't get press coverage. This is closer to being usable in the real world and thus got more press coverage. Again though, it seems unfair to complain about the amount of coverage it got, because regular readership can't go out and use it yet.
The problem IMO is more that there's a conflict between the big splashy software release that gets you lots of users and attention, and the slow careful discussions on crypto lists that gets you more confidence your software is actually secure before it's in the hands of end users.
Without the big release, it can be hard to build a user-base - and if no-one uses your new more-secure messaging app it doesn't really do a lot of good. Without the slow discussions you're potentially endangering your users. Some sort of compromise is probably the answer, but I'm not sure exactly what that should look like (although I have some ideas).
Sure, but please use ChaCha20-Poly1305 if you can. Two libraries (nacl and libsodium) implement it for you; libsodium is a portable implementation of nacl with bindings for most popular programming languages.
If you're not using Sodium/Nacl, don't go out of your way to use Salsa/ChaCha/Poly1305. If your platform has a good AES-GCM, that's also fine.
The important thing is to use the best tested, simplest interface available to you. If switching from AES to ChaCha means you have to do any of your own protocol design, it's not a win.
Right, sorry if I implied that anyone should roll their own crypto libraries.
Use the standard implementations!
http://doc.libsodium.org/bindings_for_other_languages/README...
For PHP developers: https://github.com/defuse/php-encryption (wrapper for openssl)
1) Why is a mobile phone random number generator good enough to generate encryption keys, but not good enough to generate one time pads? What extra weaknesses do one time pads expose?
2) For their 2nd point, Zendo has said that the pad exchange happens locally ( device to device ). So you would need to be in the room to eavesdrop. So the transport mechanism they choose there is a little bit less of a risk I think.
3) Their 3rd point also doesn't seem to be that big enough of a deal to warrant the tone... if sha256 is broken, a man in the middle would be able to corrupt messages, but not in a meaningful way ( ie switching yes to no ), it would just look like garbage to the other person...
I think #1 is probably the biggest issue, I'd like to understand it a bit more.
It amounts to basically the same thing. That's the point there, what's happening in the phone is a small amount of random data is being used to generate a large amount of pseudo-random data. The security of the OTP is therefore dependent upon the PRNG and in effect you are using the PRNG as your stream-cipher. It doesn't buy you anything.
>> So you would need to be in the room to eavesdrop. So the transport mechanism they choose there is a little bit less of a risk I think.
With other schemes that use similar things, the exchange is of public keys. Zendo appears to use the barcode as a symmetric key, meaning that the transfer can be eavesdropped/intercepted/impersonated a bit more easily. In an asymmetric situation you could encrypt all messages with the receiver's public key and ensure only they can decrypt.
>> Their 3rd point also doesn't seem to be that big enough of a deal to warrant the tone...
This is more of a criticism of style, and how little they have disclosed.
One time pads need to be large enough to encompass the size of all communications which are encrypted by them. Encryption keys need to be a couple k in size at most.
For 2 and 3, basically the author is stating that the use of a one time pad is redundant at best, and potentially crippling at worst (since the capture of a copy of the OTP compromises all communications, backwards and forwards, and it would be tempting to re-use the OTP instead of constantly having to meet back up and generate a new one).
2. It's a key exchange that can be attacked with a video recorder and, more importantly to this analysis, that depends on AES. There is no point in using a one time pad whose key is encrypted with AES; you might as well eliminate the added risks of a one time pad and just use AES.
3. Integrity failures in cryptosystems tend to produce confidentiality failures. For instance, error oracle attacks depend on attackers injecting bogus messages and observing behavior. You can't have confidential message encryption without message integrity.
That probably isn't the case, there will always be tons of situations overlooked where you already know or have a good guess about what the plaintext of a message looks like and then you can change that section of plaintext to whatever you want, for instance, in a contrived example, lets say that there's some hypothetical messaging app that starts every ordinary message between two users with a header consisting of some fixed bytes and some predictable bytes at the beginning like an account id or something like that. I, the attacker, can replace any known plaintext I want with any other plaintext relatively easily. This might mean replacing the message header with a different one that means, my OTP is empty, resend a OTP encrypted with AES key "password1".
Obviously a vulnerability won't be that simple but there is a good chance that there's something like that where an attacker can compromise our hypothetical OTP app by being able to change any plaintext he already knows. For instance, you can XOR the message text with 0x20 and you'll probably corrupt a lot of punctuation and spaces but that would invert the case of the entire message.
What I want to make[1] is a pair of basically any embedded micro, in a "thumbdrive-ish" (or whatever for the prototype) size that has some amount of flash on it to store the pad, a USB interface, and a hardware-RNG[2]. Additionally, there is some sort of serial interface that will be used to null-modem two of these devices together.
When connected, the devices generate public keys (for authentication, etc), and generate noise. They send the noise to each other, and save the XOR of the noise to flash, so no device has total control of the generation.
The idea is that the "user experience" would be this: go over to a friends house, and plug your devices together for some period of time (hours, probably, but it can be cut off early). Then when you go home, plug it in to your computer and you can chat securely, slowly burning the pad from flash automatically. This is done over USB, so the pad never leaves the device. The firmware can handle the destruction of the pad as it is used and other details.
This doesn't solve everything, and the pad would run out fast if you wanted to send non-text data. What it should do is make it trivial for two parties to chat/email securely. Details like refilling the pad (visit friend for dinner, plug devices together while you eat) shouldn't be hard for most people, as long as they can see how much pad is remaining.
[1] I plan to implement a prototype of this as soon as I have spare time & cash for some hardware to experiment on.
[2] probably using something like the reverse-biased transistor method discussed in TFC
If we took this seriously, we would all still be using modified versions of DES, which, in a twisted way, we are. This isn't a good argument for ignoring new implementations of different cryptosystems.
"If a new crypto tool is first announced in a press release or popular science magazine, don’t use it."
This is far more accurate, but i'd extend this even further and define it as: "Don't use any new crypto." (Unless it comes from someone with high social influence in the sphere of cryptography research, of course)
Ever since Biham and Shamir published the differential cryptanalysis, we've known that NSA didn't backdoor DES, but rather helped strengthen it against that attack. Concerns over a backdoor had nothing to do with it.