         digest (byte[]) original digest that was signed
   Returns
         (bool): verification successful or not"
-  [key signature digest])
+  [pub-key signature ^bytes digest {:keys [algorithm]}]
+  (doto (Signature/getInstance (name algorithm))
+    (.initVerify pub-key) ;; pub-key type is unknown :(
+    (.update digest)
+    (.verify signature)))
 
 #_
 (comment


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

;;;generate_key
(defn generate-key

        opts (Object)
  Returns
        (byte[]) Plain text"
  [k cipher-text {:keys [algorithm] :as opts}]
  (%encrypt-or-decrypt k cipher-text (assoc opts :cipher-mode :decrypt)))

;;;sign
(defn sign
