         “ephemeral”.
   Returns
         Result (Key): The key object"
-  [algorithm ephemeral]
+  [algorithm {:keys [curve ephemeral]}]
   (let [generator (-> algorithm
                       name
                       (KeyPairGenerator/getInstance BouncyCastleProvider/PROVIDER_NAME))
-        param-specs (-> ephemeral name ECNamedCurveTable/getParameterSpec)]
+        param-specs (-> curve name ECNamedCurveTable/getParameterSpec)]
     (.initialize generator param-specs (SecureRandom.))
     (.generateKeyPair generator)))
-;; (generate-key :ECDSA :secp256r1)
-
+;;;
+;;; Ex - (generate-key :ECDSA :secp256r1)
+;;; 
 
 (defprotocol IBCECKey
   (algorithm [this])
   (curve-spec [this])
   (curve-params [this])
-  (%derive-key [this]))
+  (%derive-key [this opts]))
 
 (defn- %curve-params [params]
   ;; (.multiply g (biginteger 100000000000000000000))

(ns clojure-fabric.crypto-suite
  (:import [org.bouncycastle.crypto.generators ECKeyPairGenerator]
           [org.bouncycastle.jce ECNamedCurveTable]
           [org.bouncycastle.jce.spec ECNamedCurveParameterSpec ECParameterSpec ECNamedCurveSpec]
           [org.bouncycastle.jce.provider BouncyCastleProvider]
           [org.bouncycastle.jcajce.provider.asymmetric.ec KeyPairGeneratorSpi$ECDSA
            BCECPrivateKey BCECPublicKey]
           [java.security KeyPairGenerator SecureRandom Security])
  (:refer-clojure :exclude [hash]))

;; Add provider!
(Security/addProvider (BouncyCastleProvider.))

  ;; Derives the new private key from the source public key using the parameters passed in the opts.
  ;; This operation is needed for deriving private keys corresponding to the Transaction
  ;; Certificates.
  ;;
  ;; Implementation Note:
  ;;    Only Go SDK implements this function(and hard to understand Go code!).
  ;;    Wait until ithere are test cases to check correctness
  ;;
  ;; (def kp (generate-key :ECDSA :secp256r1))
  ;; (def pri (.getPrivate kp))
  ;; (def pub (.getPublic kp))
  ;; (derive-key pri {})
  ;; 
  (%derive-key k opts))

;;; importKey
