                                                       (.getH parameter-spec) (.getSeed parameter-spec)))]
         (case type
           :public (.generatePublic kf spec)
-          :private (.generatePublic kf spec)))
+          :private (.generatePrivate kf spec)))
       (throw (Exception. (format "Key size(%d) does not match with the chosen curve(%d)" key-size curve-size))))))
 ;; (b64/decode (.getBytes "BOg4fylDlzNxMFFTvtQBRsakfxaBJBPJf25sx8Iaim8v3h0ml9mnNCrUVJjBAeXyeGAX69NbAxbaAkNHT+6gJtU="))
 ;; (def x (Arrays/copyOfRange *1 1 65))

  Returns
        Result(Object):Signature object"
  [^bytes digest priv-key {:keys [algorithm]}]
  (let [signature (Signature/getInstance (name algorithm))]
    (.initSign signature priv-key)
    (.update signature digest)
    (.sign signature)))

;;; verify
(defn verify

;;;
;;; Interface
;;;
;;; 'opts' is CryptoSuite
;;; 
(defrecord CryptoSuite [security-provider key-algorithm curve-name hash-algorithm])
(defn make-crypto-suite
  [{:keys [security-provider key-algorithm curve-name hash-algorithm]
