Tell me more ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

Consider the situation of a nation state (Blue) at war with another nation state (Red). Blue wants to deploy a secure cipher that blue currently can not break, but they are considered that Red could reverse engineer the cipher and use it to secure Red's communication (Red is unable to develop it's own secure cipher).

Questions:

  1. How have governments in the past approached this problem?
  2. How could one design such a cipher?

I have been working on an incomplete (maybe impossible) formulation of such a system. I know that asking is "my cipher secure" questions is frowned upon, but I hope my outline below is free of enough implementation details that it will not be seen in such a light. It is more of a "is my cipher possible" question.

Here is my formulation of a backdoor cipher.

Assume a function $g$, takes as input a integer $s_i$ and outputs a cipher $c_s$. That is, $g$ generates ciphers based on a seed $s$.

$$\text{Let } g(s) = c_s$$

The cipher $c_s$ has the property that if one knows $s$ one can decrypt all messages encrypted with $c_s$. Thus, the cipher is safe for Blue to use since Red doesn't know $s$ and can't learn $s$ from $c_s$, but if Red attempts to use $c_s$ Blue can decrypt all their communications.

One could build $c_s$ by appending an encrypted (using a public key derived from $s$) form of the key used by $c_s$ to the ciphertext. That is,

$$\text{Let } c_s.\text{encrypt}(key, plaintext) = ciphertext|publicKey_s(key)$$

While in principal this would work it would not satisfy our scenario above because the backdoor is so blatant and easy to remove. Red could just alter the cipher to not append the encrypted form, $publicKey_s(key)$, of the key.

Instead a more subtle approach would be to create a function $g'$, which still takes $s$ but produces both a cipher $c'_s$ and a function $v_s$.

$$\text{Let } g'(s) = (c'_s, v_s)$$

The cipher $c'_s$ has the property that some of its keys are insecure and some of its keys are secure. The function $v_s$ produces only secure keys.

Blue can generate and distribute many secure keys using $v_s$.

Best case, Red doesn't realize that some keys are weak and some are strong and thus assumes that Blue would never use a cipher that Blue could break. Red trusting in this uses $c_s$ for secret communications.

Even if the vulnerability comes to light, Blue communication are still secure and Red still can't generate strong keys. Nor can Red use captured keys that were generated by Blue because Blue remembers generating them.

Question: Is this scheme is remotely possible, if so what math could be used to construct it?

EDIT:

I wrote this up as "Imagining a Secure Backdoor Cipher".

share|improve this question
3  
Does the Dual_EC_DRBG qualify? – user11342 Sep 12 '11 at 14:49
@user11342 +1 but please add more (maybe sum up the various claims made about it). Dual_EC_DRBG does seem rather close to the above scheme in that it has "weak values" and "strong values". I find this really interesting. – Ethan Heilman Sep 12 '11 at 16:57
I have to take issue with some of Mr. Ebermann's comments about the one time pad not being a stream cipher . I make these comments here for the sake of those who may be following this particular thread. I guess I will have to begin by asking Mr. Ebermann what his definition of a one time pad is and why the cipher system I have mentioned in this thread cannot be classified as a one time pad as is traditionally defined in the Wikipedia article on the one time pad. – William Hird Sep 18 '11 at 6:49
Look you can't ask me to expand on a subject and at the same time move my answer to a place where I can't exactly do that because I don't have enough reputation. This and the generally low level of the answers have lost my interest in this cite. Good bye. – user11342 Nov 18 '11 at 16:51
@user11342 Where did your answer get moved? I can't seem to find it. – Ethan Heilman Nov 22 '11 at 13:52

3 Answers

up vote 7 down vote accepted

Mathematically, it can probably be done. There has been research into trapdoor block ciphers. See, e.g., A family of trapdoor ciphers by Rijmen and Preneel, and follow-up papers.

In practice, though, the problem statement is not realistic. The assumptions are just not realistic. Today, there's no reason why Red would be limited to using Blue's ciphers. Instead, Red could just use any well-vetted cipher, like AES. There's no reason why Blue should assume that Red will use Blue's ciphers; that's just not how adversaries are likely to behave given the current state of the public literature. So while your problem statement might have been relevant and interesting to ponder 40 years ago, when there was no public literature on cryptography ... today, it is irrelevant.

share|improve this answer
1  
I agree that in all likelihood you are correct, AES is fairly secure and harddrives are so cheap everyone can use OTPs. For the sake of argument lets assume that the NSA, GCHQ or whatever found a devastating attack on all known ciphers (AES, SERPENT, etc). Rather than publish the attack, they slowly move all military systems to the new secure cipher (the USA does employ unpublished/secret ciphers like BATON). The NSA wishes to maintain their ability to listen to communications if the "other side" begins to suspect something and switches to the new secure cipher. – Ethan Heilman Sep 12 '11 at 1:26
1  
@e501: "lets assume that the NSA, GCHQ or whatever found a devastating attack on all known ciphers" - But in reality, NSA is actively encouraging use of AES, and permits its use for classified traffic (at the SECRET level, given that certain conditions are met). This suggests that the NSA probably does not have a devastating attack on all ciphers. Movie-theater plots are fun to think about, but the reality is most likely more mundane. In practice, the way that NSA snoops on bad guys is probably not by whizbang cryptanalysis, but by traffic analysis, operator error, insecure endpoints, etc. – D.W. Sep 12 '11 at 2:19
1  
I agree completely, if history is the judge general mathematical attacks are not the way most military ciphers are broken. Never the less there is a non-zero chance that GCHQ could break AES tomorrow. Do they tell the world? Many friendly governments are not going to be able to switch to new ciphers in time. If they announce a new contest out of the blue they are tipping their hand. Furthermore, there is a valid strategic argument to be made that the benefit of secretly listening on enemy communications out weighs the risk that enemy has discovered the attack as well. What do you do? – Ethan Heilman Sep 12 '11 at 2:38
Well then you have another answer to your question -- use any cipher that has a cryptographic flaw that only you know. – David Schwartz Sep 14 '11 at 13:48

