473,395 Members | 2,079 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Extraction of signed .NET assembly public key

Nak
Hi there,

I have made a class for signing and verifying XML files using the
SignedXML class in the .NET Framework. What I would like to do is use the
same Private key that I digitally sign my assembly with to sign an XML file
and then within the application check that the XML file will verify with the
public key that is embedded within the assembly. Hopefully this will make
things more secure than having a resource file containing the public key or
a literal string with the key, any ideas? Thanks loads in advance!

Nick.
Nov 21 '05 #1
3 3510
Hi Nick,

When we sign an assembly, the public will be saved in its metadata. If you
look at an assembly's manifest using ILDASM, you'll be able to see its
public key quite plainly. Therefore, I don't think it will be safer than
having a resource file containing the public key or a literal string with
the key.

Luke

Nov 21 '05 #2
To get the public key from an assembly, you can use the sn.exe:

sn -Tp foo.dll
Luke

Nov 21 '05 #3
Nak
Hi Luke,
When we sign an assembly, the public will be saved in its metadata. If you
look at an assembly's manifest using ILDASM, you'll be able to see its
public key quite plainly. Therefore, I don't think it will be safer than
having a resource file containing the public key or a literal string with
the key.


Maybe "Safety" wasn't the correct word to use, but more like
convenience, I think it makes more sence to use only 1 set of keys rather
than creating a new set each time, it's not as if someone is going to brute
force crack it is it? :-) It would just mean that I can publish the
"public" key on my web site also and inform people what the correct public
key is. This 1 set of keys can then sign my applications and licenses. But
maybe the other approach is much easier to perform, I was just a little
unsure as to whether initialising a string containing my public key was the
*correct* way or not. Cheers all the same, I shall get cracking (so to
speak).

Nick.
Nov 21 '05 #4

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

Similar topics

1
by: John | last post by:
Hi, I am building an application that uses Steema's TeeChart. When I run my app through the dotfuscator it breaks the executable (saying something about not finding the strongly named TeeChart...
2
by: Bob Rock | last post by:
Hello, is it possible to programmatically read (and how) the public key that is embedded into an assembly that has been strongly signed??? What code would be needed??? Bob Rock
3
by: wschaub | last post by:
We need to inject information (i.e. server details from where a signed file was downloaded) into a signed file, without breaking the signature or integrity of a signed file. Apparently there are...
4
by: Fredo | last post by:
I'm not sure if this is possible, but I have a socket server app and a client app. I need to convince the server that the application is signed with the same key as the server. Is there a way to do...
0
by: Andy | last post by:
Hi all, I have a few questions about restricting who may call an assembly i'm building. First, I have a business assembly on a web server, with Serializable objects that use remoting to move...
0
by: inpuarg | last post by:
I have more then 5 projects in one solution. (c# VS 2005) GUI , BOL , DAL , Common Library , Extended Grid Component etc. All are compiled as strongly named assemblies. I am using public...
3
by: pranesh.nayak | last post by:
Hello group, I'm facing a problem in calling a signed .Net class library (c#) from VB6 exe. I have a VB6 exe calling .net assembly. The call to .Net dll works fine when i deploy the .Net...
2
by: Thomas T. Veldhouse | last post by:
Hello. I have been working with a client of mine on their seriazation code and we seem to have run into an issue when we migrated from .NET 1.1 to .NET 2.0. We have a framework of business...
0
by: savajx1 | last post by:
I am loading signed assemblies from a network share. The assemblies are NOT INSTALLED in the GAC as they are part of an enterprise distributed application implemented as a windows service that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.