package awa

  1. Overview
  2. Docs
type compression_alg =
  1. | Nothing
val compression_alg_of_string : string -> (compression_alg, string) Stdlib.result
val compression_alg_to_string : compression_alg -> string
type alg =
  1. | Diffie_hellman_group_exchange_sha256
  2. | Diffie_hellman_group14_sha256
  3. | Diffie_hellman_group14_sha1
  4. | Diffie_hellman_group1_sha1
  5. | Diffie_hellman_group_exchange_sha1
  6. | Curve25519_sha256
  7. | Ecdh_sha2_nistp256
  8. | Ecdh_sha2_nistp384
  9. | Ecdh_sha2_nistp521
val is_rfc4419 : alg -> bool
val is_finite_field : alg -> bool
val alg_of_string : string -> (alg, string) Stdlib.result
val alg_to_string : alg -> string
val group_of_alg : alg -> Mirage_crypto_pk.Dh.group
val hash_of_alg : alg -> (module Digestif.S)
val supported : alg list
val make_kexinit : ?ext_info:[ `Ext_info_c | `Ext_info_s ] -> Hostkey.alg list -> alg list -> unit -> Ssh.kexinit
type negotiation = {
  1. kex_alg : alg;
  2. server_host_key_alg : Hostkey.alg;
  3. encryption_alg_ctos : Cipher.t;
  4. encryption_alg_stoc : Cipher.t;
  5. mac_alg_ctos : Hmac.t;
  6. mac_alg_stoc : Hmac.t;
  7. compression_alg_ctos : compression_alg;
  8. compression_alg_stoc : compression_alg;
}
val pp_negotiation : Stdlib.Format.formatter -> negotiation -> unit
val guessed_right : s:Ssh.kexinit -> c:Ssh.kexinit -> bool
val negotiate : s:Ssh.kexinit -> c:Ssh.kexinit -> (negotiation, string) Stdlib.result
type keys = {
  1. cipher : Cipher.key;
  2. mac : Hmac.key;
  3. seq : int32;
  4. tx_rx : int64;
}
val make_plaintext : unit -> keys
val is_plaintext : keys -> bool
val is_keyed : keys -> bool
val one_GB : int64
val one_minute_ns : int64
val keys_lifespan : Mtime.span
val should_rekey : int64 -> Mtime.t -> Mtime.t -> bool
val derive_keys : (((string -> unit) -> unit) -> string) -> Z.t -> string -> string -> negotiation -> Mtime.t -> (keys * keys * Mtime.t, string) Stdlib.result
module Dh : sig ... end
OCaml

Innovation. Community. Security.