Retired Microsoft Blog disclaimer

This directory is a mirror of retired "Decrypt My World" MSDN blog and is provided as is. All posting authorship and copyrights belong to respective authors.
Original URL: https://blogs.msdn.microsoft.com/alejacma/2007/12/12/smart-cards-pin-gets-cached/
Post name: Smart Card’s PIN gets cached
Original author: Alejandro Campos Magencio
Posting date: 2007-12-12T13:00:00+00:00


 

Hi,welcome back,

 

When we use a Smart Cardwith any application (i.e. Internet Explorer),the PIN that user inserted to access the card the first timemay get cached and not requested again during the live of the application.But what if we need the PIN to be requested everytime we use the card with that application?

 

The Smart Card CSP (Crypto Service Provider) is in charge of PIN cache. PIN is cached by card/process/time.

 

We may have two possible solutions here:

 

1) The CSP has a parameter that we can set in i.e. the registry to disable the PIN cache. This depends on the CSP.

 

2) We can flush the cache with CryptSetProvParamAPI, but not all CSP implement this. Microsoft Base Smart Card Crypto Provider implements it, for instance. This is the way we should call this CryptoAPI:

CryptSetProvParam(hProv, PP_SIGNATURE_PIN, NULL, 0)

 

 

I hope this helps.

 

Cheers,

 

 

Alex (Alejandro Campos Magencio)

 


Share this article:

Comments:

Comments are closed.