AI_MD5WithDES_CBCPad

AI_MD5WithDES_CBCPad

Purpose:

This AI allows you to perform password-based encryption. This means that the input data will be encrypted with a secret key derived from a password, and it can be successfully decrypted only when the correct password is provided. Although this AI can be used to encrypt arbitrary data, its intended primary use is for encrypting private keys when transferring them from one computer system to another, as described in PKCS #8.

This AI employs DES secret-key encryption in cipher-block chaining (CBC) mode with padding, where the secret key is derived from a password using the MD5 message digest algorithm. The details of this algorithm are contained in PKCS #5. DES is defined in FIPS PUB 81, and CBC mode of DES is defined in FIPS PUB 46-1. RFC 1321 describes MD5.

Other algorithms that can be used for password-based encryption are

AI_MD2WithDES_CBCPad, AI_MD2WithRC2_CBCPad, AI_MD5WithRC2_CBCPad, and AI_SHA1WithDES_CBCPad.

Type of information this allows you to use:

the salt and iteration count for the MD5 With DES-CBC password-based encryption algorithm as defined in PKCS #5. The salt is concatenated with the password before being digested by MD5, and the iteration count specifies how many times the digest needs to be run. The count of 2 indicates that the result of digesting password-and- salt string needs to be run once more through MD5. The first 8 bytes of the final digest become the secret key for the DES cipher after being adjusted for parity as required by FIPS PUB 81, and the last 8 bytes become the initialization vector.

Format of info supplied to B_SetAlgorithmInfo:

pointer to a B_PBE_PARAMS structure:

typedef struct

{

 

unsigned char *salt;

/* pointer to 8-byte salt value */

unsigned int

iterationCount;

/* iteration count */

}B_PBE_PARAMS;

RSA Security Inc. recommends a minimum iteration count of 1,000. However, for an

C h a p t e r 2 A l g o r i t h m I n f o Ty p e s

123

Page 133
Image 133
RSA Security manual AIMD5WithDESCBCPad, Pointer to a Bpbeparams structure