Decoding DSA Signatures
843810Jul 5 2001 — edited Jul 10 2001Hello, 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