else/Steganographic
unknown 347fe14551 else
update steg readme
2015-10-09 14:57:03 -07:00
..
examples Use bytes instead of bits 2015-10-06 21:45:38 -07:00
README.md else 2015-10-09 14:57:03 -07:00
asciibet.txt else 2015-10-03 16:29:52 -07:00
steg_test.py else 2015-10-09 14:57:03 -07:00
steganographic.py else 2015-10-09 14:57:03 -07:00

README.md

Steganographic

Let's be honest, this was really just an excuse to make big Terminal headers out of hashmarks.

 

Requires pip install pillow

 

Hide files in images!

For each color channel of each pixel in an Image, modify the least significant bit to represent a bit of the Secret file.
This changes the RGB value of the pixel by a usually-imperceptible amount.
The first 32 bits (10.66 pixels) will be used to store the length of the Secret content in big endian.
Then, the Secret's extension is stored. A null byte indicates the end of the extension. This section is of variable length.
A file with no extension requires only that null byte. A file with an extension requires 1 additional byte per character.

Smallest image possible = 16 pixels with 48 bit secret: 32 for header; 8 for null extension; 8 for data.
Each Image pixel holds 3 Secret bits, so the Image must have at least ((secretbytes * (8 / 3)) + 14) pixels.
An Image can hold ((3 * (pixels - 14)) / 8) Secret bytes.

Usage:
> steganographic.py encode imagefilename.png secretfilename.ext
> steganographic.py decode lacedimagename.png

Reference table for files with NO EXTENSION. For each extension character, subtract 1 byte from secret size

     pixels |       example dimensions | Secret file size
        100 |                  10 x 10 |         32 bytes
        400 |                  20 x 20 |        144 bytes
      2,500 |                  50 x 50 |        932 bytes
     10,000 |                100 x 100 |      3,744 bytes
     40,000 |                200 x 200 |     14,994 bytes
     25,000 |                500 x 500 |     93,744 bytes (91 kb)
  1,000,000 |            1,000 x 1,000 |    374,994 bytes (366 kb)
  4,000,000 |            2,000 x 2,000 |  1,499,994 bytes (1.43 mb)
 25,000,000 |            5,000 x 5,000 |  9,374,994 bytes (8.94 mb)
100,000,000 |          10,000 x 10,000 | 37,499,994 bytes (35.7 mb)

     pixels |       example dimensions | Secret file size
        100 |                  10 x 10 |         32 bytes
        697 |            25 x 28 (700) |        256 bytes
      2,745 |          50 x 55 (2,750) |      1,024 bytes (1 kb)
     21,860 |       142 x 154 (21,868) |      8,192 bytes (8 kb)
     87,396 |       230 x 380 (87,400) |     32,768 bytes (32 kb)
    349,540 |      463 x 755 (349,565) |    131,072 bytes (128 kb)
  1,398,116 |  1146 x 1120 (1,398,120) |    524,288 bytes (512 kb)
  2,796,217 |  1621 x 1725 (2,796,225) |  1,048,576 bytes (1 mb)
 11,184,825 | 3500 x 3200 (11,200,000) |  4,194,304 bytes (4 mb)
 44,739,257 | 6700 x 6700 (44,890,000) | 16,777,216 bytes (16 mb)
 89,478,500 | 9500 x 9500 (90,250,000) | 33,554,432 bytes (32 mb)

steganographic