module Block: sig end
Block
module provides classes that implements
popular block ciphers, chaining modes, and wrapping of a block cipher
as a general transform or as a hash function.
The classes can be composed in a Lego-like fashion, facilitating
the integration of new block ciphers, modes, etc.class type block_cipher = object end
Deriving transforms and hashes from block ciphers
|
class cipher : block_cipher -> Cryptokit.transform
class cipher_padded_encrypt : Cryptokit.Padding.scheme ->
block_cipher -> Cryptokit.transform
Cryptokit.Block.cipher
, but performs padding on the input data
as specified by the first argument.
class cipher_padded_decrypt : Cryptokit.Padding.scheme ->
block_cipher -> Cryptokit.transform
Cryptokit.Block.cipher
, but removes padding on the output data
as specified by the first argument.
class mac : ?iv:string ->
?pad:Cryptokit.Padding.scheme ->
block_cipher -> Cryptokit.hash
class mac_final_triple : ?iv:string ->
?pad:Cryptokit.Padding.scheme ->
block_cipher ->
block_cipher ->
block_cipher -> Cryptokit.hash
c1
, c2
and c3
.
Some block ciphers: AES, DES, triple DES
|
class aes_encrypt : string -> block_cipher
class aes_decrypt : string -> block_cipher
class des_encrypt : string -> block_cipher
class des_decrypt : string -> block_cipher
class triple_des_encrypt : string -> block_cipher
class triple_des_decrypt : string -> block_cipher
Chaining modes
|
class cbc_encrypt : ?iv:string -> block_cipher -> block_cipher
class cbc_decrypt : ?iv:string -> block_cipher -> block_cipher
class cfb_encrypt : ?iv:string ->
int -> block_cipher -> block_cipher
class cfb_decrypt : ?iv:string ->
int -> block_cipher -> block_cipher
class ofb : ?iv:string ->
int -> block_cipher -> block_cipher