module Symmetric_cipher:sig
..end
Access symmetric ciphers
type
sc_ctx = {
|
set_iv : |
|
set_header : |
|
encrypt : |
|
decrypt : |
|
mac : |
type
sc = {
|
name : |
|
mode : |
|
key_lengths : |
|
iv_lengths : |
|
block_constraint : |
|
supports_aead : |
|
create : |
val extract : (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
val extract_all : (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.