Decrypt DSA signature

Discussion in 'ASP .Net Security' started by davetunnicliff@gmail.com, Jul 14, 2005.

  1. Guest

    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
    , Jul 14, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JJBW
    Replies:
    1
    Views:
    10,052
    Joerg Jooss
    Apr 24, 2004
  2. Replies:
    2
    Views:
    4,887
  3. EdUarDo

    Decrypt DSA info

    EdUarDo, Dec 29, 2005, in forum: Java
    Replies:
    1
    Views:
    587
    Roedy Green
    Dec 29, 2005
  4. Gustavo Narea
    Replies:
    14
    Views:
    847
    Gustavo Narea
    Feb 16, 2009
  5. Replies:
    1
    Views:
    422
    Daniel Martin
    Jun 16, 2007
Loading...

Share This Page