Information and data security block cipher operation
1. Chapter 6
Block Cipher Operation
Lucture slides
By
Muntaha
Cryptography and Network
Security
2. Multiple encryption
is a technique in which an encryption algorithm is used multiple times.
In the first instance, plaintext is converted to ciphertext using the encryption
algorithm.
This ciphertext is then used as input and
the algorithm is applied again.
This process may be repeated through any
number of stages.
3. Multiple Encryption & DES
• clear a replacement for DES was needed
–attacks can break it
–demonstrated exhaustive key search attacks
• AES is a new cipher alternative
• prior to this alternative was to use multiple
encryption with DES implementations
• Triple-DES is the chosen form
4. Double-DES
•could use 2 DES encrypts on each block
Encryption
X=E(K1,P)
C=E(K2,X)
C=E(K2,E(K1,P))
------------------------
Decreption
X=D(K2,C)
P=D(K1,X)
P=D(K1,D(K2,C))
5. Why not Double-DES?
could use 2 DES encrypts on each block
C = EK2(EK1(P))
“meet-in-the-middle” attack
works whenever use a cipher twice
since X = EK1(P) = DK2(C)
attack by encrypting P with all keys and store
then decrypt C with keys and match X value
can show takes O(256) steps
Requires…know plaintext,
6. Triple-DES with Two-Keys
hence must use 3 encryptions
would seem to need 3 distinct keys
but can use 2 keys with E-D-E sequence
standardized in ANSI
no current known practical attacks
several proposed impractical attacks might become
basis of future attacks
8. Triple-DES with Three-Keys
although are no practical attacks on two-key Triple-
DES have some indications
can use Triple-DES with Three-Keys to avoid even
these
C = EK3(DK2(EK1(P)))
has been adopted by some Internet applications,
e.g., PGP, S/MIME
9. Modes of Operation
A mode of operation is a technique for enhancing the effect of
a cryptographic algorithm or adapting the algorithm for an application
, such as applying a block cipher to a sequence of data blocks or a data
stream.
block ciphers encrypt fixed size blocks
DES encrypts 64-bit blocks
NIST defines 5 modes
have block and stream modes
to cover a wide variety of applications
can be used with any block cipher
11. Electronic Codebook Book (ECB)
message is broken into independent blocks that are
encrypted
each block is a value which is substituted
Each block of 64 plaintext bits is encoded
independently using the same key.
uses: secure transmission of single values
13. Advantages and Limitations of ECB
• weakness is due to the encrypted message blocks being
independent
• main use is sending a few blocks of data
• For lengthy messages, the ECB mode may not be secure
• the same -bit block of plaintext appears more than once in the
message, it always produces the same ciphertext.
14. Cipher Block Chaining (CBC)
• message is broken into blocks
• Block linked together in encryption operation
• The same key is used for each block
• each previous cipher blocks is chained with current plaintext block.
• To produce the first block of ciphertext, an initialization vector (IV) is
XOR with the first block of plaintext.
• uses: bulk data encryption, authentication
16. Advantages and Limitations of CBC
a ciphertext block depends on all blocks before it
any change to a block affects all following ciphertext blocks...
avalanche effect
because of the chaining mechanism of CBC, it is an appropriate mode
for encrypting messages of length greater than N bits.
need Initialization Vector (IV)
which must be known to sender & receiver
hence IV must either be a fixed value
or derived in way hard to manipulate
17. Cipher FeedBack (CFB)
message is treated as a stream of bits
Use Initial Vector to start process
Encrypt previous ciphertext , then combined with the plaintext block using X-
OR to produce the current ciphertext
added to the output of the block cipher
result is feed back for next stage
standard allows any number of bits (1,8, 64 or 128 etc) to be feed back
most efficient to use all bits in block (64 or 128)
uses: stream data encryption, authentication
Encryption C1 = P1 XOR MSBs[E(K, IV)]
decryption p1=c1 XOR MSBs[E(K, IV)]
19. Advantages and Limitations of CFB
note that the block cipher is used in encryption mode at
both ends (XOR)
Use Initial Vector to start process
Encrypt previous ciphertext , then combined with the
plaintext block using X-OR to produce the current ciphertext.
A ciphertext segment depends on the current and all
preceding plaintext segments.
20. Output FeedBack (OFB)
Very similar to CFB
message is treated as a stream of bits
output of cipher is added to message
feedback is independent of message
uses: stream encryption on noisy channels
Encryption Cj = Pj XOR E(K, [Cj-1 XOR Pj-1])
Decreption Pj = Cj XOR E(K, [Cj-1 XOR Pj-1])
22. Advantages and Limitations of OFB
needs an IV which is unique for each use
Feedback is independent of message
Each bit in the ciphertext is independent of the
previous bit or bits. This avoids error
propagation
only use with full block feedback
◦ subsequent research has shown that only full block
feedback (ie CFB-64 or CFB-128) should ever be used
23. Counter (CTR)
a “new” mode
similar to OFB but encrypts counter value rather
than any feedback value
must have a different key & counter value for every
plaintext block (never reused)
uses: high-speed network encryptions
25. Advantages and Limitations of CTR
efficiency
o can do parallel encryptions in h/w or s/w
o good for bursty high speed links
random access to encrypted data blocks
provable security (good as other modes)
but must ensure never reuse key/counter
values.