(1 point) This question concerns block cipher modes. We will use a simple affine cipher, which...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
(1 point) 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 OxAA. In the case of CTR mode, we use a (nonce || counter) arrangement in which the nonce is the left 5 bits of OxAA and the counter is a 3 bit counter that begins at O. 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 "harpy" using CTR mode. Please enter your answer in hex. (Please do **not** enter an Ox, as this has been done.) Ox b) Encrypt the plaintext "helper" using ECB mode. Please enter your answer in hex. Ox c) Encrypt the plaintext "hinders" using CFB mode. Please enter your answer in hex. Ox d) Encrypt the plaintext "hung" using CBC mode. Please enter your answer in hex. Ox e) Encrypt the plaintext "hellos" using OFB mode. Please enter your answer in hex. Ox (1 point) 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 OxAA. In the case of CTR mode, we use a (nonce || counter) arrangement in which the nonce is the left 5 bits of OxAA and the counter is a 3 bit counter that begins at O. 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 "harpy" using CTR mode. Please enter your answer in hex. (Please do **not** enter an Ox, as this has been done.) Ox b) Encrypt the plaintext "helper" using ECB mode. Please enter your answer in hex. Ox c) Encrypt the plaintext "hinders" using CFB mode. Please enter your answer in hex. Ox d) Encrypt the plaintext "hung" using CBC mode. Please enter your answer in hex. Ox e) Encrypt the plaintext "hellos" using OFB mode. Please enter your answer in hex. Ox
Expert Answer:
Answer rating: 100% (QA)
The exercise revolves around the application of various block cipher modes using an affine cipher function defined in C Before we begin with the encryption lets understand the cipher function provided ... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
Research various global financial services organizations (for example, UBS AG, E-Trade, Schwab, ING, Bank of America, HSBC, RBS) through their company websites and other publicly available...
-
In Exercises use the Limit Comparison Test to determine the convergence or divergence of the series. 0 1 2 n=11n+1
-
What is CRISPR-d-Cas-9? Please provide a thorough description that is at least 10-15 sentences long?
-
The siren in an ambulance has a frequency (according to you) of 1100 Hz as it moves toward you at speed v. It then makes a U-turn and travels away from you with speed v, and you hear a frequency of...
-
Priscilla Webster was dining at her favorite Massachusetts seafood restaurant when matters went horribly wrong. She began choking on a fishbone that had been lurking in her seafood chowder. After a...
-
Derby Company prepares monthly cash budgets. Relevant data from operating budgets for 2014 are: All sales are on account. Collections are expected to be 60% in the month of sale, 25% in the first...
-
Prove that if M is a dense linear subspace of a separable Hilbert space H, then H has an orthonormal basis consisting of elements in M. Does the same result hold for arbitrary dense subsets of H?
-
Given two complementary strands of DNA containing 1.03 x 102 base pairs each, calculate the ratio of two separate strands to hydrogen-bonded double helix in solution at 2.98 x 102 K. (Hint: The...
-
Maria has her own accounting practice in Victoria, B.C. During 2018 she paid $1,650 to attend the following conventions: Convention #1 $400 for a 2 day convention on Tax issues for the owner/manager...
-
Wayland Company has a standard of 3.2 hours of labor per unit, at $10.10 per hour. In producing 980 units, Wayland used 2,900 hours of labor at a total cost of $32,000. What is Wayland's labor price...
-
Consider the facts of the Glup SA case study below. Comment on the following: full explaination 1. What are the challenges faced? 2. Discuss the opportunities and the accompanying advantages that the...
-
Explain why quality and TQM are important to a service-based business (which has no physical or tangible product). Further, select and discuss one of the key concepts from below in the context of an...
-
1. Consider the following NFA. The set of states, Q, is {1,2,3}. The initial state is 1 and the accepting state is 2. The alphabet is {a,b}. a 3 1 b, c Convert this NFA to a DFA. Show work clearly. E...
-
A) Summary Report Type your report in the box below. Comparing your calculations from alternative 1 and alternative 2 - which alternative do you recommend to Nathan and Cody? Why? The company can...
-
Estimate a range for the optimal objective value for the following LPs: (a) Minimize z = 5x1 + 2x2 Subject to X1 - x2 3 2x1 + 3x2 5 X1, x2 0 (b) Maximize z = x1 + 5x2 + 3x3 Subject to X1 + 2x2 +...
-
A high-performance missile for launching a satellite has a unity feedback system with a loop transfer function Sketch the root locus as K varies from 0 K(s 18) (s 2) (s2 2)(s12)
-
Consider the block diagram in Figure P3.21. (a) Verify that the transfer function is (b) Show that a state variable model is given by G(s) = Y(s, h,sta + ais + a 0 ao a y=[1 LE 0]x. Co FIGURE P3.21...
-
Consider a unity negative feedback system with where K is set equal to 100 in order to achieve a specified Kv = 2. We wish to add a lead-lag compensator Show that the gain margin of the compensated...
-
Using two CST elements, solve the simple shear problem depicted in the figure and determine whether the CST elements can represent the simple shear condition accurately or not. Material properties...
-
A heat conduction problem is modeled using four onedimensional heat conduction elements, as shown in figure 4.6. All elements are of the same length, \(L=1 \mathrm{~m}\), cross sectional area of...
-
Consider heat conduction in a uniaxial rod surrounded by a fluid. The left end of the rod is at \(T_{0}\). The free stream temperature is \(T^{\infty}\). There is convective heat transfer across the...
Study smarter with the SolutionInn App