Click here to Skip to main content
15,888,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

If we signed a XML file using C# XML (System.Security.Cryptography.Xml); Will the digital signature same when we create a digital signature using VC++ CryptoAPI for XML file.

Thanks
Prashant Joseph.
Posted

1 solution

No. It's never the same, practically, otherwise the signature would not protect anything. :-)

[EDIT]

From OP reply I feel this is not clear. See my comment below. It needs understanding of some fundamentals.
Read:
http://en.wikipedia.org/wiki/Public-key_cryptography[^],
http://en.wikipedia.org/wiki/Digital_signature[^].

—SA
 
Share this answer
 
v2
Comments
Prashant 1986 14-Jul-11 0:56am    
I am still confuse, how it will be different even if i used a same XML file data and same private key & public key.

What things make the difference?
Sergey Alexandrovich Kryukov 19-Jul-11 17:44pm    
I mean that each digital signature is unique, with high chance to be world-unique. The uniqueness is started from the moment one creates a pair of keys. If the algorithm is the same, it is compatible across platforms though. This is not only about CryptoAPI, which is the common base API for .NET for Windows and native Windows API. If you pass a public key to a program in different platform, it can be used to validate the signature as well. How do you things digital certificates used to sign resources with HTTPS protocol work? You create a certificate on some platform (or VerySign does, for example), and it is validated on all kinds of platforms. Same things stands for any other resources which authenticity is protected with digital signature.
--SA
Sergey Alexandrovich Kryukov 19-Jul-11 17:46pm    
Please see the references in the updated solution.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900