문제

enter image description here

So, as you can see in the top left there is discoloration. This defeats the purpose of steganography.
I am pretty sure this has to do with the way I hide text in the image. Here is how I do it, using Processing:

void hide(PImage payload,PImage carrier){
  if(payload.width > carrier.width){
   print("Carrier can not be smaller than payload");
   return; 
  }

  for(int x = 0; x < payload.width; x++){
   int payloadPixel = payload.pixels[x];
   int carrierPixel = carrier.pixels[x];

   carrierPixel = carrierPixel & 0xFFFFFF00;
   payloadPixel = payloadPixel & 0x000000FF;
   carrierPixel = carrierPixel | payloadPixel;

   carrier.pixels[x] = carrierPixel;  
  }
  carrier.updatePixels();
  carrier.save("newTulips.JPG");
}  

What can I do to make it hide better?

도움이 되었습니까?

해결책

When doing steganography please do not use a lossy compression (as your JPEG). Use a lossless or uncompressed image (like PNG).

Also please note that using steganography means that you have to use only the lowest bits not complete bytes to hide your information. If you use a complete color channel for your information you will get such artifacts in you image.

다른 팁

In my opinion, this is what you should do:

  • Use images from a digital camera, unedited. Digital cameras always have some background noise that can hide your artificial noise. Your original image has very little noise, making changes easy to detect.
  • Only use the last bit of each color. This way, your data becomes more like noise. Of course, this means that you need more image per data if you have lots of data.
  • Encrypt the data before hiding it. This way, you can prevent patterns in the plaintext from becoming visible in the image.

And of course:

  • Never keep both the image containing the secret data and the original image or people can detect your hidden data by comparing the two.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top