Skip to main content
gamedev.net
🔒 Locked

secret msg

Started by plessing 10 replies 950+ views
Original Post
plessing
plessing
hi I need to make a small image editor for class. In it I''d like to add the ability to hide a secret msg within an image. The user must specify a password when embedding the msg and that password is required to extract it again. The msg is hidden by changing the values of the pixels slighly in a certain way. I was hoping someone could explain to me a couple of used practices for achieving this. Oh, you can assume that all images will be 32bpp. Im not sure if I''m allowed to make use of the 8 alpha bits but at this point any solution will do. Thanks in advance, pl.
TheOnlyToASter
TheOnlyToASter
You dont have to change the pixels. A friend of mine used plain BMP''s, because per pixel there is an unused byte, but i think only in >16bpp
----Living objects rarely stay still for very long (except students).
Sneftel
Sneftel
What you''re talking about is called "steganography". Google for it; you will find a treasure trove of resources.


"Sneftel is correct, if rather vulgar." --Flarelocke
frostburn
frostburn
here''s a simple idea: use the least significant bit of every pixel/color (R7C1G7C1B7C1) to encode it. Each byte takes 2.66 pixels (or 3 bytes in 8 pixels). The slight variation in color will be impossible to notice. This assumes 24 bit.. If you can use alpha/ 32bit you have much more "space".
Sneftel
Sneftel
quote:
Original post by Anonymous Poster
Sounds like a homework problem to me. You want people to do your homework for you?

He wasn''t asking for code, only suggestions for high-level techniques. No problem there.


"Sneftel is correct, if rather vulgar." --Flarelocke
plessing
plessing
Sneftel : thanks, I did found a whole bunch of resources now just have to read through them all.

AP : yip, it is a homework assignment and it''d b great if some1 could do it 4 me! Altough, this seems like a fun one to figure out by myself (with the help of google, ofcourse). I have a bunch of other homework assignments that I DONT want to do though...

olrite, thanks guys,
p.
mightyjebus
mightyjebus
there is a Geek Challenge on Stegonography at http://www.osix.net/ great fun if you have some spare time and think you are a geek

[edited by - mightyjebus on May 3, 2004 9:08:01 AM]
ngill
ngill
hmm, does lossy compression (jpeg) basically make stuff like this useless?
frostburn
frostburn
I think it''s theoreically possible to make stenography with jpegs as well, at least if you write the jpeg saving and loading code yourself, but if anyone modifies the image you''ll have a problem (also true with all other formats). I think the bits per pixel ratio will be lower as well (you can''t store as much extra information as with say bmp)
technobot
technobot
I don''t know how jpeg compression works exactly, but with lossy compression that is using some sort of dictionary (e.g. vector quantization based techniques, assuming I got the name right), you can modify the dictionary instead of the pixels, similar to frostburn''s suggestion.

Michael K.,
Co-designer and Graphics Programmer of "The Keepers"



We come in peace... surrender or die!
Michael K.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.