sig
exception Invalid_public_key
type group = { p : Z.t; gg : Z.t; q : Z.t option; }
type secret = private { x : Z.t; }
val modulus_size : Nocrypto.Dh.group -> int
val key_of_secret :
Nocrypto.Dh.group -> s:Cstruct.t -> Nocrypto.Dh.secret * Cstruct.t
val gen_key :
?g:Nocrypto.Rng.g ->
?bits:int -> Nocrypto.Dh.group -> Nocrypto.Dh.secret * Cstruct.t
val shared :
Nocrypto.Dh.group -> Nocrypto.Dh.secret -> Cstruct.t -> Cstruct.t option
val gen_group : ?g:Nocrypto.Rng.g -> int -> Nocrypto.Dh.group
module Group :
sig
val oakley_1 : Nocrypto.Dh.group
val oakley_2 : Nocrypto.Dh.group
val oakley_5 : Nocrypto.Dh.group
val oakley_14 : Nocrypto.Dh.group
val oakley_15 : Nocrypto.Dh.group
val oakley_16 : Nocrypto.Dh.group
val oakley_17 : Nocrypto.Dh.group
val oakley_18 : Nocrypto.Dh.group
val rfc_5114_1 : Nocrypto.Dh.group
val rfc_5114_2 : Nocrypto.Dh.group
val rfc_5114_3 : Nocrypto.Dh.group
val ffdhe2048 : Nocrypto.Dh.group
val ffdhe3072 : Nocrypto.Dh.group
val ffdhe4096 : Nocrypto.Dh.group
val ffdhe6144 : Nocrypto.Dh.group
val ffdhe8192 : Nocrypto.Dh.group
end
val group_of_sexp : Sexplib.Sexp.t -> Nocrypto.Dh.group
val sexp_of_group : Nocrypto.Dh.group -> Sexplib.Sexp.t
val secret_of_sexp : Sexplib.Sexp.t -> Nocrypto.Dh.secret
val sexp_of_secret : Nocrypto.Dh.secret -> Sexplib.Sexp.t
end