Module Cryptmodes_64


module Cryptmodes_64: sig .. end
OVERVIEW:

A block cipher encrypts or decrypts a fixed amount of bits on every invocation. Here, we assume that the underlying cipher handles 64 bit blocks as elementary units. If you have a message which is a multiple of 64 bits, you could encrypt every block independently. IT IS STRONGLY RECOMMENDED NOT TO USE THIS SIMPLE APPROACH. This method, often called ECB ("electronic code book"), is vulnerable by plaintext attacks, even if a strong cipher is used. This module implements the following, much better alternatives.

--------------------- CIPHER BLOCK CHAINING ---------------------

USAGE, LIMITATIONS:

SECURITY:

FAULT-TOLERANCE:

-------------------- CIPHER-FEEDBACK MODE --------------------

USAGE, LIMITATIONS:

SECURITY:

FAULT TOLERANCE:

-------------------- OUTPUT-FEEDBACK MODE --------------------

USAGE, LIMITATIONS:

SECURITY:

FAULT TOLERANCE:

-------------- RECOMMENDATION --------------



module type T = sig .. end

Derives the other modes from the basic ECB mode:

Make_modes: This version is efficient for cryptsystems based on encrypt_ecb Make_modes_int32: This version is efficient for cryptsystems based on encrypt_ecb_int32

Both functors behave in an equivalent way; the only difference is that Make_modes is fast if M.encrypt_ecb is fast, and that Make_modes_int32 is fast if M.encrypt_ecb_int32 is fast.

module Make_modes: 
functor (M : Cryptsystem_64.T) -> T with type key = M.key
module Make_modes_int32: 
functor (M : Cryptsystem_64.T) -> T with type key = M.key