Module Kex.Dh

val derive_keys : Z.t -> Stdlib.String.t -> Stdlib.String.t -> negotiation -> Mtime.t -> (keys * keys * Mtime.t, string) Stdlib.result
val compute_hash : negotiation -> v_c:string -> v_s:string -> i_c:string -> i_s:string -> k_s:Hostkey.pub -> e:Z.t -> f:Z.t -> k:Z.t -> string
val compute_hash_ec : negotiation -> v_c:string -> v_s:string -> i_c:string -> i_s:string -> k_s:Hostkey.pub -> q_c:string -> q_s:string -> k:Z.t -> string
val compute_hash_gex : negotiation -> v_c:string -> v_s:string -> i_c:string -> i_s:string -> k_s:Hostkey.pub -> min:int -> n:int -> max:int -> p:Z.t -> g:Z.t -> e:Z.t -> f:Z.t -> k:Z.t -> string
val secret_pub : alg -> Mirage_crypto_pk.Dh.secret * Z.t
val shared : Mirage_crypto_pk.Dh.secret -> Z.t -> (Z.t, string) Stdlib.result
val ec_secret_pub : alg -> [> `Ed25519 of Mirage_crypto_ec.X25519.secret | `P256 of Mirage_crypto_ec.P256.Dh.secret | `P384 of Mirage_crypto_ec.P384.Dh.secret | `P521 of Mirage_crypto_ec.P521.Dh.secret ] * string
val ec_shared : [< `Ed25519 of Mirage_crypto_ec.X25519.secret | `P256 of Mirage_crypto_ec.P256.Dh.secret | `P384 of Mirage_crypto_ec.P384.Dh.secret | `P521 of Mirage_crypto_ec.P521.Dh.secret ] -> string -> (Z.t, string) Stdlib.result
val generate : alg -> Z.t -> (Z.t * Z.t, string) Stdlib.result