I'm implementing an OTP solution based on the Microsoft's whitepaper "Strong Authentication with One-Time Passwords in Windows 7 and Windows Server 2008 R2".
The summary of the relevant part of that whitepaper is to essentially fake presence of a smart-card reader by implementing a custom key storage provider (KSP) for Windows CNG subsystem. However having followed the instructions as described, I cannot get my custom KSP to be used by the OS when required.
In my credential provider I am creating an authentication package with KERB_CERTIFICATE_LOGON and KERB_SMARTCARD_CSP_INFO structures. My custom KSP is referenced in KERB_SMARTCARD_CSP_INFO as required (it is also correctly registered, can be enumerated, and can be used with NCrypt APIs). However it is never loaded by the OS after ICredentialProviderCredential::GetSerialization returns (not even DLL being loaded in memory) or during the call to LsaLogonUser() in my standalone test app.
The issue is identical to the one described here in MSDN forums (without any answers) and I came to the same conclusion that the issue is with the contents of KERB_SMARTCARD_CSP_INFO (example usage can be found here) - however due to next to no documentation and not a single example of this rare case, I have no idea what to do...