RSA Security 5 manual KIDSAPublic, Pointer to an Adsapublickey structure

Models: 5

1 376
Download 376 pages 51.16 Kb
Page 269
Image 269

KI_DSAPublic

KI_DSAPublic

Purpose:

This KI allows you to specify a public key used by the DSA algorithm. The information consists of a private component and the three parameters: p, q, and g, which are explained below. See KI_DSAPublicBER or KI_DSAPublicX957BER for the same key type with BER encoding.

Type of information this allows you to use:

a DSA public key where all the parameters are specified as in X9.30 Part III: the public component (y), the prime (p), the subprime (q), and the base (g).

Format of info supplied to B_SetKeyInfo:

pointer to an A_DSA_PUBLIC_KEY structure:

typedef struct

{

 

ITEM y;

 

/* public component */

A_DSA_PARAMS

params;

/* the DSA parameters, p, q and g */

}A_DSA_PUBLIC_KEY;

where A_DSA_PARAMS is defined as:

typedef struct {

 

 

 

ITEM prime;

/* the prime

p */

ITEM subPrime;

/* the

subprime q */

ITEM base;

/*

the base

g */

} A_DSA_PARAMS;

 

 

 

 

 

 

 

Each ITEM supplies an integer in canonical format, where the ITEM’s data points to an unsigned byte array, most significant byte first, and the ITEM’s len gives its length. All leading zeros are stripped from each integer before it is copied to the key object.

Format of info returned by B_GetKeyInfo:

pointer to an A_DSA_PUBLIC_KEY structure (see above). All leading zeros have been stripped from each integer in the structure.

C h a p t e r 3 K e y I n f o Ty p e s

259

Page 269
Image 269
RSA Security 5 manual KIDSAPublic, Pointer to an Adsapublickey structure