从USB EV证书中检索私钥
我正在尝试使用PowerShell从存储在个人商店中的证书中提取私钥。这是一个EV代码签名证书,带有USB设备上的密钥。
我发现的大多数工具似乎都与本地机器证书有关,并且无法正常工作,我在这篇文章的步骤中达到了: https://hope.mx/2019/recovering-a-covering-a-certificate-where-where-the-private-private-private-key-key-- key-- key------------------ 我的理解是,
我试图使用这些步骤:
PS Cert:\CurrentUser\My> $a = Get-Item Cert:\CurrentUser\My\A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0
PS Cert:\CurrentUser\My> $a.PrivateKey.CspKeyContainerInfo
MachineKeyStore : False
ProviderName : eToken Base Cryptographic Provider
ProviderType : 1
KeyContainerName : te-cd6cd72c-da9c-4862-b02d-419e7ac19123
UniqueKeyContainerName : te-cd6cd72c-da9c-4862-b02d-419e7ac19123
KeyNumber : Exchange
Exportable : False
HardwareDevice : True
Removable : True
Accessible : True
Protected : True
CryptoKeySecurity :
RandomlyGenerated : False
我应该能够在C下找到该文件:实际上,RSA目录中的任何文件甚至都没有以“ TE-”开头,
该值是否真的代表了系统中某个地方的私有密钥文件的名称?如果是这样,在哪里?
I'm trying to use PowerShell to extract a private key from a certificate stored in the personal store. This is an EV Code signing certificate that came with the key on a USB device.
Most of the tools I've found seem related to Local Machine certificates and are not working, and I hit on the steps in this post: https://hope.mx/2019/recovering-a-certificate-where-the-private-key-is-marked-as-non-exportable/
I tried to use those steps:
PS Cert:\CurrentUser\My> $a = Get-Item Cert:\CurrentUser\My\A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0A0
PS Cert:\CurrentUser\My> $a.PrivateKey.CspKeyContainerInfo
MachineKeyStore : False
ProviderName : eToken Base Cryptographic Provider
ProviderType : 1
KeyContainerName : te-cd6cd72c-da9c-4862-b02d-419e7ac19123
UniqueKeyContainerName : te-cd6cd72c-da9c-4862-b02d-419e7ac19123
KeyNumber : Exchange
Exportable : False
HardwareDevice : True
Removable : True
Accessible : True
Protected : True
CryptoKeySecurity :
RandomlyGenerated : False
It was my understanding that I should be able to find that file under C:\ProgramData\Microsoft\Crypto\RSA, but it is not there and in fact none of the files in the RSA directories even start with "te-"
Does that value really represent the name of the private key file someplace in the system? If so, where?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
它是一个用于保护私钥的代币(硬件设备),这意味着它不得导出。抱歉:您不能。
It is a token (hardware device) that was built to protect the private key - which means it shall not be exported. Sorry to say: You cannot.
是的
$ a.thumbprint
是存储密钥文件的唯一容器。这对应于
%appData%\ Microsoft \ SystemCertificates \ My \ CERTIFATES
这应该是您想要的东西的好开始。
我从此处。
Yes
$a.Thumbprint
is the unique container where the key file is stored.This corresponds to
%APPDATA%\Microsoft\SystemCertificates\My\Certificates
This should be a good start to what you're looking for.
I've taken some info from here.