327
Appendix A
Command-Line Demos

Overview of the Demos

In addition to the sample programs included on the CD, there are three Crypto-C
command-line demo applications: BDEMO, BDEMODSA, and BDEMOEC. These are
actual applications that demonstrate some of the aspects of building cryptographic
applications using Crypto-C. They use the Crypto-C library routines and are
provided to all Crypto-C customers in source form.
The BDEMO application is found in bdemo.c with supporting files fileio.c,
filebsl.c, tstdlib.c, a chooser, choosc.c, and include files fileio.h, filebsl.h
and demochos.h. Because BDEMO utilizes BSLite, bslite.c must be linked in and the
bslite.h file must be included. See BSLite on page336 for more information about
BSLite.
The command-line demos provide the following functionality:
BDEMO can create and verify an RSA digital signature for a DES-encrypted file. It
can also seal and open an RSA digital envelope, placing the encrypted output in
another file. The signature and envelope methods used by Crypto-C are
compatible with the Public-Key Cryptography Standards (PKCS).
BDEMODSA demonstrates the use of DSA to digitally sign and verify the
integrity of data files.