Index of  //675502.arinterhk.tech/sys$common/syshlp/examples/CDSA/DES3/*.*

****    DES3_README.TXT    ****

This directory contains a simple DES encryption/decryption 
program that uses CDSA, and participates in bilateral 
authentication.  It links implictly against
CDSA$INCSSM300_SHR.EXE using the Application Adaption Layer.

This example is designed to be signed using the CDSA signing tools.

********************
**  Special Note  **
********************

Sys$common:[syshlp.examples.cdsa]readme.txt contains general
information that applies to all of the example programs that are signed.

The necessary files to build the example on OpenVMS are included, 
with the exception of appselfkey.h.  This include file must be 
generated from the certificate created for the application(s).

See the OpenVMS book "Open Source Security for OpenVMS, Volume 1: Common Data
Security Architecture", CDSA Programing Concepts, for complete instructions.
Special attention should be paid to the section on Signed Application Development.

A signed CDSA application will not execute until the proper credentials are
 generated.

**********

The DES3 example files are:

AALPROXY.C            AALDEFS.H               DES3_BUILD.COM
AALPROXYAPI.C         AALPROXY.H              DES3.OPT
AALPROXYINTERNAL.C    AALPROXYDEFS.H          DES3_INS.OPT
CALLOUTS.C            AALPROXYINTERNAL.H      DES3_SIGN.COM
DES3.C                AALPROXYTAB.H           DES3_INSTALL.COM
DO_DES3.C             CALLOUTS.H
                      PRECOMP.H
                      DESGUID.H
                      (APPSELFKEY.H not provided, user generated)

After performing the steps to generate the application credentials
and the include file appselfkey.h, the DES3 example program can be 
built by copying the example files into a local build area, 
and executing the BUILD_DES command file, as follows:

        $ define/trans=conceal cdsa_tempdir :[.]
        $ set default cdsa_tempdir:[des3]
        $ copy SYS$SYSROOT:[SYSHLP.EXAMPLES.CDSA.DES3]*.* []
        $ copy cdsa_sysdir:[sign]appselfkey.h []
	$ @DES3_BUILD



The resulting image must be 'signed'.
       **************
On the SIGNING SYSTEM run the command procedure to generate the manifest.
       **************

       $ @DES3_sign

Finally back on the development system run the command procedure
to install the module.

       $ @DES3_INSTALL

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

	$ DES3 :== $DES3.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:

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

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

	$ des3 -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:

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

NameRevisedSizeDescription

[TXT]AALDEFS.H 8-Aug-2002 10:0710,588C header
[TXT]AALPROXY.C 8-Aug-2002 10:07814C source
[TXT]AALPROXY.H 8-Aug-2002 10:07650C header
[TXT]AALPROXYAPI.C16-Sep-2002 10:4788,611C source
[TXT]AALPROXYDEFS.H 8-Aug-2002 10:078,197C header
[TXT]AALPROXYINTERNAL.C 8-Aug-2002 10:07399C source
[TXT]AALPROXYINTERNAL.H 8-Aug-2002 10:07527C header
[TXT]AALPROXYTAB.H16-Sep-2002 10:489,660C header
[TXT]CALLOUTS.C15-Nov-2002 15:292,719C source
[TXT]CALLOUTS.H 8-Aug-2002 10:071,667C header
[TXT]DES3.C13-Dec-2002 16:196,295C source
[TXT]DES3.OPT23-Aug-2002 13:34348VMS linker options
[TXT]DES3_BUILD.COM 6-Jan-2003 15:221,590DCL procedure
[TXT]DES3_INS.OPT 8-Aug-2002 10:0792VMS linker options
[TXT]DES3_INSTALL.COM 5-Nov-2002 16:28396DCL procedure
[TXT]DES3_SIGN.COM 6-Jan-2003 14:581,256DCL procedure
[TXT]DESGUID.H15-Nov-2002 15:28204C header
[TXT]DO_DES3.C10-Dec-2002 13:4710,840C source
[TXT]INSTALL_DES3.C15-Nov-2002 16:003,703C source
[TXT]PRECOMP.H 8-Aug-2002 10:071,053C header
[TXT]README.TXT 7-May-2007 13:283,442plain text