Retrieving the original LSBs in LSB steganography
11 次查看(过去 30 天)
显示 更早的评论
I am working on a project where I need to divide an image file into smaller parts (no. of parts is user input). Let's say, 2 parts. I am encrypting and sending these to the receiver end. I have hidden the information '2' in the LSB of the two encrypted files so the receiver end knows how many files to expect for decryption.
My question is, is it possible to retrieve the original least significant bits after I extract the hidden data ('2' in this case)? I have been able to send the secret data, extract the data; but can't get the original bits back in totality and hence the decryption is not giving the correct result.
For example: I need to send '2' which is 00000010. Suppose the first 8 pixel values of one of the images being sent are [22 1 255 16 30 179 10 19]. After I change the LSB of these pixels they become [22 0 254 16 30 178 11 18]. I have been able to extract the data with the following code:
number=zeros(1,8);
filename=uigetfile('*.*','Select first encrypted image file');
f1=imread(filename);
for i=1:8
number(1,i)=bitget(f1(1,i),1);
end
str=num2str(number);
str(isspace(str)) = '' ; % remove the spaces in the string
N=bin2dec(str); % no. of files sent
Is there any way to retrieve the original LSBs?
0 个评论
采纳的回答
James Tursa
2017-6-9
If you overwrite the original data with something else, and you have nothing else in the image that can be used to reconstruct that data, then no you cannot recover it. You would have to use a different method of encoding your "hidden" info into the file that didn't destroy the original info.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Encryption / Cryptography 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!