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:
“In the twentieth century, death terrifies men less than the absence of real life. All these dead, mechanized, specialized actions, stealing a little bit of life a thousand times a day until the mind and body are exhausted, until that death which is not the end of life but the final saturation with absence.”
—Raoul Vaneigem (b. 1934)
“The only mode of obtaining an answer to these questions of the senses is to forego all low curiosity, and, accepting the tide of being which floats us into the secret of nature, work and live, work and live, and all unawares the advancing soul has built and forged for itself a new condition, and the question and the answer are one.”
—Ralph Waldo Emerson (18031882)
“The Sage of Toronto ... spent several decades marveling at the numerous freedoms created by a global village instantly and effortlessly accessible to all. Villages, unlike towns, have always been ruled by conformism, isolation, petty surveillance, boredom and repetitive malicious gossip about the same families. Which is a precise enough description of the global spectacles present vulgarity.”
—Guy Debord (b. 1931)