473,513 Members | 2,401 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Assembly signing

Just a question. If i have an app with a dll version 1.5 and I replace it
with version 1.6 everithing works fine.
If i change the strong name however the app crash, but this is fine.
My curiosity is then: the various System, System.data and so on are signed?
If so, how can the mono project prot them without having the private key?

this is just for curiosity, no real need,

Thanks!
Cristian Mori
Nov 1 '05 #1
6 1719
Hi Cristian,
Welcome to Newsgroup!

Based on DonNet Framework, the assembly resolver goes through in the order
below to find an appropriate assembly file.

the 1st location that the assembly resolver uses to find an assembly is
the global assembly cache (GAC). The GAC is a machine-wide code cache that
contains assemblies that have been installed for machine-wide use. The GAC
allows administrators to install assemblies once per machine for all
applications to use. To avoid system corruption, the GAC accepts only
assemblies that have valid digital signatures and public keys. 2nd, If the
assembly resolver cannot locate the assembly using the GAC, it performs a
search through a series of directories relative to the root directory of
the application. This search is known as probing. Probing will search only
in directories that are at or below the APPBASE directory (recall that the
APPBASE directory is the directory that contains the application's
configuration file).

The Mono is the third party project. From my experience, it should also has
one similar algorithm to locate the assembly file. If you want to get more
details, you can consult it from the relevant Mono Web Site.

I hope the above information is useful for you. If you have any questions
or concerns, please feel free to let me know.

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 2 '05 #2
Hi Terry, Thanks for your reply.

Thanks for the explanation, but I still miss one thing.
Id I use system.Data, my app will have the public key of the signed
assembly, in order to decript it at runtime.
If I take my app and I move it in a mono system, the same app runs without
recompiling, and this is the "magic" of .NET.
However, how could it be possible if the two assembly (.NET Framework and
Mono Version) doesn't have the same strong key?

Thanks
Cristian

""TerryFei"" wrote:
Hi Cristian,
Welcome to Newsgroup!

Based on DonNet Framework, the assembly resolver goes through in the order
below to find an appropriate assembly file.

the 1st location that the assembly resolver uses to find an assembly is
the global assembly cache (GAC). The GAC is a machine-wide code cache that
contains assemblies that have been installed for machine-wide use. The GAC
allows administrators to install assemblies once per machine for all
applications to use. To avoid system corruption, the GAC accepts only
assemblies that have valid digital signatures and public keys. 2nd, If the
assembly resolver cannot locate the assembly using the GAC, it performs a
search through a series of directories relative to the root directory of
the application. This search is known as probing. Probing will search only
in directories that are at or below the APPBASE directory (recall that the
APPBASE directory is the directory that contains the application's
configuration file).

The Mono is the third party project. From my experience, it should also has
one similar algorithm to locate the assembly file. If you want to get more
details, you can consult it from the relevant Mono Web Site.

I hope the above information is useful for you. If you have any questions
or concerns, please feel free to let me know.

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 2 '05 #3
Hi Cristian,

For the execution of the .Net application, all its referenced assemblies
should be found. If not, the application will not run. In Microsoft .Net
Framework, the CLR(common language runtime) will load the referenced
strong-name assembly from GAC or its private directory according to the
probing steps listed at the previous post.

It should be the same in MONO. When MONO loads the application, it should
search the referenced assembly and then load it for the execution. Since
MONO is a virtual machine as the same the MS .net CLR, it should have the
corresponding location to store the strong-name assemblies, as the GAC in
MS .Net.

For your scenario, MONO should firstly locate the System.Data from its GAC.
Then the application could run smoothly. This is the reason why your
application could run without any error.

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 3 '05 #4
OK, but I still miss one think.
If I use Syste.Data in my app, then the public key of system.data is stored
in my app and it is used to decript the assembly when loaded.

Moving to mono, my app still use the stored public key of system.data (the
microsoft .net one) to decrypt and load the System.Data of mono.
So I guess that the System.Data of mono must be signed with the same key of
the microsoft one.

What am I missing?

Cristian
""TerryFei"" wrote:
Hi Cristian,

For the execution of the .Net application, all its referenced assemblies
should be found. If not, the application will not run. In Microsoft .Net
Framework, the CLR(common language runtime) will load the referenced
strong-name assembly from GAC or its private directory according to the
probing steps listed at the previous post.

