Encrypting Secret Messages in Pictures

Published by patrick honner on

This is a very cool (and somewhat technical) description of a simple way to use Mathematica to hide a secret message in an image file.

http://blog.wolfram.com/2010/07/08/doing-spy-stuff-with-mathematica/

The basic idea is that you erase the last digit (in binary) of each pixel’s “color channel”, and then use that spot to store part of the secret message.  Given an image, you can then recover the secret message by looking at that last digit in each channel.

This process does change the image somewhat, but not in a way that the normal human eye (with normal viewing equipment) would ever notice.  In the post, the author subtracts the adjusted image from the original:

Chicken Difference

To most viewers, the difference looks like this:

Chicken Diff 1 final

Only under extreme contrast can you actually see the real difference in the two.  Here, we see the invisible ink reappear!

Chicken Diff 2 final

All that’s left is to decode the colors and read your message.  But be careful–sending and receiving secret messages might get you some unwanted attention.


patrick honner

Math teacher in Brooklyn, New York

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Follow

Get every new post delivered to your Inbox

Join other followers: