5 ms·
"smart contracts can also do things that normal contracts can’t, such as enforce a set of rules entirely through unbreakable cryptography." Isn't "unbreakable"
by pmoriarty 9y ago
"smart contracts can also do things that normal contracts can’t, such as enforce a set of rules entirely through unbreakable cryptography."
Isn't "unbreakable" a bit of a dirty word in the security community? Is there really such a thing as "unbreakable cryptography"?
- CydeWeys 9y agoOne time pad encryption is unbreakable given integrity of the pad material itself.
- InclinedPlane 9y agoAnd, how do you build one time pad encryption into ethereum?
- dsacco 9y agoYou can't. Or, well, you can, but it's redundant. One-time pads make sense in the Cold War, Vernam Square era of cryptography. But now that we have the internet and public key cryptography, a one-time pad implemented in Ethereum would be inane and frivolous. Take Alice and Bob, who want to communicate confidentially. Alice doesn't know Bob personally, so she can't securely communicate the one-time pad to Bob in person. Ethereum implements public-key cryptography, so she uses Bob's public key to send him the one-time pad's key. But now we're at the chicken and egg problem: we've just witnessed secure communication, so why do we want to use a one-time pad in the first place? Alice and Bob might respond, "so we can have perfect secrecy at some point in the future!" Which...alright, sure, let's go with it. So now to implement the one-time pad in Ethereum, Alice needs to feed a source of true randomness as a seed for a secret key which is as long as the plaintext. This is not only a genuinely hard problem, but it's grossly inefficient to encrypt something using a secret key as long as the plaintext itself. But wait - for every new plaintext, Alice has to do this true random seed song and dance each time to generate a new secret key. And every secret key ever used needs to be kept perfectly secret as well. You really just don't want to do this. One-time pads barely made sense in pre-modern cryptography; they don't solve any practical problems in modern cryptography, and their demands require steep usability sacrifices that are quite easy to screw up.
- InclinedPlane 9y agoMy question was more: how do you ensure a system that has true secrecy for its one time pad data when all the source is open?
- PeterisP 9y agoThe code will inevitably need to use a source of true randomness, which will be external to your source code, by definition it can't be a deterministic formula, it needs to use external input from physical devices.
- InclinedPlane 9y agoAnd? You've just moved the problem, you haven't solved it. How do you guarantee that your source is what you think it is? If you can't trust anything outside your source code, then you can't trust anything outside your source code. If you can't trust, say, a url or an IP address. Then you can't trust those things to host a source of randomness either. Security is only as strong as the weakest link, if you try to obfuscate a weak-link by surrounding it with impressive looking junk, that doesn't make it stronger.
- PeterisP 9y agoI'm not moving the problem, I'm stating that the problem (as it seems you're stating it) is unsolvable, you simply cannot have a closed crypto system where looking at the source is sufficient to ensure that it's secure. You need an external source of entropy to generate the key material required for any cryptography. It can't be in your code because any code is fundamentally incapable of doing that. If your source of entropy is compromised, then none of cryptographic systems are safe, not symmetric, not asymmetric, not one-time pads, not anything else. Yes, you can't trust an url or an IP address - but you should be able to trust your hardware, and that commonly offers some decent sources of entropy. You can also trust yourself - e.g. user-action derived entropy. If you don't trust your hardware, tough luck, get trusted hardware. If your key material isn't generated properly, then your crypto will not be secure. It doesn't mean that the method is flawed or insecure. All methods are the same in this regard, it simply means that security requires not only secure code, but also other precautions - e.g. secure generation of keys, secure management/storage of keys, secure platform on which to run your code, etc, etc. If you have a secure algorithm, proper implementation, best practices everywhere else, then your system will still be insecure if you fail e.g. to store your keys securely and someone gets them.
- redcap 9y agothe algorithm may be nigh-on unbreakable, but the implementation can always have flaws. Getting crypto right is hard.
- dsacco 9y ago> Isn't "unbreakable" a bit of a dirty word in the security community "Dirty" is one way to put it, yes. I'd personally use something like "false god" or "blasphemy" :). "Unbreakable" is a naive way of describing cryptographic algorithms, because it preempts conversations about intractability assertions or complexity analysis...modern cryptography accepts as a premise that "unbreakable" is not a reasonable goal, which is why we work by quantifying computational cost. When I see someone use the phrase, "unbreakable cryptography", I mentally discount their authority to speak about cryptography and become more skeptical (this also applies to people who write things like "bank-grade security" or who tell me "AES-256" when I ask them how they're encrypting data, as if the key size is more important than the block cipher mode or confidentiality/authentication construction). > Is there really such a thing as "unbreakable cryptography"? A one-time pad, with the following provisos: 1. It has a truly random seed, not a pseudorandom one; 2. It is at least as long as the plaintext; 3. It is never reused (for the same plaintext, in whole or part). It's straightforward to see why this guarantees information-theoretic security - you have no way of knowing when you've recovered the correct plaintext. There's nothing to brute-force. In the security community we don't use one-time pads because we dare not touch the sun: they are extremely difficult to implement correctly, and even if you do implement them correctly you have traded off an inordinate amount of practical usability for a relatively small improvement in information theoretic security. Asking people to 1) use true randomness to seed keys, 2) generate a new secret key for every message, 3) never reuse the same secret key and 4) keep each secret key securely confidential is extremely prone to error. It's often a fetishized ideal among people who first read about it, but in practice it's just not worth it.
- rsync 9y ago"Is there really such a thing as "unbreakable cryptography"?" Yes. One time pads are unbreakable. "Even after the aliens from Andromeda land with their massive spaceships and undreamed-of computing power, they will not be able to read the Soviet spy messages encrypted with one-time pads (unless they can also go back in time and get the one-time pads)." (Bruce Schneier, Applied Cryptography)
- Animats 9y agoOnly if they're really random. See Venona.
- njarboe 9y agoOne could envision that the transportation of one-time pads as the only objects worth shipping between inhabited solar systems. Value per gram could be enormous.
- int_19h 9y ago"Our main cargo is a one-time cryptographic pad. The source is Commercial Security at Sjandra Kei; the destination is the certificants' High colony. It was the usual arrangement: We're carrying a one-third xor of the pad. Independent shippers are carrying the others. At the destination, the three parts would be xor'd together. The result could supply a dozen worlds' crypto needs on the Net ..." - Vernor Vinge, "A Fire upon the Deep"
- njarboe 9y agoThanks for the ref. That's where I got it from. Couldn't remember if it was from "A Fire upon the Deep" or from an Ian Banks Culture series book.
- bhaak 9y agoAre these the same one time pads that have already been cracked by the NSA after the Soviets reused them?
- HaseebQ 9y agoHey, author here. I tried to write this article to be accessible to people with little background in security and cryptography (hence its publication on FreeCodeCamp), and to be friendly to non-developers. I took a few liberties with the crypto explanations (like calling a private key to a "secret password") in the hopes of making things more understandable for a general audience. Definitely didn't use rigorous language in just about anything here. :)