The design of DES might give some insight into the problem. The NSA altered the S-box of DES. Many people thought they planted a backdoor. It wasn't until later that differential cryptanalysis was independently discovered by Biham and Shamir that people realized that the NSA actually made DES stronger.

So the lesson to learn from this is: clearly the NSA knew about differential cryptanalysis and were some of the only people who did (IBM says they knew about it too). NSA really could have designed the S-box to be weak against a differential attack, but strong against all publicly known attacks. Only until differential cryptanalysis was discovered would anyone have known DES was weak.

Since differential cryptanalysis is publicly known, you couldn't use it then right? Actually, you probably could design a cipher which is weak to differential cryptanalysis without getting caught for some time. How would you do it? It all comes down to the difference function. From wikipedia:

The basic method uses pairs of plaintext related by a constant difference; difference can be defined in several ways, but the eXclusive OR (XOR) operation is usual.

So, construct your S-box so that the differences are not XOR. Choose some other difference function and hope no one figures out what function you used. You could probably do a similar thing with linear cryptanalysis.

In all reality though, you'd probably be better off using a standard cipher in an insecure protocol. For example, the padding oracle attack is fairly practical and could be hard to spot, especially if you took the idea and put it somewhere else in the protocol (not in the padding).

share|improve this answer
The NSA did weaken DES so they could break it and others could not. They did by reducing the key size such that only someone with as much compute resources (likely custom built hardware as well) as the NSA could hope to break DES in a reasonable amount of time. – Ethan Heilman Sep 12 '11 at 0:58
1  
I disagree. Today, I don't believe you could design a cipher that's weak against differential cryptanalysis and get away with it. I think it'd be noticed pretty quickly. Using some other difference function wouldn't be enough to hide it; cryptanalysts routinely look for d.c. attacks under other notions of differences. And, even if the flaw wasn't noticed quickly, people pretty much demand that any new block cipher proposal had better come with a proof of security (or at least strong evidence of security) against differential cryptanalysis and other standard attacks, so you wouldn't get far. – D.W. Sep 12 '11 at 1:06
@D.W. I agree in general with your comment (known attacks are probably a bad place to start) but I've spend some time researching differential backdoors. Consider the case in which the difference that the attack relies on is defined by some logical function constructed such that finding the "difference function" to perform the attack is equivalent to 3SAT. How many of the SHA3 finalists have proofs of differential security? The ones that do are conditional on independence assumptions (one can differentially backdoor a function and still prove resistance). – Ethan Heilman Sep 12 '11 at 1:36

Wow 501, you are asking some BIG questions here! :) In answer to your first question, you might want to thumb through the journal Cryptologia, probably the best public source of past military cryptological practice available. In answer to your second question, well, we ALL would like to have the answer to this one, right? :) Let me drop in my two cents worth and try to give you a general answer . If you are talking about wartime cryptography where real lives are at stake, I think you would want to go with the one time pad crypto system because it is the only "proven secure" system publically known(we don't know if the government has anything "stronger" than the one time pad so for the sake of this answer we can leave them out of the discussion). For a modern warfare cryptosystem you are no doubt going to want to stream real-time video information to your troops in the field so you will have to have a high speed (Ghz) one time pad stream cipher running on a cryptographically secure psuedorandom bitstream generator with a very large period. Each warrior in the field would have to have his/her own key so if one crypto unit is compromised the whole system doesn't go down. The key here(no pun intended) is creating the secure high speed keystream generator and doing the key distribution logistics. Good luck!

share|improve this answer
2  
An one time pad is not the same as a stream cipher. And your answer does not answer the question (how can I create a crypto system that I can use securely but the enemy not) at all. – Paŭlo Ebermann Sep 12 '11 at 11:04
It appears a good chunk of cryptologia is online at (findarticles.com/p/articles/mi_qa3926). Can you recommend any specific articles? – Ethan Heilman Sep 12 '11 at 17:04
@Paulo: Every cryptography book I have ever read describes the one time pad as a stream cipher. Please enlighten us as to why you think it is not a stream cipher. – William Hird Sep 13 '11 at 23:39
3  
Your "modern day one time pad" is not an one-time pad, and the perfect security proof of an one time pad is not valid for such a cipher. (There is nothing wrong in using such a cipher, but don't call it one time pad.) But if you want to discuss this further, we should do it in chat (or open a separate question). – Paŭlo Ebermann Sep 14 '11 at 8:40
1  
I asked a new question about this. – Paŭlo Ebermann Sep 27 '11 at 17:56
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.