Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Decrypt DSA signature

Thread Tools

Decrypt DSA signature
Posts: n/a

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

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
DSA anywhere..

Thanks for any help in advance
Dave Tunnicliff

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Turning a signature-changing decorator into a signature-preservingone Gustavo Narea Python 14 02-16-2009 04:58 PM
decrypt challenge - perl encrypt with ruby decrypt Ruby 1 06-16-2007 01:30 PM
Decrypt DSA info EdUarDo Java 1 12-29-2005 07:19 PM
Cryptix OpenPGP - DSA algorithm not found/DSA Signature not available Java 2 09-28-2005 07:28 AM
UTF-8 with signature & UTF-8 without signature JJBW ASP .Net 1 04-24-2004 10:21 AM