crypto that is robust to data mangling

The fear of every surveillance society: citizens protecting their own privacy with strong cryptography

crypto that is robust to data mangling

Post by bwana on Thu May 09, 2013 11:10 pm
([msg=75521]see crypto that is robust to data mangling[/msg])

I am looking for a way to encrypt a document that is robust to data corruption. Consider the integrity of an image. You can mangle a lot of pixels and still figure out what the picture shows. However if you bury a message in that image using steganography, a small change will render the encrypted message lost. Is there a way to encrypt a document so that even some corruption of the encrypted product does not prevent decryption?

Put a more specific way, I guess the question is:
is there an error correcting code that can be applied to images containing steganographically encrypted messages?
bwana
New User
New User
 
Posts: 3
Joined: Thu May 09, 2013 11:02 pm
Blog: View Blog (0)


Re: crypto that is robust to data mangling

Post by sordidarchetype on Fri May 10, 2013 9:31 am
([msg=75525]see Re: crypto that is robust to data mangling[/msg])

This is dangerous ground you are trying to tread. One of the advantages to integrity verification of encrypted messages is that a third party altering the cipher can be noticed and the message can be discarded as fraud. If you auto-correct for data corruption, it would be possible for an attacker to craft specially mangled cipher packets that could decrypt to something OTHER than what was originally intended. Yet, because the auto-correction was performed, it would appear as authentic as the original message. The truth is, you want the message to come across completely and uncompromised. If there are corrupted bits, you will most certainly want to discard the cipher and retransmit.
User avatar
sordidarchetype
New User
New User
 
Posts: 47
Joined: Wed Dec 22, 2010 12:46 pm
Blog: View Blog (0)


Re: crypto that is robust to data mangling

Post by mShred on Sun May 12, 2013 2:25 pm
([msg=75567]see Re: crypto that is robust to data mangling[/msg])

Damn. Crypto at it's finest. I'm not gonna lie, I'm not the best when it comes to crypto.. Though it is incredibly interesting.
This right here seems pretty complex. You'd almost have to build the message decrypter to be able to sift through all of the changes.
What exactly do you need this for?
Image

For those about to rock.
User avatar
mShred
Administrator
Administrator
 
Posts: 1680
Joined: Tue Jun 22, 2010 4:22 pm
Blog: View Blog (2)


Re: crypto that is robust to data mangling

Post by bwana on Sun May 12, 2013 9:41 pm
([msg=75576]see Re: crypto that is robust to data mangling[/msg])

Let's take the example of image copyright. It is too easy to edit out a watermark with today's powerful tools. But if the copyright is also embedded in the image data (not the metadata which is too easy to edit) then I could very easily prove that someone stole my photograph.

the problem i have is embedding information in an image that can withstand conversion of the image to other formats. so if for example, i save some proprietary information in a schematic drawing that is saved as a tiff. then another person edits the photo saves it as a jpg. then another person rescales that image and sends it by email. then another person adds a caption. when the final recipient converts it back to a tiff, the original steganographically encoded info is not retrievable. however the image is clearly recognizable as the original.

Aside from using a watermark in the original image, is there any other way to encode information into the image that will be preserved despite image editing? or is this not possible due to a fundamental property of information and steganography? Claude Shannon where are you.

Another way would be to manually alter the data in the file and adding information like copyright somewhere in there that only I know about. For example, in the old days, Macintosh file formats had a data fork and a resource fork. You could even add whole images to the resource fork of a Microsoft word file and no one would know.

I guess I'll just have to play around with a hex editor and see what I can change in a jpg file without corrupting it.
bwana
New User
New User
 
Posts: 3
Joined: Thu May 09, 2013 11:02 pm
Blog: View Blog (0)


Re: crypto that is robust to data mangling

Post by FunctionCreep on Mon May 13, 2013 7:41 pm
([msg=75584]see Re: crypto that is robust to data mangling[/msg])

This is an interesting question overall. What happens if you embed an encrypted message in X file-image format and then change that format? Well, it gets destroyed.

The trick here is that all the image-format converters only take into consideration the various specifications that make up visible pixels.

So when you encipher your message & embed it in your image with your steganography application, it is THAT application that makes sure that the image still makes sense afterwards (both visually & that the encrypted data is still valid). It is also that application that knows WHERE to look for that encrypted data in order to decrypt them.

A way to do this is for your steganographic process to follow the JPEG specification and analyse an image according to its weight and foresee what will be discarded in the 8x8 blocks and make sure to avoid the small weight spots to embed data. Truth is though that JPEG compression is not an exact science and makes alot of assumptions and approximations making it hard for us to predict something like that.

But it's all 0&1's in the end so there must be something we can do. Yes, you could develop a complex enough algorithm that is so abstract that where the encrypted message is doesn't really matter right? Not exactly, you still need to play inside a quite limited system without breaking the various image standards or whatever standard it is that you're working with since you're embedding concealed data and are not looking to alter the original content.

You should also know that the maths you're going to need will be quite involved. Have a look at pattern theories, statistics and probability. Have a look at Markov's process and Continuous-time Markov chains.

Also this: http://www.dam.brown.edu/ptg/REPORTS/02-10.pdf

To give you an idea of how deep this matter of being able to predict randomly mangled data in an undefined system can get.

Have fun! :)
"I hope for nothing. I fear nothing. I am free." ~ Nikos Kazantzakis
User avatar
FunctionCreep
Experienced User
Experienced User
 
Posts: 92
Joined: Tue May 18, 2010 6:19 pm
Blog: View Blog (0)


Re: crypto that is robust to data mangling

Post by bwana on Tue May 14, 2013 4:27 pm
([msg=75590]see Re: crypto that is robust to data mangling[/msg])

I have since discovered any number of ways to hide info in an image that is then tamper proof. Digimarc, for example, encodes the message as grain in a photograph. The encoding process is resistant to image mangling. And the 'hidden watermark' can be found anywhere the image copy happens to be posted online. but the image gets grainier.

I can also hide info in a jpg file after the end of file file marker. This info survives image manipulation but not conversion to other formats.

I think the problem lies in the fact that image processing and encryption are two fundamentally different transformations. The meaning of an image derives from the relative color, brightness and pattern of a 2d pixel array - changing any number of pixels (up to 80% in some cases) does not prevent our brain from properly reconstructing the image. Encryption is an algorithmic transformation where the order of the bits within the whole is as important as their values.
bwana
New User
New User
 
Posts: 3
Joined: Thu May 09, 2013 11:02 pm
Blog: View Blog (0)


Re: crypto that is robust to data mangling

Post by -Ninjex- on Tue May 14, 2013 8:04 pm
([msg=75595]see Re: crypto that is robust to data mangling[/msg])

Recently, I got my hands on about three different books covering stenography and forensics. If anything I read may seem somewhat related to this subject, I will be sure to post it for you. However, I have some other ebooks to delve into before I get a chance to read them.
If you're not willing to learn, no one can help you. If you're determined to learn, no one can stop you.⠠⠵
The absence of evidence is not evidence of absence.
I can explain it for you, but I can't understand it for you.
User avatar
-Ninjex-
Addict
Addict
 
Posts: 1204
Joined: Sun Sep 02, 2012 8:02 pm
Blog: View Blog (0)



Return to Crypto

Who is online

Users browsing this forum: No registered users and 0 guests