Export (0) Print
Expand All
Expand Minimize

CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO structure

The CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO structure contains encoded key transport information for a message recipient.

Syntax


typedef struct _CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO {
  DWORD                      cbSize;
  CRYPT_ALGORITHM_IDENTIFIER KeyEncryptionAlgorithm;
  void                       *pvKeyEncryptionAuxInfo;
  HCRYPTPROV_LEGACY          hCryptProv;
  CRYPT_BIT_BLOB             RecipientPublicKey;
  CERT_ID                    RecipientId;
} CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO, *PCMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO;

Members

cbSize

A DWORD value that indicates the size, in bytes, of the structure.

KeyEncryptionAlgorithm

A CRYPT_ALGORITHM_IDENTIFIER value that identifies the key-encryption algorithm and any associated parameters used to encrypt the content encryption key.

For RSA AES, the pszObjId member of the CRYPT_ALGORITHM_IDENTIFIER structure should be set to szOID_RSAES_OAEP. The Parameters member of the CRYPT_ALGORITHM_IDENTIFIER structure should be set to the encoded PKCS_RSAES_OAEP_PARAMETERS. If the Parameters.cbData member is equal to zero, then the default parameters are used and encoded.

pvKeyEncryptionAuxInfo

A void pointer to a structure that contains additional information about the encryption. The format of the structure is dependent upon the algorithm indicated by KeyEncryptionAlgorithm.

hCryptProv

This member is not used and should be set to NULL.

Windows Server 2003 and Windows XP:   A HCRYPTPROV value used to do the recipient key encryption and export. The provider's private keys are not used. If hCryptProv is NULL, the HCRYPTPROV specified in the CMSG_ENVELOPED_ENCODE_INFO is used.

Note that this HCRYPTPROV is not released even if CMSG_CRYPT_RELEASE_CONTEXT_FLAG is set in the dwFlags parameter passed to CryptMsgOpenToEncode.

RecipientPublicKey

A CRYPT_BIT_BLOB variable that contains the public key of the recipient.

RecipientId

A CERT_ID value that identifies the recipient. CMS supports the KEY_IDENTIFIER and ISSUER_SERIAL_NUMBER CERT_IDs. PKCS #7 version 1.5 supports only the ISSUER_SERIAL_NUMBER CERT_IDs.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Wincrypt.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft