How to do Steganography in Audio using matlab?

5 views (last 30 days)
I have an audio message and a secret audio message that I want to hide inside the audio message (using Fourier Transform) ,the listener should not discover the difference between the old and the new one .then i want to retrieve the secret message from the new audio message and play it, hearing the same information found in the original message

Answers (1)

Walter Roberson
Walter Roberson on 29 Apr 2020
Steganography does not care what the source is of the digital data that is to be embedded into the destination.
So what you do is first read the second message into an array. Doing this reduces the problem of doing steganography of known data into an audio stream without caring about where the data came from.
  2 Comments
osama ayyad
osama ayyad on 8 May 2020
Edited: Walter Roberson on 9 May 2020
Thanx, i'am doing Fourier Transform for this audio's like that
[y1,f1] = audioread('music.wav');
[y2,f2] = audioread('msg.wav');
a = fft(y1);
b = fft(y2);
f = length(a(400000:500000));
g = length(b);
print (g);
a (400000:450031)= b;
b = length(a(400000:600000));
so, my idea is to replace high frequency in audio a with audio b
the region of high frequency in audio a is from 400000 to 600000 and Total Samples in a = 931001
Total Samples in b = 50031
can you help me?
Walter Roberson
Walter Roberson on 9 May 2020
400000, 450031, 500000, 600000 are all examples of "magic numbers". They just appear in the code with no explanation for why they are those particular values, and the code is likely to break badly if the content of the input file are changed.
Total Samples in b = 50031
okay, but
a (400000:450031)= b;
That attempts to set 50032 locations in A to the 50031 entries in b. Suppose for example b is length 7, then a(20:27) would refer to a(20), a(21), a(22), a(23), a(24), a(25), a(26), a(27) which is 8 locations not 7.
If you want to copy b into part of a then you need
a(Starting_Location : Starting_Location + length(b) - 1) = b
If the idea of your code is that you replace the middle of the fft, then because fft of real values of odd length gives complex conjugate reversed values, like x(4), x(5), x(6), conj(x(6)), conj(x(5)), conj(x(4)), but of even length gives complex conjugate reversed values like x(4), x(5), x(6), conj(x(5)), conj(x(4)) then you need to ensure that your a and b are both odd lengths or else both even lengths.
To replace the center of the fft, you should be calculating where the center is rather than using hard-coded positions.

Sign in to comment.

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!