Signing an assembly using a private key

Darling, I have a confusion, if any of you please help me with this. My questions:

  • Everyone says that they sign the assembly with the private key, but no one says how to get the secret key using sn.exe -KI can create a private / public key pair, but how to extract the private key from it to sign it.

  • If I sign my assembly using the private key and then send it to the user of this assembly, he will immediately add this assembly to the global assembly and use it, so you need to send him the public key to use this assembly or the public key with assemblyl, so anyone can use this assembly, and if someone can use what encryption means, it will be a private key.

+5
source share
4 answers

I have a confusion

This is a confusing topic.

How to extract a private key from it?

You do not need. The signature tool accepts the key file. He is smart enough to retrieve the private key, if necessary.

does it need to publish the key to use this assembly?

The public key is built into the assembly. You can see this by looking at the strong name of the assembly. However, you must somehow tell the client what the correct public key is, if you think that someone might try to impersonate you! See next bit for more details.

if someone can use the meaning of encryption with a private key?

- . , " , , ".

, Microsoft . "" : . Microsoft, , Microsoft , , Microsoft, -, Microsoft. Seven , , , , Microsoft, .

- , . , : " , ​​Ashish, , ".

: " , ?" " ", . , , , , , . , , , , , .

, . , , , , ; , , , , ; , .

+20
  • . , , SNK ( sn -k), , . , , ( /keyfile csc.exe, ).

  • GAC - , . , .

    - . , : " / , , , ".

+6
  • sn.exe, .snk. sn.exe .snk, . Visual Studio ( , ).

  • , . , X.509. .

+1

All Articles