I m working on reversible data hiding technique. So, first i encrypt image using RSA algo. then embedding data in encrypted image. But i dont know how to decrypt image and get original image
I'm a little confused by the question. In steganography, you would be hiding a message in an image, let's say, not encrypting the image itself? So what you would typically want to recover is the message, text let's say, while the image itself remains largely unchanged.
There are many different techniques for doing this. I'll just describe one possibility.
Let's take a JPEG digital photo of a scene. After the image is compressed, it is represented as a sequence of 8 X 8 blocks, the DCT coefficient matrix. Many of those coefficients will be zero, especially coefficients towards the right and bottom sides of each block, because that's how JPEG achieves image compression.
So now you say that for each non-zero coefficient in each block, you "steal" the lowest order few bits for your hidden message. The result will be that when the image is reconstructed by a standard decoder, image quality will be only slightly impacted, because you've only messed up the lowest order bits, and the illegitimate receiver won't know that there's a message embedded in that JPEG file.
The legitimate receiver can take the JPEG file and know how to recover the hidden data. The approach was agreed upon at the beginning. So perhaps, for any non-zero coefficient, the receiver will know that x many lower bits of that coefficient are bits holding the hidden data. Obviously, this process of recovering the data bits has to come before any JPEG decoding.
This same general approach can be used with digital audio files. Like in a standard CD format, 16 bits per sample, it should be easy enough to claim the bottom 3 or 4 bits, let's say, for hiding messages. A legitimate receiver will know how many of the lower order bits are being used for hiding the message.
If you want to further protect the message, there's nothing wrong with encrypting the text bits also, of course.
And there are many other techniques available too.
The answer I wrote disappeared. Sometimes, they reappear after a delay, so I'll be brief.
Usually in steganography, you don't encrypt an image. You hide data in the image. So any causal observer will only see the image, or the audio file, and won't even suspect that there's a hidden message in it. That's why the technique is useful. If you do not use steganography, typically a causal observer will know that there is a message he can't decipher. With steganography, it's harder to tell.
There are many different techniques possible. One simple technique is to claim some of the lowest order bits of the image or audio file for the hidden message. A casual observer will be able to decode the image or audio with practically no perceptible problem. The intended recipient, instead, will know that, say, the lowest order 4 bits contain the hidden data.
Standard CDs use 16 bits per sample. Steal the lowest 4 bits of each sample for the hidden data. The audio, with still 12 good bits per sample, should sound quite decent. The same sort of approach can be used with JPEG or other digital image files. The less image compression is used, the better, for this purpose.
And the hidden data can also be encrypted, of course. No reason to think it has to be plaintext.
The idea of steganography is to hide a secret in an ilk that it does not catch someone's eye. If you have forgotten your hideout in the image, then can try a scan it for known patterns of your secret. I guess that even this approach will fail because you certainly have mixed the bits of your secret with those ones of your picture.
You are working on reversible data hiding technique and it is in principle quite different from steganography. You have to design embedding algorithm that will embed data and information about the embedding locations. Information about embedding locations is required to undo the changes done at the time of embedding.
An encrypted stego image is an image that has been embedded (with a steganography algo) with a secret message and subsequently is encrypted by an encryption algo. These two algos offers extra security to the embedded message. To decrypt the encrypted stego image then you would use the same encryption algorithm to get the stego image. And to extract the embedded message you have to use the same steganography algorithm.
@Azizah Abdul Manaf: you are right but generally in case of stego, the secret is first encrypted and then the encrypted secret is hidden inside an image. The very basic requirement of image steganagraphy is the original and the Stego images should look identical to naked eye so as to avoid any suspicion, isn't it? Regarding decryption and secret retrieval,if the algos are symmetric (e.g, in case of the popular Arnold transform, Fibonacci-Lucas transform etc) then the same algo or else a reverse algo to be used. The term reversible seems a bit vague to me as in case of Steganography, the general emphasis is on loss-less (or near loss-less) secret retrieval not on the retrieval of the original cover. Yes, Image encryption- decryption should no doubt be characterized by loss-less (near loss-less) restoration.
In my view, the stego-image need not be decrypted. It should be un-hidden.
You should unhide the message by reversing the stego algorithm and then decrypt the (RSA) message with decryption key & algorithm.
My personal view is when you use a strong encryption system like RSA, you do not need to hide it. RSA is strong enough and has tedious mathematical computations involved. Hiding makes it more complicated.