Question

In: Computer Science

A particular cipher is implemented by combining the ASCII representation of plaintext characters with pseudorandom bytes...

A particular cipher is implemented by combining the ASCII representation of plaintext characters with pseudorandom bytes (eight-bit binary strings of 1s and 0s) using the XOR function. In the process of encrypting a message, a character in the plaintext, a capital X, is XORed with the pseudorandom byte 10110100.
a. What is the ciphertext (in binary form) generated by the encryption of the character ‘M’? (Please show your work.)
b. How is the plaintext for this encrypted J recovered? (Please show your work.)

Solutions

Expert Solution

ANSWER:

XOR Table

Input: 0,0 Output: 0

Input: 0,1 Output: 1

Input: 1,0 Output: 1

Input: 1,1 Output: 0

Pseudorandom byte: 10110100

ASCII of ‘X’: 01011000

Now performing XOR between X and pseudorandom, we get-

Cipher Text: 11101100

a) ASCII of ‘M’: 01001101

Pseudorandom byte: 10110100

Now performing XOR between M and pseudorandom, we get-

Cipher Text: 11111001

b) ASCII of ‘J’: 01001010

Pseudorandom byte: 10110100

Note that ASCII of J is encrypted text as given in question, so to get plain text we perform XOR-

Plain Text: 11111110

SUMMARY:

For every question we need to get the ASCII of the specified character. The pseudorandom byte is already given in the question. So to find cipher text we just need to XOR the ASCII of character and the pseudorandom byte. Similarly XOR to calculate the plain text.

Note: If you have any queries than let me know in the comments. If you find it helpful than a Like would be appreciated.


Related Solutions

Use Vigenère Cipher to decrypt the following plaintext with the given key key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself
Use Vigenère Cipher to decrypt the following plaintext with the given key key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself
Using playfair cipher, encrypt the plaintext “SUCCESS” using the keyword “MIDTERMEXAM”
Using playfair cipher, encrypt the plaintext “SUCCESS” using the keyword “MIDTERMEXAM”
Cryptography: Using columnar cipher, find the plaintext and the key that generated this ciphertext: ykccjosaiawiekhriogrrlrni Keep...
Cryptography: Using columnar cipher, find the plaintext and the key that generated this ciphertext: ykccjosaiawiekhriogrrlrni Keep in mind that only letter j was used for padding. (Show your detailed work)
Question The given plaintext is “Feistel cipher structure uses the same algorithm for both encryption and...
Question The given plaintext is “Feistel cipher structure uses the same algorithm for both encryption and decryption”. Write Java or Python code to implement either Monoalphabetic cipher or Hill cipher or Transposition Cipher (Encryption and Decryption) and test your code on given plaintext. User may enter value of key at the command prompt, if required.
The given plaintext is “Feistel cipher structure uses the same algorithm for both encryption and decryption”....
The given plaintext is “Feistel cipher structure uses the same algorithm for both encryption and decryption”. Write Java code to implement Shift cipher (Encryption and Decryption) and test your code on given plaintext. Your code must meet following conditions. 1. User must enter the value of key from command prompt and print it at command prompt. 2. Print the cipher text and the plaintext at the command prompt after encryption and decryption. 3. Test your algorithm for 5 different key...
Please compute AES128 encryption given by the following setting: (Note: Plaintext, Cipherkey and Ciphertext are Bytes)...
Please compute AES128 encryption given by the following setting: (Note: Plaintext, Cipherkey and Ciphertext are Bytes) Plaintext: 00……00 Cipherkey: 00……01 What is the ciphertext?
MARS: Use MASKING to convert ASCII characters to Integer Write and run a program that reads...
MARS: Use MASKING to convert ASCII characters to Integer Write and run a program that reads in a string of ASCII characters and converts them to Integer numbers stored in an array USING MASKING, not subtraction. Write a program that: 1. Inputs a 1x8 vector of single-digit integers 2. Stores them into an 8-entry 32-bit Integer array, “V”. After storing the integers in the array: 1. Read the same values using Read Integer and store them in a 32-bit integer...
A typical SMS protocol allows 128 distinct ASCII characters to be used in a message. However,...
A typical SMS protocol allows 128 distinct ASCII characters to be used in a message. However, to save bandwidth, instead of using straight 8-bit ASCII characters to transfer data (one byte per character), SMS uses 7 bits per character and compacts the bits such that it only requires 140 bytes to send a 160 character message, for an approximately 12.5% savings of bandwidth. 12.5% savings in bandwidth is not good enough. They would like a system that can save up...
Write an Java/C program code to perform known-plaintext attack on Permutation Cipher. This program can be...
Write an Java/C program code to perform known-plaintext attack on Permutation Cipher. This program can be used to determine the length of the permutation m and the key permutation.
Problem 3: What three ASCII letters (bytes) are encoded by the following 4B/5B pattern? (Case sensitive)...
Problem 3: What three ASCII letters (bytes) are encoded by the following 4B/5B pattern? (Case sensitive) 010110101001110101010111111110
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT