Smart Card Minidriver Functions

The functions provided by the smart card minidriver to the Cryptographic Service Provider (CSP) or the smart card Key Storage Provider (KSP), when the CSP or the KSP calls the minidriver's CardAcquireContext function.

In this section

TopicDescription

CardAcquireContext

The CardAcquireContext function is used to initialize communication between the Base CSP/KSP and the card minidriver.

CardAuthenticateChallenge

The CardAuthenticateChallenge function performs authentication of a card principal by using a challenge/response protocol.

CardAuthenticateEx

The CardAuthenticateEx function handles PIN authentication operations to the card.

CardAuthenticatePin

The CardAuthenticatePin function submits a PIN value as a string to the card to establish the user’s identity and to satisfy access conditions for an operation to be undertaken on the user’s behalf.

CardChangeAuthenticator

This function changes the authenticator for the affected card principal. It can be used to change a user’s PIN or to change the challenge/response key. The two usages are distinguished by use of a flag value.

CardChangeAuthenticatorEx

This function changes the authenticator for the affected card principal. It can be used to change a PIN or unblock a PIN. The usages are distinguished by use of a flag value.

CardConstructDHAgreement

The CardConstructDHAgreement function performs a secret agreement calculation for Diffie Hellman (DH) key exchange by using a private key that is present on the card.

CardCreateContainer

The CardCreateContainer function creates a new key container that is identified by the container index that the bContainerIndex argument specifies.

CardCreateContainerEx

The CardCreateContainerEx function creates a new key container that the container index identifies and the bContainerIndex parameter specifies. The function associates the key container with the PIN that the PinId parameter specified.

CardCreateDirectory

This function creates a subdirectory from the root in the file system of the card, and applies the provided access condition.

CardCreateFile

The CardCreateFile function creates a file on the card with a specified name and access permission.

CardDeauthenticate

The CardDeauthenticate function is an optional export that should be implemented within the card minidriver, if possible, to efficiently reverse the effect of authenticating a user or administrator without resetting the card.

CardDeauthenticateEx

The CardDeauthenticateEx function must always be provided. If it is not possible within the card minidriver to efficiently reverse the effect of an authentication operation without resetting the card, the call must return SCARD_E_UNSUPPORTED_FEATURE.

CardDeleteContainer

The CardDeleteContainer function deletes the key container specified by its index value. This is done by deleting all key material (public and private) that is associated with that index value.

CardDeleteContext

The CardDeleteContext function reverses the effect of CardAcquireContext and severs the communication between the Base CSP/KSP and the card minidriver. This function also performs any needed deallocations and cleanup.

CardDeleteDirectory

This function deletes a directory from the card. This operation fails if it violates permissions on the directory or if the directory is not empty.

CardDeleteFile

The CardDeleteFile function deletes the specified file. If the file does not exist, the returned Status value should indicate that the file did not exist.

CardDeriveKey

The CardDeriveKey function provides information about a derived key, in compliance with the Federal Information Processing Standards (FIPS) publication 140-2 for smart cards.

CardDestroyDHAgreement

The CardDestroyDHAgreement function removes an agreed secret from the card.

CardDestroyKey

The CardDestroyKey function releases a temporary key on the card. The card should delete all of the key material that is associated with that key handle.

CardEnumFiles

The CardEnumFiles function returns name information about available files in a directory as a multistring list.

CardGetAlgorithmProperty

This function can be used to get properties for a cryptographic algorithm.

CardGetChallenge

A card principal can be authenticated by using either a PIN or a challenge/response protocol in which the card generates a block of challenge data, by using its administrative key.

CardGetChallengeEx

Besides authentication by using a PIN, a card principal can be authenticated by using a challenge/response protocol in which the card generates a block of challenge data.

CardGetContainerInfo

The CardGetContainerInfo function queries the specified key container for more information about which keys are present, such as its key specification (such as AT_ECDSA_P384).

CardGetContainerProperty

The CardGetContainerProperty function is modeled after the query functions of CAPI for keys.

CardGetFileInfo

This function retrieves information about a file, specifically its size and ACL information.

CardGetKeyProperty

This function is used to query the properties of a key.

CardGetProperty

The CardGetProperty function is modeled after the query functions of CAPI for keys.

CardGetSharedKeyHandle

The CardGetSharedKeyHandle function returns a session key handle to the caller.

CardImportSessionKey

The CardImportSessionKey function imports a temporary session key to the card. The session key is encrypted with a key exchange key, and the function returns a handle of the imported session key to the caller.

CardProcessEncryptedData

CardProcessEncryptedData processes a set of encrypted data BLOBs by sending them to the card where the data BLOBs are decrypted.

CardQueryCapabilities

This function queries the card and card-specific minidriver combination for the functionality that is provided at this level, such as certificate or file compression.

CardQueryFreeSpace

The CardQueryFreeSpace function determines the amount of available card storage space.

CardQueryKeySizes

This function returns the public key sizes that are supported by the card in use.

CardReadFile

The CardReadFile function reads the entire file at the specified location into the user-supplied buffer.

CardRSADecrypt

This function performs an RSA decryption operation on the supplied buffer, by using the private key to which the container index refers.

CardSetContainerProperty

This function sets the properties on containers.

CardSetKeyProperty

This function is used to set the properties of a key.

CardSetProperty

The CardSetProperty function is used to set properties on the card.

CardSignData

The CardSignData function signs a block of unpadded data. This entry either performs padding on the card or pads the data by using the PFN_CSP_PAD_DATA callback. All card minidrivers must support this entry point.

CardUnblockPin

The CardUnblockPin function is used to unblock a card that has become blocked by too many incorrect PIN entry attempts.

CardWriteFile

The CardWriteFile function writes the entire contents of a data buffer to a file. The file contents are replaced, starting at the beginning of the file. The file must exist, or CardWriteFile fails.

MDEncryptData

The MDEncryptData function uses a key handle to encrypt data with a symmetric key. The data is encrypted in a format that the smart card supports.

MDImportSessionKey

The MDImportSessionKey function imports a temporary session key to the card minidriver and returns a key handle to the caller.

 

 

 

Send comments about this topic to Microsoft

Show: