Unformatted Attachment Preview
Steganography: Project Specification
Project must demonstrate the ability to hide and restore information within an image
based on a paraphrase. Here are the requirements:
1. The implementation will be in a self-contained python notebook that functions fully as
2. You may use the PIL python library for image manipulation, as explained in the example
python notebook for steganography that is provided as attachment.
3. The paraphrase will be a string such as “Cryptography is awesome!”. Any such
paraphrase should be allowed.
4. The paraphrase will be used to deterministically compute a seed for python’s random
number generator (see https://docs.python.org/2.7/library/random.html for how to do
this in Python 2). You are free to use the seed computation mechanism suggested in
class. You may also choose your own approach for computing the seed value.
5. The seeded random number generator will be used to generate random integer values.
Each such value will specify a pixel within the image. You can compute the pixel’s
location as follows:
• Suppose your image is 1000 X 800. There are 1000 pixels in each row (numbered
0 to 999) and 800 rows (numbered 0 to 799).
• Suppose your random number generator generates the random value 2918. To
compute the location of the pixel that corresponds to this value, do the following:
Divide it by 1000 (=number of pixels in a row, and, using integer division) to get 2
which is the pixel’s row number. Mod it by 1000 to get 918, which is the pixel’s
• Remember to make sure that your stay within the bounds of the image. You may
do this in a manner of your choosing.
• Remember to make sure that you don’t use the same pixel twice.
6. Once the pixel has been identified, you will store information within the least significant
bit value in that pixel. You will store exactly one bit in each pixel. You may store this bit
in any one the R, G or B values within the pixel in a manner of your choosing. For
example, you can alternate between these values, i.e., use R for one pixel, use G for the
next one, the B for the following one etc.
7. You will need to store the number of bits of information that is being hidden. You may
assume that the size of the hidden information is not more than 8KB. Note that 8KB =
8*1024 bytes = 8192 bytes = 65536 bits = 216. Thus, the hidden information size can be
stored in 16 bits. For example, if the hidden information size is 4973 bytes, we convert
4973 into its 16-bit binary representation (=0001001101101101) and first hide those bits
within the image. Your project must demonstrate the ability to hide and restore any
information of size 8KB or less.
8. There should be correctness, modularity and appropriate documentation.