Phantom Cipher 1.1
Phantom Cipher is a block cipher software.
The distribution contains an implementation of a file encryption utility (that currently compiles only on POSIX systems due to the platform-specific way it gets the password without echoing.) The phantom library is well rounded: it has a hashing function for producing keys from pass phrases, as well as encryption and decryption functions that operate Phantom in each of the three important modes: ECB, CBC and CFB.
Compilation of the C sources requires an implementation of ANSI/ISO C.
Compilation of filecrypt.c additionally requires a POSIX.1 implementation.
There will be difficulties compiling the sources on outdated UNIX versions
whose bundled compilers don't support ANSI C or which don't have POSIX.1 or ANSI C compliant libraries.
The Makefile assumes that you have the GNU C compiler. Edit the Makefile as appropriate and then type ``make''. An executable called ``phantom'' should result. This is the UNIX utility for enciphering and deciphering files.
To use Phantom in existing ANSI C programs, simply copy phantom.c and phantom.h into the directory where your project resides. Include the phantom.h header file in any translation unit which needs to refer to a Phantom function or data type. Compile and link the phantom.c file along with the other source files of your project.
The filecrypt.c program may serve as a programming example.
The phantom.c also contains a main() function for testing purposes. This is enabled by defining the TEST_MAIN preprocessor symbol prior to compiling phantom.c.
phantom -e [ < infile > [ < outfile > [ < salt_phrase > [ < key_phrase > ] ] ] ]
phantom -d [ < infile > [ < outfile > [ < key_phrase > ] ] ]