----------------------------------------------------------------------

PIILO is a steganography program that hides files in grayscale PGM 
images. A secret key is used both for encrypting the file and for 
selecting the pixels whose least significant bits are used to hide 
the data. 

Author: Tuomas Aura <Tuomas.Aura@hut.fi> 

The algorithm is described in 'ftp://saturn.hut.fi/pub/aaura/ste1195.ps'.

You may use this program or parts of it for any purpose, but it is 
probably not a good idea. The code looks quite awful and may be byggy.

Half of the code is copied from the freeware program pgmstealth.c by 
Timo Rinne, 'ftp://ftp.funet.fi/pub/crypt/steganography/PGM.stealth.c.gz'.
The copyright message in the original source file was:
    Copyright 1994, Timo Rinne <tri@cirion.fi> and Cirion oy.

----------------------------------------------------------------------

INSTALLATION

You need the Crypto++ library, available for example from
'ftp://ftp.funet.fi/pub/crypt/cryptography/libs/crypto10.zip'.

piilo.c is written in C, but the library is in C++, so you need
a C++ compiler. Compile piilo.c and link it with cryptlib.o, misc.o,
shs.o and piilo.o of the Crypto++ library. There is a minimalistic 
Makefile.

----------------------------------------------------------------------

USAGE:
    piilo -c [-n] [-w] [-v] [-k key] [-f msgfile] pgmfile1 pgmfile2
    piilo -d [-v] [-k key] pgmfile

OPTIONS:
       -c          Encrypt and hide a file into the PGM image.  

       -d          Extract and decrypt a file hidden in PGM image.

       -s          Scale grayscales to fill whole scale
                   from 0 to 255. (Only with -c).

       -w          Paint white the pixels that would contain the 
                   data. No data is actually hidden.

       -v          Set verbose mode.

       -k key      Use the key 'key' for IDEA encryption and 
                   selecting pseudo random pixel to hide the data.
                   The key may be up to 16 characters long.

       -f msgfile  Read the data from file 'msgfile' instead of 
                   standard input. The same file name will be used 
                   when extracting the data.

----------------------------------------------------------------------

EXAMPLES:

   Encrypt and hide the file msg.txt:

   $ piilo -c -k 'very secret key!' -f msg.txt pic1.pgm pic2.pgm

   Extract the hidden data into file msg.txt:

   $ piilo -d -k 'very secret key!' pic2.pgm

   Encrypt and hide console input and send the new PGM file to the 
   standard output: 

   $ piilo -c -k 2jhw777x65ffffDQwert pic1.pgm

   In case you have pbmplus (netpbm) package installed you
   can hide information into the gif like this:

   $ giftoppm < pic1.gif | ppmtopgm > temp.pgm
   $ piilo -c -k qwerty -f msg.txt temp.pgm | ppmtogif > pic2.gif

   Extraction goes like this:

   $ giftoppm < pic1.gif | ppmtopgm > temp.pgm
   $ piilo -d -k qwerty temp.pgm

   
----------------------------------------------------------------------
