arrow_back Back to Projects
music_note
Aug 2023

Audio Steganography

An implementation of audio steganography that hides secret messages inside audio files using a random number generator for bit placement.

PythonCryptographyDSPSteganographyRNG

Overview

Steganography is the practice of hiding information within an ordinary, non-secret file so that the existence of the hidden message is concealed. This project implemented audio steganography — embedding text messages inside WAV audio files in a way that is imperceptible to human listeners.

Approach

Rather than using the standard LSB (Least Significant Bit) sequential method — which is detectable by steganalysis tools that look for patterns in bit distributions — this implementation uses a seeded pseudo-random number generator (PRNG) to scatter the payload bits across the audio samples in a randomised order.

The same seed is required for extraction, acting as a shared secret between sender and receiver.

Extraction

The extraction process mirrors embedding: initialise the PRNG with the same seed, regenerate the identical random index sequence, read the LSB from each indexed sample, and reconstruct the byte stream.

Results

Embedding a 256-byte payload into a 44.1 kHz, 16-bit mono WAV file resulted in a Signal-to-Noise Ratio (SNR) degradation of less than 0.003 dB — well below the threshold of human auditory perception (~1 dB). Spectral analysis in Audacity showed no visible artefacts compared to the original.

Learnings

The project highlighted how subtle changes to raw audio data — flipping only the least significant bit of each sample — are mathematically tiny (a change of 1 in 65536 for 16-bit audio) and yet sufficient to carry meaningful information. The RNG-based scatter approach significantly reduces the statistical signature of the payload compared to sequential LSB methods.

schedule
GitHub Coming SoonSource code will be available soon