You are on page 1of 2

Exercise 1

(a)

The equality in the hint can be shown by listing all 1-bit possibilities:

A B AB (A  B)' A'  B


0 0 0 1 1
0 1 1 0 0
1 0 1 0 0
1 1 0 1 1

We also need A  B = A'  B' ,

We consider the two XOR operations from the Table. If the plaintext and key for an
encryption are complemented, then the inputs to the first XOR are also complemented. The
output, then, is same as for the uncomplemented inputs.

Next, we see that only one of the two inputs to the second XOR is complemented, therefore,
the output is complement of the output that would be generated by uncomplemented inputs.

(b)

In a plaintext attack, if for selected plaintext A, the analyst can obtain

B1 = E[K, A]

and

B2 = E[K, A'],

then an exhaustive key search requires only 255 rather than 256 encryptions.

(B2)' = E[K', A].

Then, chose a test value of the key C and perform E[C, A].

If the result is B1, then we know that C is the correct key. Otherwise ( If the result is (B2)'),
C' is the correct key.

If neither result appears, then we have eliminated two possible keys with one encryption.

Exercise 2
(a)

Modes of Operation of Block Cipher are:

ECB (Electronic Codebook) Mode

It is the simplest mode of encryption. Encryption and decryption are quite similar since each
block of the plaintext or ciphertext are encrypted or decrypted independently.

CBC (Cipher-Block Chaining) Mode

In this mode, each plaintext block is XORed to the previous ciphertext result. This is the
input to the encryption algorithm

CFB (Cipher Feedback) Mode

This mode is similar to that of the CBC., but one difference is that each preceding ciphertext
is encrypted and XORed with the plaintext to generate the next set of ciphertext.

OFB (Output Feedback) Mode

Here, it is almost like the CFB, except the input for the encryption algorithm is the previous
encrypted output.

The continuous creation stream allows for the encryption and decryption to be done with one
thread at a time. Also, the data used by each method utilizes identical cipher encryption
algorithms.

CTR (Counter) Mode

For this mode, the encrypted counter is XORed with each independent plaintext block.
Also, for each block of plaintext, the counter incremented by 1.

(b)

When an error comes about while using the ECB mode, the plaintext is what is only affected,
while for the CBC mode, the error spreads.

Exercise 3
Rounds 9 to 16 use of the same images as that of round 1 to 8, because of the key schedule.
And so, we can say that the method of encrypting is the same as that of decrypting.
If we have a cipher text and we ask the oracle to decrypt it, what is returned as a result is
the is the ciphertext’s decryption.

You might also like