Show HN: SpeakingJpg – Hide encrypted text messages inside jpeg images
github.com
github.com
I've been thinking for a while that a subtler version of this -- where the encrypted message is overlayed into the picture data -- would be very hard to detect.
I'm thinking down a path where using strong encryption would be illegal and all communications are monitored, so hiding the fact that an encrypted message even exists is important.
The idea is that the encrypted signal would be essentially indistinguishable from random noise so as long as the message isn't very dense relative to the picture it would be hard to determine it was even there. Also, people naturally and normally send all kinds of inane pictures back and forth so it seems like it would be hard to even infer the existence of an encrypted conversation from data sharing patterns.
You can play around with this idea using imagemagick.
It has a built it "stegano" option to hide one image within another: http://www.imagemagick.org/Usage/transform/#stegano
And, as long you're using a lossless format, it's trivial to encode arbitrary data with imagemagick. You do have to calculate the size beforehand, 14 bytes as a 7x2 image in this example:
$ echo -n "this is a test" | convert -size 7x2 -depth 8 GRAY:- output.png
$ convert output.png GRAY:-
this is a test
So, you create the png with your data (encrypted first if you want), then use the IM stegano option to embed the noisy png into a larger image so it's not so obvious.Make the LSB of each pixel equal to a bit value of the message. EZPZ lemon squeezy and it doesn't affect the image visually. If your message was encrypted well then also the bits would appear randomly so no one would be able to be certain a message was contained as you said.
It hides data in the least significant bits (at locations defined by a passphrase) of the image or audio data itself. This doesn't survive re-compression, though (there are methods that do).
'Statistically Undetectable JPEG Steganography: Dead Ends, Challenges, and Opportunities'
I remember being told that Al-Qaeda used this mechanism to exchange messages pre-9/11. Surely there are longer established tools for this?
I don't think that was ever confirmed. Niels Provos and Peter Honeyman went looking for stego content "in the wild", examining over 2 million images, which was a lot at the time. Their search came up empty.
http://www.citi.umich.edu/u/provos/papers/detecting.pdf
Edit: Apparently they did find one image, created as a demonstration for the ABC News story. http://www.citi.umich.edu/u/provos/stego/abc.html
I guess the data formats are too inefficient in most scenarios. Eg, encoding bytes as words is insanely inefficient, but somehow encoding them in such a way that they make grammatical sense as to not seem "off" - I imagine would be nearly impossible and/or crazy inefficient.
Double that with trying to encrypt your encoded bytes, such that if they were discovered, the encoded bytes wouldn't be blatantly obvious. That's... a lot of damn data haha.
I was just thinking though, if you're using the meta data field, couldn't that make it obvious data is hidden?
I wrote a little program a while ago to send data, by changing the intervals between packets:
A suggestion: would svg not be better ? That is a lossless format in xml format. An image could have lots of details in a very small section, actually composed of readable text that is (in some way) turned into xml. The svg in total has to be valid though.
Anyone?
Worst case, they find it, and you're in the same position as you would be if you sent it without steganography.