Decrypt DSA signature

D

davetunnicliff

Hi,

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:
http://www.address.here/appname/page.aspx?key1=value1&key2=value2&sig=digitalsighere

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 :eek:) )

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
used"
^-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
DSA anywhere..

Thanks for any help in advance
Dave Tunnicliff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top