Encipherment Using Modern Symmetric-Key Ciphers
Encipherment Using Modern Symmetric-Key Ciphers
Modes of Operation
block ciphers encrypt fixed size blocks
eg. DES encrypts 64-bit blocks with 56-bit key
need some way to en/decrypt arbitrary amounts of data in practise NIST SP 800-38A defines 5 modes have block and stream modes to cover a wide variety of applications can be used with any block cipher
Symmetric-key encipherment can be done using modern block ciphers. Modes of operation have been devised to encipher text of any size employing either DES or AES.
The simplest mode of operation is called the electronic codebook (ECB) mode.
8.4
weakness is due to the encrypted message blocks being independent main use is sending a few blocks of data
8.8
Message Padding
at end of message must handle a possible last short block
which is not as large as blocksize of cipher pad either with known non-data value (eg nulls) or pad last block along with count of pad size
eg. [ b1 b2 b3 0 0 0 0 5] means have 3 data bytes, then 5 bytes pad+count
there are other, more esoteric modes, which avoid the need for an extra block
Cipher Feedback (CFB) Mode In some situations, we need to use DES or AES as secure ciphers, but the plaintext or ciphertext block sizes are to be smaller.
8.13
In CFB mode, encipherment and decipherment use the encryption function of the underlying block cipher.
In this mode each bit in the ciphertext is independent of the previous bit or bits. This avoids error propagation.
8.18
Counter (CTR)
a new mode, though proposed early on 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)
Oi = EK(i) Ci = Pi XOR Oi
In the counter (CTR) mode, there is no feedback. The pseudorandomness in the key stream is achieved using a counter.
8.22
random access to encrypted data blocks provable security (good as other modes) but must ensure never reuse key/counter values, otherwise could break (cf OFB)
8.1.5 Continued
8.25