Index of  //uprrp2.uprrp.edu/sys$common/syshlp/EXAMPLES/CDSA/DES/*ERROR*.

This directory contains a simple DES encryption/decryption program that uses
CDSA, along with the necessary files to build it on OpenVMS.  It consists of
two source files (DES.C and DO_DES.C), and two build files (BUILD_DES.COM and
DES.OPT).

CDSA must be initialized before this program is run.  This needs to be done
on a one-time basis, by executing the following command:

	$ @SYS$STARTUP:CDSA$INITIALIZE

The DES example program can be build by copying the example files into a local
build area, and executing the BUILD_DES command file, as follows:

	$ copy SYS$SYSROOT:[SYSHLP.EXAMPLES.CDSA.DES]*.* 
	$ SET DEF 
	$ @BUILD_DES

The resulting DES.EXE file can be run as a foreign command.  This can be set up
via:

	$ DES :== $DES.EXE

The program can then be executed with the following options:

	-e	: encrypt with supplied key (requires -k switch)
	-d	: decrypt with supplied key (requires -k switch)
	-h	: specifies that the supplied key is a 16 character
                  hexadecimal number
	-k key	: use key "key" (apostrophes {aka, single quotes} are necessary if used with -h)

To encrypt MYFILE.TXT using an ascii key with the DES example program, you
would issue the following command:

	$ des -e -k "xyzzy" MYFILE.TXT MYFILE.DES

To decrypt the same file, you would issue this command:

	$ des -d -k "xyzzy" MYFILE.DES MYFILE.TXT

To encrypt/decrypt using a hexadecimal key, use a key length of exactly 16
typed characters (8 hex bytes), and the -h switch as follows:

	$ des -e -k '012abcde012abcde' -h MYFILE.TXT MYFILE.DES
	$ des -d -k '012abcde012abcde' -h MYFILE.DES MYFILE.TXT

NameRevisedSizeDescription