It should be the same in MONO. When MONO loads the application, it should
search the referenced assembly and then load it for the execution. Since
MONO is a virtual machine as the same the MS .net CLR, it should have the
corresponding location to store the strong-name assemblies, as the GAC in
MS .Net.

For your scenario, MONO should firstly locate the System.Data from its GAC.
Then the application could run smoothly. This is the reason why your
application could run without any error.

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 3 '05 #5
You can use sn.exe, reflector, or some other program to determine what the
public key token is of the system assemblies in mono and compare them to
those used by the commercial release of .net. This will provide more
evidence that can be used to figure out what is going on.
"MoriCristian" <Cr**********@nospam.nospam> wrote in message
news:2E**********************************@microsof t.com...
OK, but I still miss one think.
If I use Syste.Data in my app, then the public key of system.data is
stored
in my app and it is used to decript the assembly when loaded.

Moving to mono, my app still use the stored public key of system.data (the
microsoft .net one) to decrypt and load the System.Data of mono.
So I guess that the System.Data of mono must be signed with the same key
of
the microsoft one.

What am I missing?

Cristian
""TerryFei"" wrote:
Hi Cristian,

For the execution of the .Net application, all its referenced assemblies
should be found. If not, the application will not run. In Microsoft .Net
Framework, the CLR(common language runtime) will load the referenced
strong-name assembly from GAC or its private directory according to the
probing steps listed at the previous post.

It should be the same in MONO. When MONO loads the application, it should
search the referenced assembly and then load it for the execution. Since
MONO is a virtual machine as the same the MS .net CLR, it should have the
corresponding location to store the strong-name assemblies, as the GAC in
MS .Net.

For your scenario, MONO should firstly locate the System.Data from its
GAC.
Then the application could run smoothly. This is the reason why your
application could run without any error.

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 3 '05 #6
Hi Cristian,

The SN.exe utility of .Net Framework is used to generate public key for
assembly and it ensure the produced key globally unique. As I know,
Microsoft should not have shared the public key with MONO. So the
System.Data assembly of mono should not has the same public key as the same
to .Net System.Data Assembly. So I think MONO should has some internal
implementation to support referencing .Net provided strong-name assembly,
for example System.Data etc. This should be one MONO compatible design.

Best Regards,

Terry Fei[MSFT]
Microsoft Community Support
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 4 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1847
by: Reinhold Schalk | last post by:
Hello, somewhere i've read that using strong names does assure two things: 1. Assure that the content of the assembly is not modified (that's ok in my opinion) 2. Assure that the assembly is...
3
3140
by: bob | last post by:
Hello, I thought assembly signing might add protection against people reverse engineering my program, removing the protection and using it illegally. But it seems they can just stop the clr...
2
2711
by: Henrik Skak Pedersen | last post by:
Hello, I have a class which is beeing serialized/deserialized using the BinaryFormatter class. That has been working with no problems until I signed all my assemblies. Now I get a...
2
3583
by: steve bull | last post by:
When I run FXCop(1.32) against my project I keep getting the error "Assemblies should have strong names" and cannot get rid of the message. I edited the assembly info :
1
1667
by: AVL | last post by:
Hi I need some clarification on signing. what does it mean--signing an assembly? where is ti used? How is it used?
3
4385
by: Richard Lewis Haggard | last post by:
We are having a lot of trouble with problems relating to failures relating to 'The located assembly's manifest definition with name 'xxx' does not match the assembly reference" but none of us here...
1
14474
by: Jason Richmeier | last post by:
I have encountered an error while attempting to sign an assembly. I have become quite frustrated since I seem to be going in circles and making no progress. Hopefully someone will have the magic...
3
17578
by: groovyjman21 | last post by:
Hi, I am using FXCop on my c# project and it is complaining about signing the assembly with a strong name key. All the documentation I can find says to do: using System.Reflection; .... ...
1
1638
by: GMiller | last post by:
I'm trying to sign my assembly so that I can use the caspol.exe tool to create a permissions set for it. This is my first experience signing the assembly. In VS 2005 I went to...
0
1012
by: adam3223 | last post by:
I have a mixed code dll which will be used by many developers to build applications on top of. I've read signing an assembly is recommended to rule out any naming conflicts, and increase security....
0
7166
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7543
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7106
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5689
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5094
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4749
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3236
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3226
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
459
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.