473,405 Members | 2,262 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,405 software developers and data experts.

Digital Signature

11
We are developing a PKI Web application using Microsoft Visual Studio.Net 2003(ASP.net-C#) integrated with WSE 1.0 and IIS. We use Windows 2003 Server for user management through Active directory and to issue X.509 certificates for the client.

We use ActiveX to get client's certificate details and to create the XML the digital signature using senders private key.

What i want yo know is to sign the document not only using senders private key as well as from receivers public key.Then only specifis receiver can veiw the document.
It is difficult to get the receiver's public key.How can i do it?
i attached some code below.
Hope u'l help me with this.

Thanku you.
Hirannya

to sign the document we use

Microsoft.Web.Services.Security.X509.X509Certifica te Cert=Store.Certificates[0];
RSA key =Cert.Key;
if(SignXmlFile(_Path+@"\"+_TEFNo+".xml", key))
{blnSigned=true;
}

in SignXmlFile method we use ComputeSignature.

// Create a SignedXml object.
System.Security.Cryptography.Xml.SignedXml signedXml = new System.Security.Cryptography.Xml.SignedXml(doc);
// Add the key to the SignedXml document.
signedXml.SigningKey = Key;
// Create and append the data object
System.Security.Cryptography.Xml.DataObject dataObject = new System.Security.Cryptography.Xml.DataObject();
dataObject.Data = doc.ChildNodes;
//dataObject.Data = c.ChildNodes;
dataObject.Id = "SignVerify";
System.Security.Cryptography.Xml.Reference reference = new System.Security.Cryptography.Xml.Reference();
reference.Uri ="";

XmlDsigEnvelopedSignatureTransform env = new XmlDsigEnvelopedSignatureTransform();

reference.AddTransform(env);
signedXml.AddReference(reference);

// Create a new KeyInfo object.
KeyInfo keyInfo = new KeyInfo();
keyInfo.AddClause( new RSAKeyValue(Key) );

signedXml.KeyInfo=keyInfo;
signedXml.AddObject(dataObject);
// Compute the signature.
signedXml.ComputeSignature();
Dec 19 '06 #1
1 1327
(a) It might not be a bad idea to work with WSE as high as 3.0.


(b) Maybe you want to encrypt the xml instead of signing it?
I might be wrong, but I think it works roughly like this:

If you sign with your private key, everyone can use your public key to check that the document comes from you (by verifying the signature).

If you encrypt a document with someone's public key, that person would be "the only one" to be able to read it.


(c) If you want to add some extra information about the key into the signature, you can use the keyInfo.AddClause() method.

You can take a look at my sample code on signing xml with WSE 3.0, too.
Mar 12 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Kim H Madsen | last post by:
I have created a .Net Service that is sending mails using SMTP Server/Exchange Server how do i put in a Digital Signature so the reciver is 100% sure that the mail i from the owner of Server where...
7
by: Guangxi Wu | last post by:
Hi all, Happy New Year. I am using SignedXML and an X509 certificate to digitally sign a SOAP message body and put the signature in the SOAP header for a B2B business application. Can you...
5
by: John Campbell | last post by:
Hi everyone I've been doing my best to understand the specifics of implimentating XML Digital Signatures, but I seem to be missing a fundamental concept. Let me start with a description of the...
0
by: CLarkou | last post by:
I bought a digital signature for my MSaccess application in Office 2003. I select TOOLS\Digital Signatures in Visual Basic Editor and I am not able to see my digital signature in the available...
2
by: Martin Høst Normark | last post by:
Hi everyone Has anyone got the least experience in integrating the Digital Signature with an ASP.NET Web Application? Here in Denmark, as I supose in many other countries, they're promoting...
6
by: Matt Frame | last post by:
I have a client that has asked us to get a digital signature certificate and start digitally signing all files we pass between each other. I have heard of the subject and know about the certs but...
1
by: claudia_usa | last post by:
Hello, Does anyone know how to include the signature field when creating PDF crystal reports with VB.net? Our intension is to allow the user to generate the report with their digital signature...
0
by: Geagleeye | last post by:
Hi everyone. I have some vba code to generate a pdf document through word, and add also digital signature. My problem is : how can i change the way the signature layout, it always show the...
3
by: itcoll | last post by:
i have wriiten java code for client server communication - the client sends a digital signature and the server verifies it using the public key .I have sent the signature as a string from the client...
3
by: tmoloy | last post by:
I am using RFID tags to store some data which will then be read by a 3rd party. I need to include a digital signature (or some variation) along with the data so that the 3rd party can verify the...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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.