Implementing Electronic Card Payment Systems (Artech House Computer Security Series)

E.2 Modes of operation

When using a block cipher, it is not recommended to split the data into blocks and encrypt every block separately. Depending on the application, several modes of operations were proposed [4], namely the electronic codebook mode (ECB), the cipher block chaining mode (CBC), the cipher feedback chaining mode (CFB), and the output feedback chaining mode (OFB). For the purpose of this book, we describe only the first two operation modes.

In ECB each block of plaintext is encrypted independently of the other blocks that form a message, C i = E ( K )[ P i ], i = 1, , t . The decryption is also carried out independently and is described by the relation P i = E ˆ’ 1 ( K )[ C i ], i = 1, , t . The following remarks apply to the ECB mode:

In the CBC mode the encryption operation on the current plaintext block is chained with the ciphertext block of the previous encryption operation. The first encryption operation is chained to an initial vector IV , since there is no previous operation, C 1 = E ( K )[ P 1 XOR IV ]. The other ciphertext blocks are computed as C i = E ( K )[ P i XOR C i ˆ’ 1 ], i = 2, , t . The decryption process of the first ciphertext block is computed with the formula P 1 = E ˆ’ 1 ( K )[ C 1 ] XOR IV . The other ciphertext blocks are computed as P i = E ˆ’ 1 ( K )[ C i ] XOR C i ˆ’ 1 , i = 2, , t . The following properties characterize the CBC mode:

Категории