How to sign certificates with elliptic curve private keys and ECDSA algorithm?

I can sign certificates using a bouncy castle with RSA secret keys and SHA256withRSA algorithm. For this I used the link below for the link. Sign CSR with Bouncy Castle

I now have my CAs with elliptic curve keys signed with ECDSA. So I want these certificates to sign certificates with EC key and SHA256withECDSA algorithm. However, I am sticking to below RSA key specific snippet, I want to use EC key.

ContentSigner sigGen = new BcRSAContentSignerBuilder(sigAlgId, digAlgId).build(privateKeyParam);

      

Please help me how can we achieve certificate signing using ECDSA and EC keys

+3


source to share


1 answer


Below is the code used to sign certificates with EC private keys



ContentSigner sigGen = new JcaContentSignerBuilder("SHA256withECDSA").build(new JcaPEMKeyConverter().getPrivateKey(PrivateKeyInfo));

      

+1


source







All Articles