Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Decoding DSA Signatures

843810Jul 5 2001 — edited Jul 10 2001
Hello, I am in dire need of help.

I have written code to digitally sign data with DSA, but I am having trouble figuring out how to interpret the signature.

A digital DSA signature is supposed to have an R and an S value. All the examples I have found seem to imply that both R and S should be 20 bytes long, but the signature byte array returned by the sign() method of a signature object is 46 bytes long.

How am I to interpret the 46 bytes. I need the individual R and S values to write to a file!

I have read somewhere that the class sun.security.util.DerValue should be used, but I can't even begin to understand how.

I am at wits end with this problem, so if you know the answer, please email me right away. I will be in your debt.

Thanks very much.

Greg Levonian
gregory@levonian.com

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 7 2001
Added on Jul 5 2001
3 comments
474 views