How to extract the private key created using the Strong Name tool (sn.exe)?

Sn.exe provides options for key management, signature generation, and signature verification.

To create a pair of public and private keys, use the following command -

sn -k keyPair.snk 

public key can be extracted using -

 sn -p keyPair.snk publicKey.snk 

I want to see the corresponding private key of the generated pair,

How can i do this?

+4
source share
1 answer

The SN.exe utility does not provide you with the ability to display the private key. The name itself says it is a private key. Each public key is unique to the corresponding private key pair. If it were possible to find out the secret key, someone could violate the contents of your .Net assembly, and the whole motive of signing the .NET assembly, which would keep the contents of your assembly from malicious leave, would be lost.

+1
source

Source: https://habr.com/ru/post/1441198/


All Articles