Groups | Blog | Home
all groups > dotnet sdk > october 2004 >

dotnet sdk : SN.exe and Public Keys


Brian Reed
10/26/2004 1:11:08 PM
I am using SN.exe to generate key pairs and to extract the public key from
the pair so that our developers can do delayed signing without having to give
them the private key. Here's my concern. The public key and public key
token displayed from the key pair and the public key only are different.
Should this be?

Try this:

sn -k privatepair.snk
sn -p privatepair.snk publickey.snk
sn -tp privatepair.snk
sn -tp publickey.snk

Note that the results of the last two lines is distinctly different.
Shouldn't the extracted public key match the public key from the key pair?
If I am delayed signing files and using app.confg to reference other
assemblies via an assemblyIdentity, what public key token would I use?

Thanks,

Mujtaba Syed
11/3/2004 2:52:16 PM
A year or so back I wrestled with this same thing plus more-

According to the docs the public and private key are each 1024 bits (128
bytes) in size. But, the size of privatepair.snk is 596 bytes while the size
of publickey.snk is 160 bytes.

[quoted text, click to view]

AddThis Social Bookmark Button