Ciphertext Stealing Mode Description
In order to encrypt or decrypt data, use the standard block cipher mode of operation on all but the last two blocks of data.
The following steps describe how to handle the last two blocks of the plaintext, called Pn−1 and Pn, where the length of Pn−1 equals the block size of the cipher in bits, B, the length of the last block, Pn, is M bits, and K is the key that is in use. M can range from 1 to B, inclusive, so Pn could possibly be a complete block. The CBC mode description also makes use of the ciphertext block just previous to the blocks concerned, Cn−2, which may in fact be the IV if the plaintext fits within two blocks.
For this description, the following functions and operators are used:
- Head (data, a): returns the first a bits of the 'data' string.
- Tail (data, a): returns the last a bits of the 'data' string.
- Encrypt (K, data): use the underlying block cipher in encrypt mode on the 'data' string using the key K.
- Decrypt (K, data): use the underlying block cipher in decrypt mode on the 'data' string using the key K.
- XOR: Bitwise Exclusive-OR. Equivalent to bitwise addition without use of a carry bit.
- ||: Concatenation operator. Combine the strings on either side of the operator.
- 0a: a string of a 0 bits.
Read more about this topic: Ciphertext Stealing
Famous quotes containing the words stealing, mode and/or description:
“As I came home through the woods with my string of fish, trailing my pole, it being now quite dark, I caught a glimpse of a woodchuck stealing across my path, and felt a strange thrill of savage delight, and was strongly tempted to seize and devour him raw; not that I was hungry then, except for that wildness which he represented.”
—Henry David Thoreau (18171862)
“Curiously enough, it seems to be only in describing a mode of language which does not mean what it says that one can actually say what one means.”
—Paul Deman (19191983)
“It is possibleindeed possible even according to the old conception of logicto give in advance a description of all true logical propositions. Hence there can never be surprises in logic.”
—Ludwig Wittgenstein (18891951)