Computer Science 15-112, Spring 2014
Class Notes: Steganography (Image Manipulation and Encryption)
- See
the Wikipedia page on
Steganography
Goal: To conceal a private image inside a public image, creating an
encoded image that looks like the public image but secretly contains the
private image. Then, to send the encoded image to a recipient who can
then decode the image and reconstruct the original private image.
- Start with this
private image (download it to privateImage.gif):
- Also start with this image
(download it to publicImage.gif):
- Run this code:
steganographyEncoder.py
- And it produces this
encoded
image (stored in encodedImage.gif):
- Let's see the public and encoded images
side-by-side:
|
|
original
public image |
encoded image
for transmission |
- Now, send the encodedImage.gif to your recipient
You may include some innocuous and irrelevant text, like: "Hey, can you
believe this guy pitched a cat?!? Seriously, no Photoshop here.
Amazing!"
- Your recipient saves
encodedImage.gif and then runs this code:
steganographyDecoder.py
- And it produces this
decoded image (stored in decodedImage.gif):
carpe diem - carpe diem
- carpe diem - carpe diem - carpe diem - carpe diem - carpe
diem - carpe diem - carpe diem