Decrypt DSA signature
Any help on this would be gratefully received as I just don't seem to
be getting anywhere with it!!
I am developing an Asp.Net c# email application that runs alongside a
Java application. The Java application passes the email application a
query string containing all the necessary contact information the email
needs. The Java application passes a signature on the end of the query
string of the url which needs to be verified when the c# email app
receives the information to ensure it has come from the correct source
(i.e. stop spamming and unauthorised use of the email app).
The url appears as:
where the signature has been created to sign the
key1=value1&key2=value2 section of the url.
The Java app uses DSA/SHA1 to create the signature and then base64 for
character encoding when passing it across. A certificate was also
created by the java guys which hold the public key.
So I receive the query string and strip it down so I have the digital
signature and the key value pairs which the signature is signing. I
install the certificate and then i have adopted a P/Invoke method to
retrieve the public key out of the certificate. I then take the
signature and put it in a byte array after converting it from base64. I
then take the key1=value1&key2=value2 section of the url and convert it
into bytes, then hash it using sha1. (If this is incorrect up to this
stage please someone point out my errors :o) )
A lot of examples of this seem to say:
"Upon receiving the message and signature, the receiver decrypts the
signature using the sender's public key to recover the message digest
and hashes the message using the same hash algorithm that the sender
^-taken from msdn library DSACryptoServiceProvider Class
My question is, how to i decrypt the signature using the public key in
DSA? I can't seem to find any help or examples on how to do this using
Thanks for any help in advance
|All times are GMT. The time now is 09:18 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.