从不可导出的密钥容器导出 snk

发布于 2024-12-03 17:50:16 字数 353 浏览 5 评论 0原文

我使用 sn -k KeyFile.snk 创建了一个 snk 文件
我将其安装在我的测试机器上并签署了几个文件以用作许可证文件。
我导出了公钥并将其嵌入到我的应用程序中以验证许可证。

现在的问题是我丢失了 Keyfile.snk 并且我想在生产服务器上安装密钥对。我无法生成新的密钥对,因为我已经使用旧密钥对颁发了许可证,并且该应用程序已安装在多个客户的 PC 上。

我尝试从测试机的密钥容器中导出它,但它被设置为不可导出。
我使用 mimikatz 强制导出。它有效,但返回了一个 .pvk 文件。
现在我被困住了。

知道我应该如何进行吗?
谢谢。

I have created a snk file using sn -k KeyFile.snk
I installed it on my test machine and signed a couple of files for use as a license file.
I exported the public key and embed it in my application in order to verify the license.

Now the problem is that i lost my Keyfile.snk and i want to install the key pair on a production server. I can't generate a new keypair since i have already issued licenses using the old keypair and the application is already installed on several customer's PCs.

I tried exporting it from my test machine's key container but it is set as non-exportable.
I used mimikatz to force an export. It worked, but it returned a .pvk file.
And now i'm stuck.

Any idea to how i should proceed?
Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

握住你手 2024-12-10 17:50:16

我是mimikatz的作者,你不知道可以用OpenSSL转换PVK吗?

http://blog.gentilkiwi.com/cryptographie/openssl-conversion -pvk-microsoft-privatekey-blob

您还可以使用公共证书 (sn -p) 和转换后的 PEM 密钥制作 pfx/p12 :)

I'm the author of mimikatz, don't you know that you can convert PVK with OpenSSL ?

http://blog.gentilkiwi.com/cryptographie/openssl-conversion-pvk-microsoft-privatekey-blob

You can also make a pfx/p12 with the public certificate (sn -p) and the converted PEM key :)

等往事风中吹 2024-12-10 17:50:16

.pvk 格式通常用于存储 Authenticode(tm) 私钥。这是一种简单的格式,Mono 项目有读取它的工具。 Mono 还具有读取和写入 .snk 文件的工具。

但是,我不记得有任何工具进行转换,因此您可能需要编写一小段代码来读取 PVK 并将其写入为 SNK(中间有 RSA 实例)。

您需要的所有内容都存在于 Mono.Security 程序集中Mono 提供(或者您可以自己编译)。

免责声明: 我是上面讨论的 Mono 代码的主要作者,所有这些代码都可以在 MIT.X11 许可证下使用

The .pvk format was often used for storing Authenticode(tm) private keys. It's a simple format and the Mono project has tools to read it. Mono also has tools to read and write .snk files.

However I don't recall any tool doing the conversion so you'll likely need to write a small piece of code to read the PVK and write it as an SNK (with an RSA instance in-between).

Everything you need exists inside the Mono.Security assembly that Mono provides (or that you can compile on your own).

Disclaimer: I'm the main author of the Mono code discussed above and it is all available under the MIT.X11 license

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文