CRYPT_RC2_CBC_PARAMETERS structure (wincrypt.h)

The CRYPT_RC2_CBC_PARAMETERS structure contains information used with szOID_RSA_RC2CBC encryption. It is used in calls to CryptEncodeObject, CryptEncodeObjectEx, CryptDecodeObject CryptDecodeObjectEx.

Syntax

typedef struct _CRYPT_RC2_CBC_PARAMETERS {
  DWORD dwVersion;
  BOOL  fIV;
  BYTE  rgbIV[8];
} CRYPT_RC2_CBC_PARAMETERS, *PCRYPT_RC2_CBC_PARAMETERS;

Members

dwVersion

Specifies the key length. Current usable key lengths are 40, 64, and 128 bits.

Note  The numeric value of defined constants for dwVersion are not the same as the key lengths they specified. Currently defined values for dwVersion are shown in the following table.
 
Value Meaning
CRYPT_RC2_40BIT_VERSION
160
40 bits
CRYPT_RC2_56BIT_VERSION
52
56 bits
CRYPT_RC2_64BIT_VERSION
120
64 bits
CRYPT_RC2_128BIT_VERSION
58
128 bits

fIV

Boolean specifying whether an 8-byte initialization vector (IV) is contained in rgbIV[8]. Set to TRUE when IV is present.

rgbIV[8]

Eight byte initialization vector. Can be NULL if fIV is FALSE. The IV is encoded as an OCTET_STRING.

CryptEncodeObject or CryptEncodeObjectEx with the dwCertEncodingType parameter set to X500_OCTET_STRING to create the encoded OCTET_STRING. The ContentEncryptionAlgorithm's Parameters BLOB is updated to point to this encoded OCTET_STRING.

Note  When a message is decrypted, if it has an IV parameter, the message functions calls CryptSetKeyParam with the IV before doing the decryption.
 

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Header wincrypt.h

See also

CMSG_ENVELOPED_ENCODE_INFO

CRYPT_ENCRYPT_MESSAGE_PARA

CryptEncodeObject

CryptSetKeyParam