By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 924 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Dll To Dll Security in NET

P: n/a
Hi Guys,
I am doing a research on DLL to DLL security. But so far I am not able
to achieve it. I read articles about Signing the Assemblies, but that
has not answered my question.
Is it possible in .NET framework to achieve Dll to Dll Security.

Goal to achieve
My First DLL is called ABC.DLL
It should only be used by DEF.DLL. No other project or dll should be
able to use this specific dll.
Nov 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Cor
Hi Imran,
My First DLL is called ABC.DLL
It should only be used by DEF.DLL. No other project or dll should be
able to use this specific dll.


Maybe a strange question, but why are you then making a seperate DLL and is
it not in the same project as DEF and in the same DLL?

Just curious.

Cor

Nov 22 '05 #2

P: n/a
JW
Imran,

You could make a link demand for a strong name identity permission. This
gives you the ability to export methods in assemblies that are only callable
from your other assemblies. For instance, you could decorate the public
methods of your ABC.DLL assembly with the attribute below.

[StrongNameIdentityPermission( SecurityAction.LinkDemand,
PublicKey ="<your public
key in hex>")]
public void ABCMethod1()

The tool secutil.exe (part of the .NET Framework SDK) can be used to get the
hex string format of a public key. secutil /? will bring up the help for
the tool.

To achieve fully what you describe, you could include name and/or version
information.

[StrongNameIdentityPermission( SecurityAction.LinkDemand,
PublicKey ="<your public
key in hex>"),
Name="DEF"]
public void ABCMethod1()

Two things to note. First, when using such specific identities, the
assembly in which ABCMethod1 is declared may not be able to call the method
itself. Of course your ABCMethod1 can be a public wrapper around another
internal method which can be called from within the declaring assembly.

Second, a link demand is weaker than a full demand in that, among other
things, only the immediate caller of the method is checked. If you want all
callers on the stack to be checked, make a full demand.

The book .NET Framework Security by LaMacchia, et. al., describes this and
other techniques for implementing a secure assembly. I think this book is a
great reference.

Hope this helps.
--
Jeffrey Wynn
jw@nospam.net
"Imran Masud" <im******@hotmail.com> wrote in message
news:53**************************@posting.google.c om...
Hi Guys,
I am doing a research on DLL to DLL security. But so far I am not able
to achieve it. I read articles about Signing the Assemblies, but that
has not answered my question.
Is it possible in .NET framework to achieve Dll to Dll Security.

Goal to achieve
My First DLL is called ABC.DLL
It should only be used by DEF.DLL. No other project or dll should be
able to use this specific dll.

Nov 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.