Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

NegotiateCryptoSessionKeyExchange routine

Establishes a session key for a cryptographic session object.


HRESULT APIENTRY* NegotiateCryptoSessionKeyExchange(
  _In_ D3D10DDI_HDEVICE          hDevice,
  _In_ D3D11_1DDI_HCRYPTOSESSION hCryptoSession,
  _In_ UINT                      DataSize,
  _In_ VOID                      *pData


hDevice [in]

A handle to the display device (graphics context).

hCryptoSession [in]

A handle to the cryptographic session object that was created through a call to the CreateCryptoSession function.

DataSize [in]

The size, in bytes, of the data in the pData array.

pData [in]

A pointer to a byte array that contains the encrypted session key.

Return value

NegotiateCryptoSessionKeyExchange returns one of the following values:

Return codeDescription

The session key for the cryptographic session was negotiated successfully.


Parameters were validated and determined to be incorrect.


Memory was not available to complete the operation.



The pData parameter references a buffer that contains a session key for the cryptographic session. The key exchange mechanism depends on the type of the encryption algorithm that is used by the cryptographic session.

For sessions that use the RSA Encryption Scheme - Optimal Asymmetric Encryption Padding (RSAES-OAEP) algorithm, the key buffer must contain 256 bytes of data and must be encrypted by using the RSA Encryption Scheme - Optimal Asymmetric Encryption Padding (RSAES-OAEP) algorithm with the public key from the cryptographic session certificate.

The key exchange for a cryptographic session is identical to the key exchange for the Output Protection Manager (OPM) interface. However, the OPM key buffer contains additional data besides the session key.

Note  The same certificate can be used for the cryptographic session and OPM session key.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Target platform



D3d10umddi.h (include D3d10umddi.h)

See also




Send comments about this topic to Microsoft

© 2015 Microsoft