title: How to create ECDSA keypair (256bit) for bitcoin curve (secp256k1) using spongy castle?
body: <p>Currently, I am creating keyPair using this method</p>
  
  <pre><code>private  KeyPair getKeyPair() throws NoSuchAlgorithmException, NoSuchProviderException, InvalidAlgorithmParameterException {
      KeyPairGenerator keyGen = KeyPairGenerator.getInstance("ECDsA", "SC");
      ECGenParameterSpec ecSpec = new ECGenParameterSpec("secp256k1");
      keyGen.initialize(ecSpec, new SecureRandom());
      return keyGen.generateKeyPair();
  }
  </code></pre>
  
  <p><code>KeyPairGenerator</code> has another method, in which I can specify keySize but I am not sure how I will pass the keySpecs?</p>
  
  <pre><code> public void initialize(int keysize, SecureRandom random)
  </code></pre>