5

I am trying to implement a steganographic algorithm where hidden message could survive jpeg compression.

The typical scenario is the following:

  1. Hide data in image
  2. Compress image using jpeg
  3. The hidden data is not destroyed by jpeg compressiona nd could be restored

I was trying to use different described algorithms but with no success. For example I was trying to use simple repetition code but the jpeg compression destroyed hidden data. Also I was trying to implementt algorithms described by the following articles: http://nas.takming.edu.tw/chkao/lncs2001.pdf http://www.securiteinfo.com/ebooks/palm/irvine-stega-jpg.pdf

Do you know about any algorithm that actually can survive jpeg compression?

user1563721
  • 1,373
  • 3
  • 28
  • 46
  • How big is your message and would it be rendered useless if a part of it was altered? JPEG steganography generally deals with lossy storage/retrieval of a message. What compression ratio did you use? – Reti43 Jan 01 '14 at 01:14
  • 1
    Now I don't care about capacity. Firstly I would like to see an example or algorithm that could survive JPEG compression or recompression to understand it. Is is possible to use steganography that survive any compression ratio? Do you know about something? – user1563721 Jan 01 '14 at 09:56

4 Answers4

3

You can hide the data in the frequency domain, JPEG saves information using DCT (Discrete Cosine Transform) for every 8x8 pixel block, the information that is invariant under compression is the highest frequency values, and they are arranged in a matrix, the lossy compression is done when the lowest coefficients of the matrix are rounded to 0 after the quantization of the block, these zeroes are arranged in the low-right part of the matrix and that is why the compression works and the information is lost.

user1158945
  • 131
  • 2
  • 2
    You can hide data in DCT coefficients but my experience is that if you use recompression of JPEG image you will loose your hidden information. Could you please describe in more detail what you mean and what would you change in order to avoid information lose after recompression of JPEG image which already contains some hidden message? – user1563721 Mar 18 '15 at 16:55
2

Quite a few applications seem to implement Steganography on JPEG, so it's feasible:

http://www.jjtc.com/Steganography/toolmatrix.htm

Here's an article regarding a relevant algorithm (PM1) to get you started:

http://link.springer.com/article/10.1007%2Fs00500-008-0327-7#page-1

Eran Boudjnah
  • 1,228
  • 20
  • 22
  • 1
    I know that it is possible to use DCT coefficient in JPEG image before quantization to embed data but there is the same problem. The hidden data should survive if someone recompress the JPEG image. Do you know about implementation that could survive recompression? – user1563721 Jan 01 '14 at 09:53
  • Well, see if this study helps: http://www.researchgate.net/publication/224714533_Effect_of_Recompression_on_Attacking_JPEG_Steganographic_Schemes_An_Experimental_Study/file/79e41508e1a1383dd6.pdf – Eran Boudjnah Jan 01 '14 at 10:46
  • 3
    I was studying provided materials and I think that we misunderstood each other. Articles are writing about how to survive steganalysis in compressed JPEG images. My problem is how to survive the compression itself. Take the following example: 1. Choose an image. -> 2. Compress it with JPEG. -> 3. Embed secret data with PM1 algorithm (or MB1, MB2, PM1 with GA or anything similar) to selected JPEG image which results in stegoJPEG image. -> 4. Apply JPEG compression on stegoJPEG again (for example with the same quality). -> 5. Your embedded secret data is destroyed by the recompression. – user1563721 Jan 03 '14 at 11:14
  • 1
    Is there any algorithm that could survive 4th step in the example above? That your secret data could be revealed after recompression of stegJPEG image which contains it. – user1563721 Jan 03 '14 at 11:16
  • 2
    @user1563721 did you find answer for that? – Jonas Oct 17 '20 at 13:01
0

Perhaps the answer is late,but ... You can do it in compressed domain steganography.Read image as binary file and analysis this file with libs like JPEG Parser. Based on your selected algorithm, find location of venues and compute new value of this venue and replace result bits in file data. Finally write file in same input extension. I hope I helped.

0

What you're looking for is called watermarking.

A little warning: Watermarking algorithms use insane amounts of redundancy to ensure high robustness of the information being embedded. That means the amount of data you'll be able to hide in an image will be orders of magnitude lower compared to standard steganographic algorithms.

  • Could you please recommend specific algorithm? – user1563721 Aug 02 '18 at 09:33
  • Sorry, I have no personal experience using them, I just know what they're called. I decided to post that because the hardest part in finding something is getting the right search term. Put “jpeg watrmarking” into Google and see where it takes you. Good luck! – user2347953 Aug 03 '18 at 14:11