The best way to sign and verify signature using bouncycastle

classic Classic list List threaded Threaded
1 message Options
shu
Reply | Threaded
Open this post in threaded view
|

The best way to sign and verify signature using bouncycastle

shu
Helllo!
I tried to sign and verify signature using bouncycastle from secret key
file generated by openssl command (using ECDSA).

I used PEMParser and JcaPEMKeyConverter to read key and get KeyPair
Instance(java.security.KeyPair).
Then, I used java native classes to sign and verify signature (e.g.
java.security.Signature).

Is this a correct and general way?
Please tell me if there is better and general way.

This is the code.
https://gist.github.com/shu22203/5b2cc0421899670cc4b048229195e814

Greetings
Shu