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.

I've come up with an approach to steganography which needs review of both its cryptography and its math. There's a complete working implementation at https://github.com/bramcohen/DissidentX and the explanation below is taken from the documentation files, which contain much more detail, but this covers the core idea.

This scheme is divided into three layers, which go together like this:

encode(pack(encrypt()))

The most novel part is the encode layer. It takes a key, plaintext with possible alternates, and value to encode. Intuitively, if the key and plaintext are used as the keys to a stream cipher, then it will probably be possible to make the output of that stream cipher begin with a desired value if the number of alternates is more than the number of bits in the value. Unfortunately that would require time exponential on the number of bits to find the encoding. This scheme uses a very specifically designed stream cipher which makes it possible to compute which alternates to use to get the desired value in a polynomial amount of time. Specifically, it uses each contiguous section of sixteen bytes for a stream cipher (AES in OFB mode) and xors the outputs together, and makes sure that alternates have at least fifteen fixed bytes between them. The result is that flipping an alternate always xors the output by a specific value, independently from flipping other alternates, so it's possible to calculate which alternates are needed by row reduction.

There's lots more details in the documentation, not inlined here due to sheer volume.

The specific use case this is intended for is as follows. My question is, is it possible to attack this protocol under these circumstances, either by making fake messages, or by reading messages an attacker doesn't have the key to?

The primary use case for DissidentX is encoding messages in files on the web. There should be a utility which scans all objects the user's web browser downloads (html files, images, css files, etc.) for messages using all of the keys the user has entered. Someone sending messages to that person provides a web service where users who have widely viewed web sites can upload their files and get back slightly modified version with messages steganographically added. The web users should not be able to read what the messages are, and it should be possible for the service doing the encoding to not have to keep messages in plaintext.

share|improve this question
1  
I'm just still not quite sure what the steganographic aspect of the idea is. You can hide messages in an encrypted data stream, it's not very hard - the difficulty is doing it in plain sight without being detected (for instance in a scenario where a proxy may reject anything he doesn't understand, so no encryption allowed). I'm probably just misunderstanding the concept, could you elaborate a bit more? – Thomas Jan 15 at 3:08
1  
Ok. You may want to review your Explanation.txt file where the terms plaintext and ciphertext are also used, possibly in a confusing way. Aside from the terminology, I feel like there are still quite a few details missing. You mention a "custom stream cipher" but only give a very broad description. You describe the three layers as "encode(pack(encrypt())))" , but give only the coarsest description of each (even in the Description.txt), e.g. the arguments to encrypt aren't specified. – mhum Jan 16 at 5:59
1  
Your question asks for a review of the "cryptography" and "math" of your method but I'm not sure there is enough information here to provide that. Is the intent for us to infer this from the source code directly? I fear that you may not receive adequate response if that is the case. A typical presentation of cryptographic methods starts with a full description of the algorithm (often in pseudocode), an outline of the various design choices (choice of constants, why n rounds and not n+1 rounds, etc...), and your own cryptanalysis of the method (what attacks have you tried, etc...). – mhum Jan 16 at 6:04
1  
@BramCohen Yes. But what is easy for some is not necessarily easy for all (eg: Mac OS X requires Xcode for a C compiler which is required for PyCrypto). Every minute installing software is a minute not analyzing. Given the level of detail you've provided here and in the text files in your repo, is it also your intent that your Python code should be the primary documentation for your method? I worry that this would limit cryptanalysis only to those conversant in Python. I do not think you have provided enough information in text for me to reproduce (and analyze) your algorithm on my own. – mhum Jan 17 at 21:11
2  
I closed this question as even after 5 days of discussion and two months of waiting it is still not clear what this scheme actually does. – Paŭlo Ebermann Mar 18 at 18:30
show 33 more comments

closed as not a real question by Paŭlo Ebermann Mar 18 at 18:28

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, see the FAQ.

1 Answer

I'm not sure where the steganography part is in this. Steganography is a "security by obscurity" technique, where you hide the plaintext message inside another data stream, rather than protecting it with a key.

The strength of a cryptographic method should rely solely on the key; you should always assume that the encryption method is known publicly. So if you want to inject your message in the least significant bits of the pixels of a photograph (not really an original steganograpical idea), then if the cryptanalyst is aware of the method she can decode it.
If you use a method like AES for instance, then the cryptanalyst can't crack your message unless she has the key; knowing the method is no help at all. If you want to use a strong encryption algorithm to encrypt the message first, before the steganograpic step, then I don't see why you would add the latter. It doesn't add extra security.

share|improve this answer
2  
"If you want to use a strong encryption algorithm to encrypt the message first, before the steganograpic step, then I don't see why you would add the latter. It doesn't add extra security." - It's so you can send data down a plaintext channel where obviously encrypted messages are filtered out or deemed suspicious. – Bram Cohen Jan 15 at 21:59
@Bram - like I said security by obscurity isn't safe. Once Eve discovers your method, she can decrypt any message you send. If you encrypt using AES then let her know that, she still needs the key, which you can change with every message if you want to add extra security. (You can use Diffie-Hellman's key exchange algorithm to generate a new key every time.) – stevenvh Jan 16 at 8:00
Do you actually know anything about steganography beyond the catchphrase 'steganography is security through obscurity'? That statement makes about as much sense as saying 'encryption is security through obscurity', although it seems to be popular for some reason, not sure where everybody gets it from. – Bram Cohen Jan 16 at 8:04
2  
@stevenh: I believe you are misunderstanding one of the primary goals of steganography. The goal is to embed messages in covertexts which are indistinguishable from covertexts without embedded messages, even when the embedding method is completely known to the attacker. This is the exact opposite of "security by obscurity". "Security by obscurity" refers to obscurity of the methods, not of the message. – mhum Jan 17 at 17:16
2  
@stevenh Eve (or, in the parlance of steganography, Willie or the warden) should not even be able to suspect a hidden message better than chance. Roughly, given two potential covertexts, one of which contains a message and the other which does not, the warden should not be able to determine which text contains the hidden message with probability > 0.5, without knowledge of the key, even when the method is known. It is often the case that determining which bits of the covertext carry the message is unknown unless the key is known, even when it is known that the covertext contains a message. – mhum Jan 19 at 17:49
show 4 more comments

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