Question

This question concerns block cipher modes. We will use a simple affine cipher, which can be...

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

Homework Answers

Answer #1

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

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Can a parallel computer (which can do many operations simultaneously) perform Cipher Block Chaining (CBC) block...
Can a parallel computer (which can do many operations simultaneously) perform Cipher Block Chaining (CBC) block cipher mode decryption faster than encryption? Explain your answer.
USE C programming (pls label which file is libcipher.h and libcipher.c) Q4) A shift cipher is...
USE C programming (pls label which file is libcipher.h and libcipher.c) Q4) A shift cipher is one of the simplest encryption techniques in the field of cryptography. It is a cipher in which each letter in a plain text message is replaced by a letter some fixed number of positions up the alphabet (i.e., by right shifting the alphabetic characters in the plain text message). For example, with a right shift of 2, ’A’ is replaced by ’C’, ’B’ is...
USE C++!!!! Encryption and Decryption are two cryptographic techniques. Encryption is used to transform text to...
USE C++!!!! Encryption and Decryption are two cryptographic techniques. Encryption is used to transform text to meaningless characters, and decryption is used to transform meaningless characters into meaningful text. The algorithm that does the encryption is called a cipher. A simple encryption algorithm is Caesar cipher, which works as follows: replace each clear text letter by a letter chosen to be n places later in the alphabet. The number of places, n, is called the cipher key. For example, if...
Question 45 pts An experiment in which we can assess the simultaneous effect of multiple factors...
Question 45 pts An experiment in which we can assess the simultaneous effect of multiple factors on a response variable and in which all factor combinations are represented is called a Group of answer choices (A) partitioning experiment (B) cross reference experiment (C) block experiment (D) factorial experiment Question 55 pts The various states or levels that an experimental factor can take on are called Group of answer choices (A) repetitions (B) treatments (C) x factors (D) y factors Question...
Please follow ALL the instructions and solve it by C++. Please and thank you! There are...
Please follow ALL the instructions and solve it by C++. Please and thank you! There are two ways to write loops: (1) iterative, like the for-loops we're used to using, and (2) recursive. Your prerequisite preparation for this course should have exposed you to both, although your working knowledge of recursive loops may not be as strong as that of iterative loops. Consider the following iterative function that prints an array of characters backward: #include <iostream> #include <cstring> // print...
1. Vim commands: a. How do you auto indent your program? b. Explain what the following...
1. Vim commands: a. How do you auto indent your program? b. Explain what the following commands do: dd, y3, p, :set cindent (1 pt) VIM exercises These exercises on the computer need to be repeated by each student in the pair. This is to ensure that both students understand how to get around in Linux!!! For this part of the lab, you will create a .vimrc file that will help you develop your C++ programs using VIM. First, we...
Note: Do not use classes or any variables of type string to complete this assignment Write...
Note: Do not use classes or any variables of type string to complete this assignment Write a program that reads in a sequence of characters entered by the user and terminated by a period ('.'). Your program should allow the user to enter multiple lines of input by pressing the enter key at the end of each line. The program should print out a frequency table, sorted in decreasing order by number of occurences, listing each letter that ocurred along...
If you cant answer this please dont waste my question. thank you. This cryptographic program run...
If you cant answer this please dont waste my question. thank you. This cryptographic program run and produce text screen output. You are to create a GUI that uses the program. Your program (GUI) must allow a user to input of a message to be coded. It must also have an area to show the plaintext, the ciphertext, and the decrypted text. If required by your choice of cryptographic method, the user should have an area to input a key....
Can someone please edit my code so that it satisfies the assignments' requirements? I pasted the...
Can someone please edit my code so that it satisfies the assignments' requirements? I pasted the codes below. Requirement: Goals for This Project:  Using class to model Abstract Data Type  OOP-Data Encapsulation You are asked to write an app to keep track of a relatively small music library. The app should load song information from a data file once the app is started. It should allow user to view, add, remove, and search for songs. The app should...
I did already posted this question before, I did get the answer but i am not...
I did already posted this question before, I did get the answer but i am not satisfied with the answer i did the code as a solution not the description as my solution, so i am reposting this question again. Please send me the code as my solution not the description In this project, build a simple Unix shell. The shell is the heart of the command-line interface, and thus is central to the Unix/C programming environment. Mastering use of...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT