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
| Name | Revised | Size | Description |
|
| BUILD_DES.COM | 15-Nov-2001 13:44 | 106 | DCL procedure |
| DES.C | 9-Dec-2002 14:46 | 5,537 | C source |
| DES.OPT | 14-Nov-2001 14:53 | 92 | VMS linker options |
| DO_DES.C | 10-Dec-2002 13:45 | 9,937 | C source |
| README.TXT | 7-May-2007 13:28 | 1,710 | plain text |
|