File Reference

File Reference

The C source code files for the demo programs provide a convenient means to learn Crypto-C by example and are a good starting point for your own Crypto-C applications.

The source files for the demo programs are described in Table A-1.

Table A-1Demo Program Source Files

File(s)

Description

bdemo.c

This file contains BDEMO’s main function, menu interpreter, and drivers for

 

each of the menu commands. This file uses the standard C library functions

 

such as printf and fopen, etc.

 

 

bdemodss.c

This file contains BDEMODSA’s main function. It is entirely analogous to

 

bdemo.c.

 

 

bdemoec.c

This file contains BDEMOEC’s main function. It is entirely analogous to

 

bdemo.c. The elliptic curve parameters used for this demonstration, along with

 

two key pairs, are hard-coded in the beginning of this file.

 

 

bslite.c and

bslite.c contains a collection of routines that enable BDEMO to interface to

bslite.h

the Crypto-C cryptographic library. The routines are written in straightforward,

 

easy-to-read portable C code. These routines also illustrate the coding of

 

interfaces to a number of common Crypto-C library functions. A developer may

 

wish use this module as a starting point for developing an application. Refer to

 

blreadme” (in the demosrc directory) for extended descriptions of routines

 

contained in bslite.c.

 

 

bsliteds.c and

bsliteds.c contains routines used by BDEMODSA to interface to the Crypto-

bsliteds.h

C library. These routines illustrate how to code portable interfaces to Crypto-C’s

 

implementation of the Digital Signature Algorithm.

 

 

bslec.c and

bslec.c contains routines used by BDEMOEC to interface to the Crypto-C

bslec.h

library. These routines are analogous to bslite.c and bslite.h. However,

 

not all functions in bslite.c have a counterpart in bslec.c.

 

 

choosc.c and

These files define the DEMO_ALGORITHM_CHOOSER which may be used as a

demochos.h

default for the algorithmChooser argument to Crypto-C routines.

 

DEMO_ALGORITHM_CHOOSER is externally declared in demochos.h for

 

inclusion by applications that need access to the

 

DEMO_ALGORITHM_CHOOSER.

filebsl.c,

filebsl.h, fileio.c and fileio.h

These files call on the BSLite routines in bslite.c and handle the file I/O for each operation. These files use the standard C library functions such as

printf and fopen.

A p p e n d i x A C o m m a n d - L i n e D e m o s

3 3 5

Page 357
Image 357
RSA Security 5.2.2 manual File Reference, Table A-1Demo Program Source Files