module Symmetric_cipher: sig
.. end
Access symmetric ciphers
type
sc_ctx = {
}
type
sc = {
|
name : string ; |
|
mode : string ; |
|
key_lengths : (int * int) list ; |
|
iv_lengths : (int * int) list ; |
|
block_constraint : int ; |
|
supports_aead : bool ; |
|
create : string -> sc_ctx ; |
}
: (module Netsys_crypto_types.SYMMETRIC_CRYPTO) ->
string * string -> sc
extract scrypto (name,mode)
: returns the cipher called
name
in mode
as scipher
, or raises Not_found
: (module Netsys_crypto_types.SYMMETRIC_CRYPTO) ->
sc list
Extracts all ciphers
val cbc_of_ecb : sc ->
sc
For a given cipher in ECB mode, a new cipher in CBC mode is
returned. Raises Not_found
if the input is not in ECB mode.
val ofb_of_ecb : sc ->
sc
For a given cipher in ECB mode, a new cipher in OFB mode is
returned. Raises Not_found
if the input is not in ECB mode.
val ctr_of_ecb : sc ->
sc
For a given cipher in ECB mode, a new cipher in CTR mode is
returned. Raises Not_found
if the input is not in ECB mode.