1
1)您好我想知道是否有可能使用虛擬智能卡來存儲我設計的應用程序的RSA密鑰對。到目前爲止,我只能找到登錄方面的文檔,但只有標準智能卡加密存儲沒有。我嘗試使用傳統的智能卡CSPParameters無濟於事。下面的代碼將執行,但操作系統將聲明虛擬智能卡對此操作無效。Windows TPM虛擬智能卡RSA密鑰存儲
SecureString pwd;
char[] scPwd = { '1', '2', '3', '4', '5','6','7','8' };
fixed(char* pChars = scPwd)
{
pwd = new SecureString(pChars, scPwd.Length);
}
CspParameters csp =
new CspParameters(1,
"Microsoft Base Smart Card Crypto Provider",
"Codeproject_1",
new System.Security.AccessControl.CryptoKeySecurity(),
pwd);
的RSACryptoServiceProvider rsaCsp =(新的RSACryptoServiceProvider(4096,CSP) { PersistKeyInCsp =真 });
命令行試驗TestCard:
tpmvscmgr.exe create /name test /pin default /adminkey random /generate
2)如果這是可能可以在用戶銷是公知的和非導出密鑰仍然不能導出?