Groups | Blog | Home
all groups > dotnet security > september 2006 >

dotnet security : kaycontainer



BLM
9/22/2006 3:48:02 AM
Hello

There is two option to asign keypair to an assembly

1. In assenblyinfo.cs file asign .snk file name to AssemblyKeyFile atrribule.
for exam -
[assembly: AssemblyKeyFile("..\\..\\mykey.snk")]

2. Install keypair in kaycontiner by use sn.exe - i and and asign
keycontainer name to AssemblyKeyName attribute in assemblyinfo.cs file.
for exampl -

[assembly: AssemblyKeyName("InsTechKeyPair")]

my question is when we install keypair in keycontiner what is the location
of keycontainer ? is it reside in windows registry or somthing where else ?

can I see the keypair location physicaly after install it in keycontainer ?

looking forward for your answer

Thank

BLM

Nicole Calinoiu
9/23/2006 9:45:25 AM
The key container location will depend on which CSP you're using and your
version of Windows. For example, if you're using the default CSP on Windows
XP without the sn -m option, your container physical store will likely be
under C:\Documents and Settings\<userid>\Application
Data\Microsoft\Crypto\RSA\.

If you have reason to be concerned about storing your private key locally
(which you should unless it's a purely temporary key), you might want to
consider using a smart card for your strong naming keys
(http://www.dotnetthis.com/Articles/SNandSmartCards.htm).


[quoted text, click to view]
AddThis Social Bookmark Button