2
$\begingroup$

Given an image size of 300 by 400, what is the maximum number of ASCII characters (7 bits) that can be embedded using the LSB steganography?

I would assume that every pixel can perform an LSB so would that mean 300x400 bits change? I should then divide this by 7?

I'm confused about how this works. Could you elaborate?

$\endgroup$
6
  • $\begingroup$ Each pixel could also contain 3-4 bits (one per colour / alpha channel) $\endgroup$ – SEJPM Oct 6 '19 at 10:58
  • $\begingroup$ I thought one pixel is on binary of 1's and 0's to create a colour. So would that mean 8 bits per pixel? $\endgroup$ – user73481 Oct 6 '19 at 11:12
  • $\begingroup$ Is there a specific number of bits that are considered LSB? I mean, you could designate 7 bits per 8 bit color to be LSB but that doesn't seem right :) I could also see that differences of some colors are more distinct than others. Anyway, a good answer should probably address this particular issue. The calculation afterwards is just high school math I guess. $\endgroup$ – Maarten Bodewes Oct 6 '19 at 11:14
  • $\begingroup$ @user73481 It depends on the image format and the color space being used. For just common RGB with over 16 million of colors there are 8 + 8 + 8 pixels used for each pixel (for R, G and B), but that's excluding a possible (8 bit) Alpha channel that manages how opaque / transparent the pixel is. Of course, if you used all or almost all of that space then the image would look like (colorful) random noise, hence my initial joke. $\endgroup$ – Maarten Bodewes Oct 6 '19 at 11:17
  • 1
    $\begingroup$ It's actually a bit more complex than just the image size. It really depends on the image and it's quality - see answer to Steganography - How many bytes of information can you hide in a 1024×768 photo?. $\endgroup$ – Paul Uszak Oct 6 '19 at 12:22

Browse other questions tagged or ask your own question.