***Valentine 2.2 Encryption Program***

Written by Owen Borseth 
Copyright(C) 1999 Owen Borseth
email:  borsethom@lcc.ctc.edu

compiled and proven stable in:  Red Had Linux 5.1, 5.2, 6.0 (intel/AMD)
					  Windows 95, 98 and NT (intel/AMD)

**************************************************************

Compile Methods (Linux)
----------------------

The easiest way to compile this program in Linux, is to change directories into where the source (val.c) resides. Then with the "make" command, enter "make val". Or you could use gcc and enter "gcc val.c -o val". This will create an executable called val. Put the executable into your path to make it executable within any directory.

Compile Methods (Windows)
------------------------

You can compile this code under Windows with any C++ compiler. If you downloaded this for Windows, the val.exe file is probably included within this distribution. This should execute fine under most circumstances. Put the executable into your path to make it executable within any directory.

**************************************************************

About
----

Copyright(C) 1999 Owen Borseth
borsethom@lcc.ctc.edu

Valentine 2.2 is written by Owen Borseth. It is currently a simple command line encryption program that allows the user to enter the name of the file that she or he would like to encrypt or decrypt. As it is now, it uses a fancy XOR cipher based on a user entered key and an internally compiled key. Valentine 2.2 has been tested, compiled and verified stable on Linux RedHat 5.1/5.2/6.0 Windows NT, and Windows9x but should compile fine with almost any C++ compiler and on any platform.

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 2 of the license, or any later version. You must agree with the GNU General Public License before using this program.

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, write to the Free Software Foundation, INC., 675 Mass Avenue, Cambridge, MA 02139, USA.

**************************************************************

Usage
----

usage      val FILENAME OPTION KEY

FILENAME:  This is a required parameter. Enter the path
           to where the file you would like to encrypt
           resides. Example:  /root/file.dat.
	     The filename cannot contain any spaces.

OPTION:    This is a required parameter. Choose -k to
           kill the original file, and -l to leave it alone.

KEY:       This is an optional parameter If you do not enter it
           at the command prompt, Valentine will ask for it.
           Due to some OS's that keep track of command prompt entries,
           it is more secure to allow Valentine to prompt for the KEY.
           Your key should be between 5 and 128 characters in length.
           This will be used in the encryption of the file and should
           be something that you can remember.
         
Example:   val /root/file.dat -k Thisismykey

More:      Encrypted files will be saved with the extension .val
           When a file with this extension is entered in the FILENAME
	     area, this file will be decrypted and saved with the
	     same name, less the .val extension.

**************************************************************

More
----

This program should encrypt all files without flaw. It is recommended that after encrypting a file, make sure it can be decrypted before destroying the original. Remember that this program does not encrypt the key within the encrypted file.  So DON'T FORGET YOUR KEY!! If a stronger cipher is needed. You could encrypt the file several times, each time using a different key. Just remember that if you encrypt a file 5 times, it will have to be decrypted 5 times, using the same keys that were used to encrypt it.

The compiled key is the same one used in all distributions of Valentine 2.2 and is available to no one. If you use a make of Valentine 2.2 that has had its internal key changed,you will have to use that same executable, or one with the same internal key, to decrypt the encrypted file.
Valentine 2.2 is backward compatible with version 2.0 and higher.












There are certain key lengths that seem to provide stronger encryption. I have not figured out why exactly. The lengths I have found so far are: 5, 9, 12, 14, 16, 17, 18, 20, 22, 23, and 25 characters in length. There are probably more, but I figured that 25 characters should be a long enough key. To test this program, I created a text file that contained all lowercase a's. When I used keys of the lengths stated above, the encrypted file was completely random and without pattern. When I used keys of other lengths, the encrypted file would have a pattern that I was able to pick up on. Of course a file that was composed of more that just a bunch of a's would not produce such a noticeable pattern, it's still better to be safe than sorry.

Changes in version 2.2
**************************
When I upgraded 2.0 to 2.1 I didn't test compile it on Linux.  If you tried to do so you would have come across many errors and warnings.  I fixed these compile errors and warnings.  I also did some minor enhancements to the code.

I included a compiled version of Valentine for Linux.  It was compiled with GCC using Linux RedHat 6.0 on an AMD K62.
**************************

I enjoy feed back, so if anyone figures out any glitches or comes up with some good ideas please let me know. Also, if anyone compiles their own version of Valentine. Please let it be known when Valentine is ran that it is not an original distribution copy, and that it does not contain the original internal key. Also, when making your compiled key, I would recommend that you use one that is the same length as the generic one shown in the source code. Do not enter the compiled key as a string. Enter each character as its decimal equivalent.

For future releases of this program, e-mail borsethom@lcc.ctc.edu

THANK YOU
(this file last updated December 1, 1999)