How to do Steganography in Audio using matlab?

조회 수: 5 (최근 30일)
osama ayyad
osama ayyad 2020년 4월 29일
댓글: Walter Roberson 2020년 5월 9일
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

답변 (1개)

Walter Roberson
Walter Roberson 2020년 4월 29일
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
osama ayyad
osama ayyad 2020년 5월 8일
편집: Walter Roberson 2020년 5월 9일
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 2020년 5월 9일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by