PFN_CSP_UNPAD_DATA function pointer

The PFN_CSP_UNPAD_DATA function can be optionally called by the card to remove cryptographic padding when the card cannot do that itself. This function is optional.

To provide the best security, removal of cryptographic padding should occur on the card. However, it is recognized that not all cards support this feature.

Syntax

typedef DWORD ( WINAPI *PFN_CSP_UNPAD_DATA)(
  _In_  PCARD_RSA_DECRYPT_INFO pRSADecryptInfo,
  _In_  PCARD_RSA_DECRYPT_INFO pRSADecryptInfo,
  _Out_ DWORD                  *pcbUnpaddedData,
  _Out_ DWORD                  *ppbUnpaddedData
);

Parameters

  • pRSADecryptInfo [in]
    Contains the buffer to unpad plus needed algorithm information.

  • pRSADecryptInfo [in]
    Contains the buffer to unpad plus needed algorithm information.

  • pcbUnpaddedData [out]
    Populated with count of bytes in unpadded buffer dereferenced by the ppbUnpaddedData parameter.

  • ppbUnpaddedData [out]
    Buffer with padding removed.

Return value

Zero on success; otherwise, nonzero.

Remarks

The minidriver must free the unpadded buffer with a call to PFN_CSP_FREE.

The currently supported padding methods are as follows:

  • PKCS#1 v1.1 with the Base CSP/KSP supplied call backs.
  • OAEP padding with KSP supplied call backs.

If the dwVersion member of the pRSADecryptInfo parameter has a value that is less than CARD_RSA_KEY_DECRYPT_INFO_CURRENT_VERSION, this function fails with ERROR_REVISION_MISMATCH.

Requirements

Target platform

Desktop

Header

Cardmod.h (include Cardmod.h)

 

 

Send comments about this topic to Microsoft