         opts (Object)
   Returns
         (Key) derived key"
-  [k {:keys [ephemeral] :as opt}]
+  [k opts]
   ;; From JS SDK doc
   ;; 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.
-
-  ;; From Go SDK
-  ;;
-  ;;1. 
-  )
-
-
-
-
+  (%derive-key k opts))
 
 ;;; importKey
 (defn import-key

          ((juxt #(.getCurve ^ECParameterSpec %) #(.getG ^ECParameterSpec %) #(.getH ^ECParameterSpec %)
                 #(.getN ^ECParameterSpec %))
           params)))

(extend-type BCECPrivateKey
  IKey
  (algorithm [this] (-> this .getAlgorithm keyword))
  (curve-spec [this] (keyword (.getName ^ECNamedCurveSpec (.getParams this))))
  (curve-params [this] (-> this .getParameters %curve-params)))

(extend-type BCECPublicKey
  IKey
  (algorithm [this] (-> this .getAlgorithm keyword))
  (curve-spec [this] (keyword (.getName ^ECNamedCurveSpec (.getParams this))))
  (curve-params [this] (-> this .getParameters %curve-params)))

;;; http://www.bouncycastle.org/wiki/display/JA1/Elliptic+Curve+Key+Pair+Generation+and+Key+Factories
;;;deriveKey

;; (generate-key :ECDSA :secp256r1)


(defprotocol IBCECKey
  (algorithm [this])
  (curve-spec [this])
  (curve-params [this])
  (%derive-key [this]))

(defn- %curve-params [params]
  ;; (.multiply g (biginteger 100000000000000000000))
