Using the OPM DDI

The Microsoft DirectX graphics kernel subsystem (Dxgkrnl.sys) uses the OPM DDI to create OPM protected outputs, destroy OPM protected outputs, get certificates, configure protected outputs, get information about protected outputs, and get information about the graphics adapter. The DirectX graphics kernel subsystem gets pointers to the OPM DDI functions when it calls the display miniport driver's DxgkDdiQueryInterface function to query for the interface that is identified by GUID_DEVINTERFACE_OPM and DXGK_OPM_INTERFACE_VERSION_1. The following sequence describes how the OPM DDI is typically used to create, manipulate, and destroy OPM protected outputs:

  1. The DirectX graphics kernel subsystem calls the DxgkDdiOPMCreateProtectedOutput function to create an OPM protected output. An OPM protected output always corresponds to exactly one physical video output. DxgkDdiOPMCreateProtectedOutput returns a handle to the newly created output.

  2. The DirectX graphics kernel subsystem calls the DxgkDdiOPMGetCertificateSize and DxgkDdiOPMGetCertificate functions to get the display miniport driver's OPM certificate or COPP certificate and its size.

    Note

    DxgkDdiOPMCreateProtectedOutput, DxgkDdiOPMGetCertificateSize, and DxgkDdiOPMGetCertificate are the only OPM DDI functions that the DirectX graphics kernel subsystem does not pass a protected output handle to.

  3. The DirectX graphics kernel subsystem calls the DxgkDdiOPMGetRandomNumber function to get the protected output's random number.

  4. The DirectX graphics kernel subsystem passes a 256-byte buffer in a call to the DxgkDdiOPMSetSigningKeyAndSequenceNumbers function. The buffer contains data that is encrypted with one of the display miniport driver's public keys. For more information about public keys, download the Output Content Protection document from the Output Content Protection and Windows Vista website. The public key that is used depends on the semantics of the protected output. The public key in the display miniport driver's OPM certificate is used if the protected output has OPM semantics. The public key in the display miniport driver's COPP certificate is used if the protected output has COPP semantics. The encryption scheme that is used to encrypt the data also depends on the protected output's semantics. The data is encrypted with the standard RSA algorithm if the protected output has COPP semantics and with the RSAES-OAEP encryption scheme if the protected output has OPM semantics. For information about RSA, AES, and RSAES-OAEP, see the RSA Laboratories website. The display miniport driver uses the appropriate private key and decryption method to decrypt the data. A random number, two random sequence numbers, and a 128-bit AES key are in the decrypted data. The display miniport drive ensures that the random number matches the random number that the driver returned when its DxgkDdiOPMGetRandomNumber function was called. The driver then stores the two sequence numbers and the 128-bit AES key.

  5. The DirectX graphics kernel subsystem can now call the DxgkDdiOPMGetInformation or DxgkDdiOPMGetCOPPCompatibleInformation function to get information from a protected output. The DirectX graphics kernel subsystem can also call DxgkDdiOPMConfigureProtectedOutput to configure a protected output. DxgkDdiOPMGetInformation can be called only if the output has OPM semantics and DxgkDdiOPMGetCOPPCompatibleInformation can be called only if the output has COPP semantics. Typically, the DirectX graphics kernel subsystem calls DxgkDdiOPMGetInformation or DxgkDdiOPMGetCOPPCompatibleInformation to get information about the output and then calls DxgkDdiOPMConfigureProtectedOutput one or more times to configure the output. Then, the DirectX graphics kernel subsystem calls DxgkDdiOPMGetInformation or DxgkDdiOPMGetCOPPCompatibleInformation again. The DirectX graphics kernel subsystem can get the following types of information by calling DxgkDdiOPMGetInformation or DxgkDdiOPMGetCOPPCompatibleInformation:

    The DirectX graphics kernel subsystem can change the following settings by calling DxgkDdiOPMConfigureProtectedOutput:

    • The current protection level of one of the output's protection types. For example, DxgkDdiOPMConfigureProtectedOutput can enable or disable HDCP and can turn off ACP protection or change the current ACP protection level.
    • The current HDCP SRM that the protected output uses.
    • The current signaling standard that the protected output uses. This change can be done only if the output has COPP semantics.
  6. The DirectX graphics kernel subsystem calls DxgkDdiOPMDestroyProtectedOutput when it finishes using the protected output object.