90 likes | 239 Views
Introduction to Steganography. “Writing between the lines”. Steganography. Literally “hidden writing” Useful for Secret messages Watermarking. Requirements. Message Wrapper Image file Sound file Other files with unused bits Encoding/Decoding scheme. Message. A bit string
E N D
Introduction to Steganography “Writing between the lines”
Steganography • Literally “hidden writing” • Useful for • Secret messages • Watermarking
Requirements • Message • Wrapper • Image file • Sound file • Other files with unused bits • Encoding/Decoding scheme
Message • A bit string • E.g., 0001 1010 1101 0111
Encoding in an Image • Assume a large number of color combinations • Agree upon a repeatable random sequence of pixel locations • While (more bits to encode) • Select the next pixel location • Get the next bit from the message • Set the low-order bit of a color component of the sample at the location to the current bit value of the message
Example • Message = 0001 1010 1101 0111 • Image bit stream = …. 01101110 …. • New bit stream = …. 01101111 …. • Color intensity change = 1/255 of its range! Bit affected Bit to be inserted
Decoding from an Image • While (there are more bits in the message) • Generate the next pixel location to examine • Extract the bit from the low-order position of the color component • Append the bit to the message bit stream, subdividing when appropriate boundaries occur • Boundaries may not be byte-sized • Messages can be images, sounds, text, programs, or data!
Example • Message = 0001 1010 1101 0111 • New image bit stream = …. 01101111 …. To be inserted here Bit to use in message found in image by repeating the random sequence
Notes • The wrapper must be larger than the message • There are various encoding schemes to abbreviate the message • The message can (and probably will) be destroyed if a “lossy” compression technique (such as JPEG) is used • To implement in Java the basic bit operations (e.g., &, |, ^,>>,<<) may be useful as well as the Random class (for producing repeatable sequences)