`sig
type oid = Netoid.t
type alg_id = Alg_id of Netx509_pubkey.oid * Netasn1.Value.value option
type pubkey = {
pubkey_type : Netx509_pubkey.alg_id;
pubkey_data : Netasn1.Value.bitstring_value;
}
type hash_function = [ `SHA_1 | `SHA_224 | `SHA_256 | `SHA_384 | `SHA_512 ]
type maskgen_function = [ `MGF1 of Netx509_pubkey.hash_function ]
type alg_param =
P_PSS of Netx509_pubkey.hash_function *
Netx509_pubkey.maskgen_function * int
| P_OAEP of Netx509_pubkey.hash_function *
Netx509_pubkey.maskgen_function * string
type encrypt_alg =
Encrypt of Netx509_pubkey.oid * Netx509_pubkey.alg_param option
type sign_alg =
Sign of Netx509_pubkey.oid * Netx509_pubkey.alg_param option
type kex_alg = Kex of Netx509_pubkey.oid * Netx509_pubkey.alg_param option
val decode_pubkey_from_der : string -> Netx509_pubkey.pubkey
val encode_pubkey_to_der : Netx509_pubkey.pubkey -> string
val read_pubkey_from_pem :
Netchannels.in_obj_channel -> Netx509_pubkey.pubkey
type privkey = Privkey of string * string
val read_privkey_from_pem :
Netchannels.in_obj_channel -> Netx509_pubkey.privkey
module Key :
sig
val rsa_key : Netx509_pubkey.oid
val rsassa_pss_key : Netx509_pubkey.oid
val rsaes_oaep_key : Netx509_pubkey.oid
val dsa_key : Netx509_pubkey.oid
val dh_key : Netx509_pubkey.oid
val ec_key : Netx509_pubkey.oid
val ecdh_key : Netx509_pubkey.oid
val ecmqv_key : Netx509_pubkey.oid
val kea_key : Netx509_pubkey.oid
val eddsa_key : Netx509_pubkey.oid
val catalog : (string * string list * string * Netx509_pubkey.oid) list
val private_key_format_of_key : Netx509_pubkey.oid -> string
val create_rsassa_pss_alg_id :
hash_function:Netx509_pubkey.hash_function ->
maskgen_function:Netx509_pubkey.maskgen_function ->
salt_length:int -> unit -> Netx509_pubkey.alg_id
val create_rsassa_pss_key :
hash_function:Netx509_pubkey.hash_function ->
maskgen_function:Netx509_pubkey.maskgen_function ->
salt_length:int -> Netx509_pubkey.pubkey -> Netx509_pubkey.pubkey
val create_rsaes_oaep_alg_id :
hash_function:Netx509_pubkey.hash_function ->
maskgen_function:Netx509_pubkey.maskgen_function ->
psource_function:string -> unit -> Netx509_pubkey.alg_id
val create_rsaes_oaep_key :
hash_function:Netx509_pubkey.hash_function ->
maskgen_function:Netx509_pubkey.maskgen_function ->
psource_function:string ->
Netx509_pubkey.pubkey -> Netx509_pubkey.pubkey
end
module Encryption :
sig
val rsa : Netx509_pubkey.encrypt_alg
val rsaes_oaep :
hash_function:Netx509_pubkey.hash_function ->
maskgen_function:Netx509_pubkey.maskgen_function ->
psource_function:string -> Netx509_pubkey.encrypt_alg
val catalog :
(string * string list * Netx509_pubkey.encrypt_alg *
Netx509_pubkey.oid)
list
val encrypt_alg_of_pubkey :
Netx509_pubkey.pubkey -> Netx509_pubkey.encrypt_alg
val alg_id_of_encrypt_alg :
Netx509_pubkey.encrypt_alg -> Netx509_pubkey.alg_id
val key_oid_of_encrypt_alg :
Netx509_pubkey.encrypt_alg -> Netx509_pubkey.oid
end
module Keyagreement :
sig
val dh : Netx509_pubkey.kex_alg
val ec : Netx509_pubkey.kex_alg
val ecdh : Netx509_pubkey.kex_alg
val ecmqv : Netx509_pubkey.kex_alg
val kea : Netx509_pubkey.kex_alg
val catalog :
(string * string list * Netx509_pubkey.kex_alg * Netx509_pubkey.oid)
list
val alg_id_of_kex_alg : Netx509_pubkey.kex_alg -> Netx509_pubkey.alg_id
val key_oid_of_kex_alg : Netx509_pubkey.kex_alg -> Netx509_pubkey.oid
end
module Signing :
sig
val rsa_with_sha1 : Netx509_pubkey.sign_alg
val rsa_with_sha224 : Netx509_pubkey.sign_alg
val rsa_with_sha256 : Netx509_pubkey.sign_alg
val rsa_with_sha384 : Netx509_pubkey.sign_alg
val rsa_with_sha512 : Netx509_pubkey.sign_alg
val rsassa_pss :
hash_function:Netx509_pubkey.hash_function ->
maskgen_function:Netx509_pubkey.maskgen_function ->
salt_length:int -> Netx509_pubkey.sign_alg
val dsa_with_sha1 : Netx509_pubkey.sign_alg
val dsa_with_sha224 : Netx509_pubkey.sign_alg
val dsa_with_sha256 : Netx509_pubkey.sign_alg
val ecdsa_with_sha1 : Netx509_pubkey.sign_alg
val ecdsa_with_sha224 : Netx509_pubkey.sign_alg
val ecdsa_with_sha256 : Netx509_pubkey.sign_alg
val ecdsa_with_sha384 : Netx509_pubkey.sign_alg
val ecdsa_with_sha512 : Netx509_pubkey.sign_alg
val eddsa : Netx509_pubkey.sign_alg
val catalog :
(string * string list * Netx509_pubkey.sign_alg * Netx509_pubkey.oid)
list
val alg_id_of_sign_alg :
Netx509_pubkey.sign_alg -> Netx509_pubkey.alg_id
val key_oid_of_sign_alg : Netx509_pubkey.sign_alg -> Netx509_pubkey.oid
end
end`