RSA Security 5.2.2 manual BSLite Table A-1Demo Program Source Files

Models: 5.2.2

1 376
Download 376 pages 13.91 Kb
Page 358
Image 358

BSLite

Table A-1Demo Program Source Files

File(s)

Description

fbslec.c,

These files are used by BDEMOEC. These files call on the routines in bslec.c

fbslec.h,

and handle the file I/O for each operation. These files use the standard C library

fileio.c and

functions such as printf and fopen. The files fbslec.c and fbslec.h

fileio.h

are analogous to filebsl.c and filebsl.h used by BDEMO.

 

 

tstdlib.c

This file contains memory, I/O, and buffer manipulation routines needed by

 

Crypto-C, such as T_malloc and T_memcmp. This file illustrates how these

 

routines can be implemented on most platforms. However, some of these

 

routines may need alteration for different platforms. For example, Crypto-C

 

requires that T_free perform no function if it is passed NULL_PTR, but some

 

library implementations of free may not satisfy this convention. Therefore, an

 

explicit check for NULL_PTR may be needed in T_free.

 

tstdlib.c uses the constant MEMMOVE_PRESENT. If the platform’s C library

 

provides memmove, MEMMOVE_PRESENT should be defined as 1; otherwise, it

 

should be defined as 0. In tstdlib.c, default values are given for these

 

constants, but they may be overridden by a compiler flag. For example:

 

-DMEMMOVE_PRESENT=0

 

 

BSLite

BSLite is a collection of routines that interface with the Crypto-C library. BSLite demonstrates how to call Crypto-C to execute various cryptographic procedures. The routines are written in straightforward, easy-to-read portable C and is provided to all Crypto-C customers in source form. BSLite includes a number of the most popular functions supported by the Crypto-C library:

Symmetric key generation

Symmetric block and stream encryption

Diffie-Hellman parameter generation

Diffie-Hellman key agreement

Message digest computation

RSA key generation

RSA digital signature creation and verification

RSA digital envelope sealing and opening

Password-based private key protection/encryption

3 3 6

R S A B S A F E C r y p t o - C D e v e l o p e r ’s G u i d e

Page 358
Image 358
RSA Security 5.2.2 manual BSLite Table A-1Demo Program Source Files