从强名称的文件中提取私钥? [英] Extracting private key from a strong name file?

查看:143
本文介绍了从强名称的文件中提取私钥?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如标题状态,没有人知道如何提取从SNK文件私钥?我们要使用来自强名称为加密目的的私钥。我读:
http://msdn.microsoft.com/en-us/库/ k5b5tt23(VS.80)的.aspx 的SN -o key.snk如果它们存在的文件中,但我尝试过了,它只是一个很长的CSV格式的字符串,不区分将提取无论是公/私钥之间是什么私钥和什么是公钥。

As the title states, does anyone know how to extract the private key from an snk file? We want to use the private key from the StrongName for encryption purposes. I read in:
http://msdn.microsoft.com/en-us/library/k5b5tt23(VS.80).aspx that sn -o key.snk will extract both the private/public key if they exist in the file but i tried it and its just a long CSV formatted string with no distinction between what is the private key and what is the public key.

推荐答案

在你链接的文档,旁边的 -o 标志,它说:

In the document you link, next to the -o flag, it says:

如果的INFILE包含一个密钥对私钥,私钥也被提取。

If the infile contains a key pair with a private key, the private key is also extracted.

您一定没有的的文件中的私钥?

Are you certain there is a private key in the file?

您可以运行 SN -p key.snk 来获得公共密钥,和比较,以 SN -o key.snk的输出 - 如果他们是相同的,密钥文件仅具有一个公共密钥,如果不是,所不同的是私钥

You can run sn -p key.snk to get the public key, and compare that to the output of sn -o key.snk - if they are the same, the key file only has a public key, if not, the difference is the private key.

这篇关于从强名称的文件中提取私钥?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