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:
“All stealing is comparative. If you come to absolutes, pray who does not steal?”
—Ralph Waldo Emerson (18031882)
“That the mere matter of a poem, for instanceits subject, its given incidents or situation; that the mere matter of a picturethe actual circumstances of an event, the actual topography of a landscapeshould be nothing without the form, the spirit of the handling, that this form, this mode of handling, should become an end in itself, should penetrate every part of the matter;Mthis is what all art constantly strives after, and achieves in different degrees.”
—Walter Pater (18391894)
“Everything to which we concede existence is a posit from the standpoint of a description of the theory-building process, and simultaneously real from the standpoint of the theory that is being built. Nor let us look down on the standpoint of the theory as make-believe; for we can never do better than occupy the standpoint of some theory or other, the best we can muster at the time.”
—Willard Van Orman Quine (b. 1908)