在Windows上,encryption机密钥存储在:%ProgramData%\ Microsoft \ Crypto \ RSA \ MachineKeys中
如何确定每个密钥的相应容器名称?
我猜这种模糊是由devise – “默默无闻的安全”?
Foreach ($MachineCert In Get-ChildItem Cert:\LocalMachine -Recurse | Where HasPrivateKey) { $MachineCert | Select @{n='Subject'; e={ $MachineCert.Subject }}, @{n='Container'; e={ $MachineCert.PrivateKey.CspKeyContainerInfo.UniqueKeyContainerName }}, @{n='Store'; e={ $MachineCert.PSParentPath }} } Subject Container Store ------- --------- ----- CN=Ryan-Win81-2014 f686aa...9dfa-7c3d5dc833ac Remote Desktop CN=localhost fad662...9dfa-7c3d5dc833ac My
请注意,在允许读取某些证书的某些属性之前,您可能需要admin / UAC提升。
我不能肯定地说“模糊”是有意devise的,但这并不令我感到意外。 大多数人不明白什么是X509证书或什么是私钥,不幸的是大多数人都不在乎。 通过这样做,Windows至less可以将私钥隐藏在文件系统深处的一个相对安全的位置,因为如果大多数用户必须自己处理私钥,他们只能将私钥放在桌面上。