Question

In: Computer Science

Consider a simple system with 8-bit block size. Assume the encryption (and decryption) to be a...

Consider a simple system with 8-bit block size. Assume the encryption (and decryption) to be a simple XOR of the key with the input. In other words, to encrypt x with k we simply perform x⊕k giving y. Similarly, to decrypt y, we perform y⊕k giving x.

You are given the following 16-bit input 1A2Bin hexadecimal. You are provided IV as 9D in hexadecimal. The key to be used (where appropriate) is 7C in hexadecimal. Compute the encrypted output with the following methods. Express your final answer, for each of them, as 4 hexadecimal characters so it is easy to read.

A. ECB

B. CBC

C. OFB

D. CFB

Solutions

Expert Solution

Note: Done accordingly. Please comment for any problem. Please Uprate. Thanks

Solution:

Plaintext:1111000011110000 (F0F0)

IV: 00001111

KEY: 11000111

Encryption: XOR

XOR TABLE:

A

B

R

0

0

0

0

1

1

1

0

1

1

1

0

i) ECB

i.e. Plaintext(each block) XOR Key:

Plaintext:1111000011110000 (F0F0)

KEY: 11000111

Therefore:

Block1

11110000

KEY

11000111

XOR

Ciphertext1

00110111

Block2

11110000

KEY

11000111

XOR

Ciphertext2

00110111

So cipher text= Ciphertext1Ciphertext2

Cipher text=0011011100110111 or in hex (3737)

ii) CBC

Block1

11110000

IV

00001111

XOR

R1

11111111

KEY

11000111

CipherText1

00111000

Block2

11110000

CipherText1

00111000

XOR

R2

11001000

KEY

11000111

CipherText2

00001111

So cipher text=CipherText1CipherText2

Cipher text=0011100000001111 or in hex (380F)

iii)

KEY

11000111

IV

00001111

XOR

R1

11001000

Block1

11110000

CipherText1

00111000

KEY

11000111

R1

11001000

XOR

R2

00001111

Block2

11110000

CipherText2

11111111

So cipher text=CipherText1CipherText2

Cipher text=0011100011111111 or in hex (38FF)

iv)

KEY

11000111

IV

00001111

XOR

R1

11001000

Block1

11110000

CipherText1

00111000

KEY

11000111

CipherText1

00111000

XOR

R2

11111111

Block2

11110000

CipherText2

00000000

So cipher text=CipherText1CipherText2

Cipher text=0011100000000000 or in hex (3800)

v) CTR

Therefore:

KEY

11000111

Counter

11001100

XOR

R1

00001011

Block1

11110000

CipherText1

11111011

KEY

11000111

Counter

11001100

XOR

R2

00001011

Block2

11110000

CipherText2

11111011

So cipher text=CipherText1CipherText2

Cipher text=1111101111111011 or in hex (FBFB)

i hope it helps..

If you have any doubts please comment and please don't dislike.

PLEASE GIVE ME A LIKE. ITS VERY IMPORTANT FOR ME


Related Solutions

Consider a computer system with a 64-bit logical address and 8-KB page size. The system supports...
Consider a computer system with a 64-bit logical address and 8-KB page size. The system supports up to 1024 MB of physical memory: How many entries are there in each of the following in the page table? Describe how a logical address may be used to obtain the frame number. You may use the virtual address 14533956 to illustrate your answer. make it short and clear , please type in your keyboard.
An encryption-decryption system consists of three elements: encode, transmit, and decode. A faulty encode occurs in...
An encryption-decryption system consists of three elements: encode, transmit, and decode. A faulty encode occurs in 0.7% of the messages processed, transmission errors occur in 1% of the messages, and a decode error occurs in 0.1% of the messages. Assume the errors are independent. Round your answers to four decimal places (e.g. 98.7654). (a) What is the probability of a completely defect-free message? (b) What is the probability of a message that has either an encode or a decode error?
Assume a 32-bit system, with a 2-level page table, with a page size of 4KiB (p1=10bits,...
Assume a 32-bit system, with a 2-level page table, with a page size of 4KiB (p1=10bits, p2=10bits, offset=12bits). (i) A program on this system requires 16MiB in total: the program text segment uses 4MiB, the program data requires 2MiB, the program dynamically allocates 8MiB on the heap, and the stack utilises 2MiB. How many page-table pages are required for this process? (Don’t answer with just a number, explain your reasoning. Without your reasoning we cannot award part marks if your...
Consider a disk with block size B = 512 bytes. A block pointer is P =...
Consider a disk with block size B = 512 bytes. A block pointer is P = 6 bytes long, and a record pointer is PR = 7 bytes long. A file has r = 30,000 EMPLOYEE records of fixed length. Each record has the following fields: Name (30 bytes),Ssn (9 bytes), Department_code (9 bytes), Address (40 bytes), Phone (10 bytes), Birth_date (8 bytes), Sex (1 byte), Job_code (4 bytes), and Salary (4 bytes, real number). An additional byte is used...
Consider a file system that uses inodes to represent files. Diskblocks are 8 kb in size,...
Consider a file system that uses inodes to represent files. Diskblocks are 8 kb in size, and a pointer to a disk block requires 4bytes. this file system has 12 direct disk blocks, as well assingle, double, and triple in direct disk blocks. What is themaximum size of a file that can be stored in this file system?Explain a little bit^^ Thank you
Consider a block-spring system as shown in the figure. The block is attached to the spring,...
Consider a block-spring system as shown in the figure. The block is attached to the spring, which is attached to the inside wall of the box. The mass of the block is 0.2kg. Suppose you pull the block 10cm to the right and release it. The angular frequency for it to oscillate is 30 rad/s. Neglect friction between the block and the bottom of the box. (a)What is the spring constant of the spring? (b)What will be the amplitude of...
Assume a computer with a cache that holds 64 bytes and has a block size of...
Assume a computer with a cache that holds 64 bytes and has a block size of 32 bytes. Direct address mapping is used and from the beginning the cache is empty. The following program sequence is executed: for (col = 0; col < 2; col++) { for (row = 0; row < 4; row++) A[row][col] = B[row] * C[col]; } Assume that for the variables row and col registers are used. The matrix A consists of 4 rows and 4...
Make a schema for a memory size of 65536 words per 8 bits. Use 8k  by 8-bit...
Make a schema for a memory size of 65536 words per 8 bits. Use 8k  by 8-bit 2764 memory a) with a single decoder 388 and inverters. b) Use a decoder 2 4 and inverters? Help?   How to implement?
Consider a block-spring system inside a box, as shown in the figure. The block is attached...
Consider a block-spring system inside a box, as shown in the figure. The block is attached to the spring, which is attached to the inside wall of the box. The mass of the block is 0.2 kg. For parts (a) through (f), assume that the box does not move. Suppose you pull the block 10 cm to the right and release it. The angular frequency of the oscillations is 30 rad/s. Neglect friction between the block and the bottom of...
Now let’s look at a more modern symmetric encryption. Assume that the algorithm for this system...
Now let’s look at a more modern symmetric encryption. Assume that the algorithm for this system is to rotate the bits in the message right 4 positions, XOR the bits with the key, and rotate the bits 2 positions to the left. a.What is the key? (The Key is 5A) b. Using the key and the above algorithm, decrypt the following message which contains a name (given in hex): BD 7D FA BC 78 3C 3D. Remember that you’ll have...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT