Module Upsycle_router.Crypto

module MC25519 := Mirage_crypto_ec.Ed25519
module SD := Seaboar.Decode
module SE := Seaboar.Encode
val pubkey_to_cstruct : pubkey -> Cstruct.t
val pubkey_of_string : string -> pubkey rresult
val pubkey_of_yaml : Yaml.value -> pubkey Yaml.res
val pubkey_to_yaml : pubkey -> Yaml.value
val sign : privkey -> string -> string
val verify : pubkey -> string -> string -> bool

Be sure to call `Util_crypto_io.init` before using this.

val generate_key_pair : ?g:Mirage_crypto_rng.g -> unit -> privkey * pubkey

Be sure to call `Util_crypto_io.init` before using this.

val pubkey_of_certfile : ?quiet:bool -> command -> string -> pubkey rresult
val pubkey_of_certfile_exn : ?quiet:bool -> command -> string -> pubkey
val pubkey_of_keyfile : ?quiet:bool -> command -> string -> pubkey rresult
val pubkey_of_keyfile_exn : ?quiet:bool -> command -> string -> pubkey
val privkey_of_keyfile : ?quiet:bool -> command -> string -> privkey rresult
val privkey_of_keyfile_exn : ?quiet:bool -> command -> string -> privkey

Derive the corresponding public key for a private key.

val pubkey_of_privkey : privkey -> pubkey

Derive the corresponding public key for a private key.

val pubkey_of_keystring_or_file_exn : ?base_dir:string -> command -> string -> pubkey
val fingerprint_ed25519_sha256 : pubkey -> Mirage_crypto.Hash.hash * Cstruct.t
module Mk : sig ... end