CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO structure (wincrypt.h)
The CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO structure contains information about a message recipient that is using key agreement key management.This structure is used with the CMSG_RECIPIENT_ENCODE_INFO structure.
Syntax
typedef struct _CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO {
DWORD cbSize;
CRYPT_ALGORITHM_IDENTIFIER KeyEncryptionAlgorithm;
void *pvKeyEncryptionAuxInfo;
CRYPT_ALGORITHM_IDENTIFIER KeyWrapAlgorithm;
void *pvKeyWrapAuxInfo;
HCRYPTPROV_LEGACY hCryptProv;
DWORD dwKeySpec;
DWORD dwKeyChoice;
union {
PCRYPT_ALGORITHM_IDENTIFIER pEphemeralAlgorithm;
PCERT_ID pSenderId;
} DUMMYUNIONNAME;
CRYPT_DATA_BLOB UserKeyingMaterial;
DWORD cRecipientEncryptedKeys;
PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO *rgpRecipientEncryptedKeys;
} CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO, *PCMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO;
Members
cbSize
The size, in bytes, of this structure.
KeyEncryptionAlgorithm
A CRYPT_ALGORITHM_IDENTIFIER structure that specifies the algorithm used for encryption.
For ECC recipients, the pszObjId member of the CRYPT_ALGORITHM_IDENTIFIER structure should be set to szOID_DH_SINGLE_PASS_STDDH_SHA1_KDF with the dwKeyChoice member of this CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO structure set to CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE.
pvKeyEncryptionAuxInfo
This member is not currently used. It must be set to NULL.
KeyWrapAlgorithm
A CRYPT_ALGORITHM_IDENTIFIER structure that specifies the algorithm used for key wrapping.
pvKeyWrapAuxInfo
A pointer to a CMSG_RC2_AUX_INFO structure that specifies the key wrapping bit length. This member is only used if the KeyWrapAlgorithm member specifies an RC2 algorithm. If KeyWrapAlgorithm specifies an algorithm other than an RC2 algorithm, this member is not used and must be NULL.
hCryptProv
This member is not used and should be set to NULL.
Windows Server 2003 and Windows XP: A handle to a cryptographic service provider (CSP) obtained by using the CryptAcquireContext function. This member is optional and can be NULL.This member's data type is HCRYPTPROV.
dwKeySpec
This member is not currently used.
dwKeyChoice
Indicates the type of key agreement. This member can be one of the following values.
Value | Meaning |
---|---|
|
Create a temporary public/private key pair to encrypt the content encryption key. |
|
This value is not currently used. |
DUMMYUNIONNAME
DUMMYUNIONNAME.pEphemeralAlgorithm
A pointer to a CRYPT_ALGORITHM_IDENTIFIER structure that contains the ephemeral public key algorithm and parameters. This member is used when the dwKeyChoice member contains CMSG_KEY_AGREE_EPHEMERAL_KEY_CHOICE.
DUMMYUNIONNAME.pSenderId
A pointer to a CERT_ID structure. This member is used when the dwKeyChoice member contains CMSG_KEY_AGREE_STATIC_KEY_CHOICE. This member is not currently used.
UserKeyingMaterial
A CRYPT_DATA_BLOB structure that contains user keying material (UKM) provided by the sender to ensure that a different key is generated each time the same two parties generate a pair-wise key. This member is optional and all members should be set to zero if not used.
cRecipientEncryptedKeys
The number of elements in the rgpRecipientEncryptedKeys array.
rgpRecipientEncryptedKeys
An array of CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO structures, one for each recipient to receive this key agreement key. The cRecipientEncryptedKeys member contains the number of elements in this structure.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | wincrypt.h |