I am trying to implement ECDSA (Elliptic Curve Digital Signature Algorithm), but I could not find Java examples that use Bouncy Castle. I created the keys, but I really do not know what functions I should use to create the signature and verification.
public static KeyPair GenerateKeys() throws NoSuchAlgorithmException, NoSuchProviderException, InvalidAlgorithmParameterException { ECParameterSpec ecSpec = ECNamedCurveTable.getParameterSpec("B-571"); KeyPairGenerator g = KeyPairGenerator.getInstance("ECDSA", "BC"); g.initialize(ecSpec, new SecureRandom()); return g.generateKeyPair(); }
java cryptography bouncycastle
Yagiz
source share