JPEG steganography for browser and node.
F5 algo in pure javascript.

View project on GitHub

Online demo


This library implements jpeg codec capable of reading Huffman-coded baseline and progressive jpeg files and writing Huffman-coded baseline files. Decompression is done only up to raw DCT coefficients. They are not dequantized or dezigzagged. This coefficients are then used for embedding hidden messages with f5 algorithm.

I decided to make this library because for my projects I need small (this lib is 15kb minified and 5.5kb if gzipped) and fast code what is easy to maintain (and review). Speed mostly considered for extraction process as often I need to process many images at once.

Previously I was using Eph5 library. But now it looks unmaintained and I'm too lazy to get into that Emscripten things. And also Eph5 is 370kb and this Emscripten magic is not actually that performant. f5stego.js while being small has at least same performance as Eph5 and in some cases is 2x faster.

Another interest was to make tiny extract only version. You can find it in extra folder. Minified version of that extractor is only 4.5kb (2kb if gzipped).

Note: this implimentation is not compatible with original code. It uses different shuffle algorithm and stores meatadata (used coding, data size) in a different way.

For more info and documentation visit project page on GitHub.