KI_RC2WithBSAFE1Params

KI_RC2WithBSAFE1Params

Purpose:

Deprecated. This type is included only for backward compatibility.

Type of information this allows you to use:

an RC2 key (which is the same as an SX1 key) where the key value and effective key size are specified. Usually, the effective key size is a parameter to the RC2 encryption algorithm; however, BSAFE 1.x also encodes the effective key size with the RC2 key.

Format of info supplied to B_SetKeyInfo:

pointer to a B_RC2_BSAFE1_PARAMS_KEY structure:

typedef struct

{

 

unsigned char *key;

/* pointer to 8-byte key */

unsigned int

effectiveKeyBits;

/* effective key size parameter */

}B_RC2_BSAFE1_PARAMS_KEY;

effectiveKeyBits must be between 2 and 64, inclusive. The value of key is adjusted when it is copied to the key object by zeroizing unneeded bytes because effectiveKeyBits is smaller than 64. For example, if effectiveKeyBits is 32 and the hexadecimal value of key is 0102030405060708, then 0102030400000000 is copied to the key object because only 32 bits (4 bytes) are needed.

Format of info returned by B_GetKeyInfo:

pointer to a B_RC2_BSAFE1_PARAMS_KEY structure (see above). The value of key is adjusted by zeroizing unneeded bytes based on the effectiveKeyBits as explained above.

Can get this info type if key object already has:

KI_RC2WithBSAFE1Params or KI_RC2_BSAFE1.

2 8 0

R S A B S A F E C r y p t o - C L i b r a r y R e f e r e n c e M a n u a l

Page 290
Image 290
RSA Security 5 manual KIRC2WithBSAFE1Params