package conex

  1. Overview
  2. Docs
val generate : ?bits:int -> Conex_utils.Uint.t -> unit -> Conex_resource.Key.priv

generate ?bits created () generates a bits sized private key.

val pub_of_priv : Conex_resource.Key.priv -> (Conex_resource.Key.t, string) Stdlib.result

pub_of_priv priv extracts the public key from the private.

val bits : Conex_resource.Key.t -> (int, string) Stdlib.result

bits pub returns the bit size of the public key.

sign created author priv uses Conex_resource.Author.prep_sig to prepare author (incrementing counter, moving queued resource to signed). Conex_resource.Signature.wire is used to produce the to-be-signed data. This includes the author name, and the signature algorithm (at the moment RSA-PSS-SHA256).

OCaml

Innovation. Community. Security.