package conex

  1. Overview
  2. Docs
include Conex_crypto.SIGN_BACK
val pub_of_priv_rsa : string -> (string, string) Stdlib.result

pub_of_priv_rsa priv is either Ok pub or Error str. The encoding is left to the provider, usual PKCS8 PEM encoding works fine.

val bits_rsa : string -> (int, string) Stdlib.result

bits_rsa pub is the number of bits in pub.

val generate_rsa : ?bits:int -> unit -> string

generate_rsa ~bits () generates an RSA private key with bits size.

val sign_rsa_pss : key:string -> string -> (string, string) Stdlib.result

sign_rsa_pss ~key data is either Ok signature or Error str.

OCaml

Innovation. Community. Security.