I have a file created using SignedXml class in "normal" .NET framework. It's signed using RSA algorithm. I'd like to check its signature using XDocument in a Windows RT application, what is the best way to do it? Port some crypto library or are there any other alternatives?
Asked
Active
Viewed 1,680 times
10
-
In WinRT you can use our SecureBlackbox, it offers wide scope of functionality including XMLDSig/XAdES and is available for WinRT. – Eugene Mayevski 'Callback Jun 28 '13 at 16:23
-
Thanks, but I'd like to do it using native tools/free code/my own code. Didn't find the way to accomplish this task so far with 1st one. – Jun 30 '13 at 14:59
-
This is a pretty cool question. I hope to see a reasonably thorough answer. – vcsjones Jul 01 '13 at 00:49
-
Certainly you can use the [Windows CryptographicEngine](http://msdn.microsoft.com/en-us/library/windows/apps/windows.security.cryptography.core.cryptographicengine.verifysignaturewithhashinput.aspx) You just have to make the digest yourself, which i'd assume wouldn't be too hard [XML Signature: How to calculate the digest value?](http://stackoverflow.com/questions/2245320/xml-signature-how-to-calculate-the-digest-value) – jbtule Jul 01 '13 at 13:34
2 Answers
2
originally it was my question and I don't know why my account was wiped from the site.Hope moderators can help with it.
@borrel, probably I didn't look too deep but anyway if you are developing something portable to get it working on Windows Phone 8, this thing doesn't exist for you. No SignedXml in winrt
I found an answer, so steps are
1) you have to calculate the SHA1 hash of the canonical representation of you XML data. My signature was RSA-SHA1, so needed this to get the digest value.
in "normal" framework you would use XmlDsigc14nTransform class
Mono code provides nice samples on how you may implement this
2) use bouncy castle library to verify the rsa signature for this digest.

Mico
- 121
- 1
-
-
you can raise an issue at meta.stackoverflow.com to ask the moderators why your account was banned. – vcsjones Jul 08 '13 at 12:41