This question concerns block cipher modes. We will use a simple affine cipher, which can be expressed in C as follows.
char cipher(unsigned char block, char key)
{
return (key+11*block)%256;
}
Note that the block size is 8 bits, which is one byte (and one ASCII character). We will work with the fixed key 0x08.
We now encrypt various plaintexts using modes for this cipher. In every case in which the mode requires an IV, the IV will be 0xAA. In the case of CTR mode, we use a (nonce || counter) arrangement in which the nonce is the left 5 bits of 0xAA and the counter is a 3 bit counter that begins at 0. In all of the problems given below, one character is one block. Each character of the plaintext should be regarded as its corresponding ASCII code.
a) Encrypt the plaintext "???????ℎ" using ???CTR mode.
Please enter your answer in hex. (Please do **not** enter an 0x, as
this has been done.)
0x
b) Encrypt the plaintext "?????" using ??? mode. Please
enter your answer in hex.
0x
c) Encrypt the plaintext "????????" using ??? mode.
Please enter your answer in hex.
0x
d) Encrypt the plaintext "????" using ??? mode. Please
enter your answer in hex.
0x
e) Encrypt the plaintext "????????" using ??? mode.
Please enter your answer in hex.
0x
a) plain text= Brownish
Encrypted text = nuevD8wp+uE=
In hex.0x format = 0x6e 0x75 0x65 0x76 0x44 0x38 0x77 0x70 0x2b 0x75 0x45 0x3d
b) plain text= bangs
Encrypted text= JEXMFNffpDI=
In hex.0x format = 0x4a 0x45 0x58 0x4d 0x46 0x4e 0x66 0x66 0x70 0x44 0x49 0x3d 0x0a
c) plain text = long
Encrypted text= 6R409gU/ih0=
In hex.0x = 0x36 0x52 0x34 0x30 0x39 0x67 0x55 0x2f 0x69 0x68 0x30 0x3d
d) plain text = lowering
Encrypted text = 4Mk6jLPYTcA=
In hex.0x format = 0x34 0x4d 0x6b 0x36 0x6a 0x4c 0x50 0x59 0x54 0x63 0x41 0x3d
Get Answers For Free
Most questions answered within 1 hours.