----------------------------------------------------------------------
Στεγανό 100% (v100.0): a toolbox for near-optimum perfect steganography
                       of finite memoryless sources 

Copyright (C) 2014 Félix Balado and David Haughton

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.  
----------------------------------------------------------------------

$Id: README,v 1.1 2014/10/15 09:57:16 felix Exp felix $

- Note on Mex files:

The toolbox includes two Mex files (permutation_decoding.c and
permutation_encoding.c). Compiled binaries are provided for the amd64
platform (with extension .mexa64). They have been tested in Linux with
Matlab 2007 and 2014.

If you are on another platform, then you have to compile the Mex files
using a local C compiler by running "make". If you just cannot compile
the Mex files (or use the binaries provided) then you can always
replace the calls "permutation_encoding" and "permutation_decoding" by
"permutation_encoding_m" and "permutation_decoding_m" everywhere in
the toolbox where they are commented out. This will replace the
compiled binaries by Matlab code, which should also work but which
makes things much slower.

- Note on permutation coding:

Στεγανό 100% is based on an implementation of Slepian's Variant I
permutation codes through arithmetic coding.  If you are just
interested in permutation coding (ranking and unranking permutations
from multisets), but not in steganography, then just have a look at
test_permutation_coding.m to see how things work and the few files
that you need.

- Testing the toolbox:

To test Στεγανό 100%, run test_stegano100_lsb.m or test_stegano100.m:

1) The first test emulates least-significant-bit (LSB) steganography
(including LSB matching/±1 steganography) by having approximately the
same embedding rate and embedding distortion but providing
instead perfect histogram preservation.

2) The second test allows embedder and decoder to agree on a minimum
PSNR, from which a near-optimum embedding rate is computed under the
constraint of perfect histogram preservation.

Host files must be grayscale images (png, tif,...), placed in the
images/ directory. Output files appear in the output/ directory.

Note that these methods provide near maximum rate perfect
steganography for *finite memoryless hosts*. Digital images are not
memoryless, so στεγανό 100% is not 100% watertight with these hosts!
However enforcing the preservation of first-order statistics implies
that there are less degrees of freedom for modification of higher
order marginal distributions. For instance, due to this fact the LSB
emulation of στεγανό 100% modifies higher order statistics less than
LSB matching, and so it should be less detectable anyway. One way to
see this is to compute the pixel adjacency histograms of both methods
and then obtain the Kullback-Leibler distances of these empirical
distributions with respect to the same distribution in the original
image.

The toolbox also implements a basic keying scheme, which suffices for
memoryless signals. Keying can also be applied to the partitioning
stage, but this is not implemented at the moment.

In any case, this software is just a proof of concept to showcase the
steganographic equivalent of optimum lossless compression of
memoryless sources in source coding. The hope is that, like in
compression, well-founded steganographic algorithms can be found for
real-world signals by exploiting the canonical solution for memoryless
signals, rather than by using heuristic approaches.

Félix Balado
felix@ucd.ie

References:

- Balado, F., Haughton, D., "Optimum Perfect Universal Steganography of Finite Memoryless Sources", October 2014 arXiv:1410.2659

- Balado, F., Haughton, D., "Optimum Perfect Steganography of Memoryless Sources as a Rate-Distortion Problem", IEEE International Workshop on Information Forensics and Security (WIFS) Guangzhou, China, November 2013

- Balado, F., Haughton, D., "Permutation Codes and Steganography", 38th IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP) Vancouver, Canada, May 2013

