Date: Fri, 10 Jul 1998 14:21:26 -0700 (PDT)
From: Jan Luehe <Jan.Luehe@Eng>
Subject: Re: Problem with DSA sign/verify
To: java-security@java.Sun.COM, Sangeeta.Varma@Eng
Sangeeta:
You have to feed the original data to the Signature
object before you call its verify() method with the
signature bytes.
When you add:
signObj.update(inputNum, 0, inputNum.length);
before
signObj.verify(signature)
in your program, everything works fine.
Jan
> Date: Fri, 10 Jul 1998 14:08:30 -0700 (PDT)
> From: Sangeeta Varma <Sangeeta.Varma@Eng>
> Subject: Problem with DSA sign/verify
> To: java-security@java.Sun.COM
> MIME-Version: 1.0
>
>
> Hi,
>
> I have a very simple program which makes use of the javasoft's provider for
> DSA key gen and signature. I generate a pair of keys, and then use the
> private key to sign a piece of data, and want to verify it using the public
key
> generated. The program is always unable to verify the data. I do the same
steps
> with an RSA provider that I have written, and this test program works fine.
>
> Is there a problem with the DSA sign/verify or am I missing something here ?
>
> Thanks!
> Sangeeta