Audio Steganography using Phase Encoding

using Python

Achyuta Katta
3 min readSep 11, 2021

Steganography conceals messages in different file formats without adding much perceivable noise to the contents.

The word steganography comes from Greek steganographia, which combines the words steganós (στεγανός), meaning “covered or concealed”, and -graphia (γραφή) meaning “writing” -Wikipedia

It is often confused with Encryption/Cryptography. In steganography, the “carrier” file is perceivably unchanged to the public whereas in encryption, it undergoes drastic changes and can easily be viewed to be an encrypted file/message. Audio Steganography employs the use of Audio files (WAV files in our case) as carriers to pass on the message.

Types of Audio Steganography

  • LSB Algorithm- Divides the audio file into chunks where the least significant bit of each chunk carries bit info of the message
  • Echo hiding- Embeds data into audio signals by introducing a short echo to the host signal. The nature of the echo is a resonance added to the host audio.
  • Spread Spectrum- Secret message is first encrypted using a cryptographic algorithm, and then embedded in a cover audio using DSSS (direct-sequence spread spectrum) technique.
  • Phase Coding- Fourier transform is applied onto the audio divided into chunks, phase changes according to the secret message are applied onto the first chunk and the audio file is regained using the inverse Fourier transform.

LSB technique introduces perceivable noise into the carrier audio. Phase changes in audio cannot be perceived by the human auditory system hence we opted for the Phase Coding technique in our implementation.

Phase Coding Technique

The input wav file used as carrier is separated into the header and data parts and is recombined to form the encoded wav file after operations are performed on the data portion of the audio.

Src: Prof. Samir Kumar, Bandyopadhyay Barnali, Gupta Banik June-2012, LSB Modification and Phase Encoding Technique of Audio Steganography Revisited, International Journal of Advanced Research in Computer and Communication Engineering Vol. 1, Issue 4
  • The data part is segmented into chunks and Fourier transform is applied on each chunk.
  • Phase shift is applied in the first segment with encoded message converted into bits as follows
Src: Prof. Samir Kumar, Bandyopadhyay Barnali, Gupta Banik June-2012, LSB Modification and Phase Encoding Technique of Audio Steganography Revisited, International Journal of Advanced Research in Computer and Communication Engineering Vol. 1, Issue 4
  • Audio data is regained applying the inverse Fourier transform on the modified array of complex numbers.
  • Encoded audio file is obtained on combining with the header portion

Audio before applying the phase coding technique:

Audio after applying the phase coding technique (message : “YaY Newolf IceBreaker4!”):

Decoded file is run through the Fourier transform and the phase differences are extracted from the first chunk of data to get back the secret message.

This type of coding for steganography is preferred when compared to the LSB algorithm where the carrier signal is corrupted partly due to noise introduced when changing the LSB.

The Conclusion

In the techniques of audio steganography phase coding is a very effective and subtle way of encoding a message into the wav file without much distortions in the audio file since it only involves phase shifting.

--

--