The algorithm URI, at least for the asymmetric key oriented ones (i.e.
not HMAC which uses symmetric keys), usually represents both a choice a
key type (RSA vs. DSA vs. ECDSA etc) + a digest algoritm (MD5 vs. SHA-1
vs. SHA-256 etc). So there isn't just one single signature algorithm
URI for a
Ah, I hadn't realized I actually need a different type of key. That
explains why RSA is what I get by default. Thanks for pointing out my error!
That does make me wonder why there's even an option to set the
algorithm, though, if it's determined by the key type.
- Dennis
Brent Putman wrote
Well, it appears you are in fact trying to use an RSA key:
org.bouncycastle.jce.provider.JCE*RSA*PrivateCrtKey
So that won't work. Realize you do have to have an instance of a DSA
key to use the DSA signature algorithm.
Are you sure you don't have a typo somewhere when you generated the key