Share via


CARD_SIGNING_INFO structure

This topic is not current. For the most current information about the Smart Card API, see Smart Card Minidriver Specification.

The CARD_SIGNING_INFO structure specifies data to be signed by the CardSignData function.

Syntax

typedef struct _CARD_SIGNING_INFO {
  DWORD  dwVersion;
  BYTE   bContainerIndex;
  DWORD  dwKeySpec;
  DWORD  dwSigningFlags;
  ALG_ID aiHashAlg;
  PBYTE  pbData;
  DWORD  cbData;
  PBYTE  pbSignedData;
  DWORD  cbSignedData;
  LPVOID pPaddingInfo;
  DWORD  dwPaddingType;
} CARD_SIGNING_INFO, *PCARD_SIGNING_INFO;

Members

dwVersion

The version number of the structure. You must set this member to 1.

bContainerIndex

The key container index number. The container holds the keys used to sign the data.

dwKeySpec

The purpose of the keys in the key container. This member can be one of the following values.

Value Meaning
AT_KEYEXCHANGE
1
The keys in the container are used to encrypt and decrypt session keys.
AT_SIGNATURE
2
The keys in the container are used to create and verify digital signatures.

dwSigningFlags

Specifies certain behavior of this structure. The following flags are defined.

Value Meaning
CARD_BUFFER_SIZE_ONLY
0x20000000
The card module returns only the size of the signed data in the cbSignedData member, and is not required to return the signed data in the pbSignedData member.
CARD_PADDING_INFO_PRESENT
0x40000000 (0x40000000)
The pPaddingInfo member points to a structure specified by the dwPaddingType member. Otherwise, the pPaddingInfo member is ignored.

aiHashAlg

A value of the ALG_ID enumeration that specifies the algorithm used to sign the data.

pbData

A pointer to an array that contains the data to be signed.

cbData

The size, in bytes, of the pbData array.

pbSignedData

A pointer to an array that, on output, contains the signed data.

cbSignedData

The size, in bytes, of the pbSignedData buffer.

pPaddingInfo

A pointer to a structure that specifies padding scheme options. The value of the dwPaddingType member determines which padding structure is used.

Windows Server 2003, Windows 2000 Server with SP4 and later, Windows XP and Windows 2000 Professional with SP4 and later: This member is not supported.

dwPaddingType

The type of padding structure that the pPaddingInfo member points to. The following values are defined.

Windows Server 2003, Windows 2000 Server with SP4 and later, Windows XP and Windows 2000 Professional with SP4 and later: This member is not supported.

Value Meaning
CARD_PADDING_NONE
1 (0x1)
No card padding structure is used.
CARD_PADDING_PKCS1
2 (0x2)
The pPaddingInfo member points to a BCRYPT_PKCS1_PADDING_INFO structure. PKCS1 version 1.5 padding is used, and the object identifier (OID) of the hash algorithm is embedded in the signature.
CARD_PADDING_PSS
4 (0x4)
The pPaddingInfo member points to a BCRYPT_PSS_PADDING_INFO structure. PKCS1 version 2.0 PSS padding is used. This value is supported only by card modules called by the smart card key storage provider (KSP).

Requirements

Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
Windows Server 2003 [desktop apps only]
Header
Cardmod.h

See also

Microsoft Base Smart Card Cryptographic Service Provider

CardSignData