Steganography Intro
Encode the word "revolt" into the picture
- Step 1: encode the word into numbers
- r=18
- e=5
- v=22
- o=15
- l=12
- t=20
- Step 2: write the numbers in binary
- How many bits do you need to display numbers that go from 1-26?
- 1 bit = 2 codes, 2 bits = 4 codes, 3 bits = 8 codes,... 5 bits = 32 codes
- r=18 10010
- e=5 00101
- v=22 10110
- o=15 01111
- l=12 01100
- t=20 10100
- code = 10010 00101 10110 01111 01100 10100 (total number of bits = 30)
- Step 3: get the colors in the picture
- Each pixel has red, green, blue from 0-255
- With 256 possible shades of each of 3 colors there are 256 X 256 X 256 = 16,777,216 shades of color for each pixel.
- ... red ... ....... green ....... .....blue ....
('01001011', '01100000', '10010000') 1
('00100110', '01000111', '01101001') 0
('00110001', '01010001', '01111000')
('10010110', '10100001', '10110111') 0
('10010110', '10001110', '10110000') 1
('10011001', '10010010', '10110110')
('01111110', '01111100', '10101011') 0
('01011100', '01100100', '10100001') 0
('10001000', '10010000', '10111011')
('00101001', '00111100', '01101011') 0
('01011110', '01101001', '10010100') 1
('10010101', '10010110', '10110100')
('10001111', '10001000', '10110000') 0
('10011000', '10011001', '10111100') 1
('01001100', '01010010', '10001010')
('01101110', '01100110', '10010111') 1
('00100111', '00111110', '10000000') 0
('00101010', '01000100', '01110001')
('01011110', '01101101', '10010101') 1
('10010110', '10011000', '10110110') 1
('01101011', '01011100', '10000111')
('00110010', '00101101', '01100110') 0
etc...
- Step 4: change the least significant bits to match the binary code of the word
- ... red ... ....... green ....... .....blue ....
('01001011', '01100000', '10010000') 1
('00100110', '01000110', '01101001') 0
('00110001', '01010001', '01111000')
('10010110', '10100001', '10110110') 0
('10010111', '10001110', '10110000') 1
('10011001', '10010010', '10110110')
('01111110', '01111100', '10101011') 0
('01011100', '01100100', '10100000') 0
('10001000', '10010000', '10111011')
('00101000', '00111100', '01101011') 0
('01011110', '01101001', '10010100') 1
('10010101', '10010110', '10110100')
('10001111', '10001000', '10110000') 0
('10011001', '10011001', '10111100') 1
('01001100', '01010010', '10001010')
('01101110', '01100111', '10010111') 1
('00100111', '00111110', '10000000') 0
('00101010', '01000100', '01110001')
('01011111', '01101101', '10010101') 1
('10010110', '10011001', '10110110') 1
('01101011', '01011100', '10000111')
('00110010', '00101101', '01100110') 0
etc...
- choose a system: change red, then green, then blue of each pixel in that order
- mix it up: do 2 pixels in a row and then skip one
- Step 5: display the modified picture
Which is the original and which is changed?