At the end of the nineties, when looking at the steganographic tools available on the Net, it occurred to me that nothing had been done to hide information in MP3 files, that is sound-tracks compressed using the MPEG Audio Layer III format. There was a growing interest world-wide in MP3 or indeed WMA files because they offered near-CD quality at compression ratio of 11 to 1 (128 kilobits per second). This gave a very good opportunity for information hiding. Although WMA has better quality in general, I did not have access to code and only an implementation for MP3 is provided as a proof of concept.
MP3Stego hides information in MP3 files during the compression process. The data is first compressed, encrypted and then hidden in the MP3 bit stream. Although MP3Stego has been written with steganographic applications in mind it might be used as a copyright marking system for MP3 files (weak but still much better than the MPEG copyright flag defined by the standard). Any opponent can uncompress the bit stream and recompress it; this will delete the hidden information but at the expense of severe quality loss.
The hiding process takes place at the heart of the Layer III encoding process namely in the inner_loop. The inner loop quantizes the input data and increases the quantiser step size until the quantized data can be coded with the available number of bits. Another loop checks that the distortions introduced by the quantization do not exceed the threshold defined by the psycho acoustic model. The part2_3_length variable contains the number of main_data bits used for scalefactors and Huffman code data in the MP3 bit stream. We encode the bits as its parity by changing the end loop condition of the inner loop. Only randomly chosen part2_3_length values are modified; the selection is done using a pseudo random bit generator based on SHA-1.
We have discussed earlier the power of parity for information hiding. MP3Stego is a practical example of it.
Full C code and binaries (last code update November 2018):
This computer program is based on: