Reputation:
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?
Upvotes: 10
Views: 1782
Reputation: 121
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.
Upvotes: 2