2

I have a photo with a resolution of $1024 \times 768$ which means $786432$ pixels in total. Let's suppose it's a 24-bit color RGB image (so 1 pixel = 3 bytes = 24 bits) and I want to hide information by only modifying the last bit of a color value. What is the maximum number of bytes that I can hide in this photo?

bashbin
  • 159
  • 1
  • 5
  • 2
    Uhm, maybe $1024\cdot 768\cdot 3\cdot 1=2359296$ bit? – SEJPM Jun 03 '17 at 18:18
  • @SEJPM Well, actually a lot more if the data is compressed. You'd probably get ~5Mbits if it's text like love letters etc. – Paul Uszak Jun 03 '17 at 20:47
  • @SEJPM sorry mate, it was a mistake on the lectures and I thought this was more complicated thats why I posted the question here. Yes, you're correct! – bashbin Jun 04 '17 at 21:18
  • @PaulUszak Hmm let's say bmp. What will happen to the compressed data if I post the photo on social media? That will get even more compression and the loss of pixels will mean the loss of information, right? – bashbin Jun 04 '17 at 21:21
  • 1
    Worse. Chances are the image will be converted to lossy JPEG. Even if the image pixel size remain unchanged, JPEG compression throws away high frequency components (that's the lossy bit). Your compression format will be totally destroyed and the data will be irretrievable :-( You will of course be able to 100% credibly deny there's a hidden message though :-) – Paul Uszak Jun 04 '17 at 21:33
  • Encrypt 1024x768x3 bytes. 2. Rename the file as "random_noise.png"
  • – peterh May 09 '19 at 00:20
  • I'm reading Applied Cryptography by Bruce Schneier and it says "Replace the least significant bit of each byte of the image with the bits of the message. The graphical image won't change appreciably-most graphics standards specify more gradations of color than the human eye can notice-and the message can be stripped out at the receiving end. You can store a 64-kilobyte message in a 1024 x 1024 grey scale picture this way". However, shouldn't an image with this many pixels have a payload capacity of 128KB, assuming a BW pixel is one byte? – Display name Apr 20 '23 at 02:42