So by means of this program it's really easy to hide a random data to a large number of audio files and investigate about changes and the "pairing" phenomenon.
also our new program can detect number of samples, bits per sample and other information needed. First It's necessary to find "bits per sample" of our audio file and then hide our data in the LSB bits of every sample,then our program continues to hide data in LSB bits appropriately and at last plots histogram of modified data.
as we have mentioned in our previous post, "setbit" cannot be used for "negative numbers". so we have to change negatives to positives and then hide data. in order to solve this problem we added all negative numbers with 2^bits(bits equals to bits per sample).
with this strategy all negative numbers change to their 2's complements and become positive. after hiding data the program changes all positive numbers greater than 2^(bits-1) back to their negative form.
primarily we tested a few files and it seems that the program is working correctly. the audio file which has a hidden data is not apparently different from the original file.(but I believe that a file named "ringin" has a noticeable change but Parisa doesn't agree with me!)
you can see the program below or download it here.
clear
in=input('type name of the wav file:','s');
o=input('type an output name:','s');
[data fs b]=eval('wavread (in)');
size=size(data);
data=data*2^b;
for i=1:size(1)
if data(i)<0 r="randint(size(1),1);" i="1:size(1)" i="1:size(1)">(2^(b-1)-1)
data(i)=data(i)-2^b;
end
end
data=data*(1/2^b);
eval('wavwrite(data,size(1),o)');
To do list for next session:
- testing lots of audio files and finding out if they make a recognizable difference when they are modified or not.
- find out if there is pairing in histogram of modified audio files
- paying attention to stereo files with 2column matrices
No comments:
Post a Comment