logo Hurry, Grab up to 30% discount on the entire course
Order Now logo
572 Times Downloaded

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Santosh SaxenaComputer science
(5/5)

781 Answers

Hire Me
expert
Julian ClaryCriminology
(5/5)

644 Answers

Hire Me
expert
Jovette BermanBusiness
(5/5)

766 Answers

Hire Me
expert
Neil BissonnetteeCriminology
(5/5)

796 Answers

Hire Me
R Programming
(5/5)

Create a second function for substitution box Sbox2() that replicates the Sbox1()

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

For this assignment use the functions expand() and Sbox1()  (we called this S11_function() in homework5) to do the following:

 1.      Create a second function for substitution box Sbox2() that replicates the Sbox1() you wrote for homework 5 except that it uses the following substitution boxes: S11 contains the binary of the numbers (4, 0, 6, 5, 7, 1, 3 2) and S12 contains those for (5, 3, 0, 7, 6, 2, 1, 4). (20 points)

2.      Create a round function called round1() that takes a binary character vector of length 12 and key K of length 9 and does the following: (20 points total)

a.      Divide the block into two equal halves called L0 and R0.

b.      Create two sub keys K1 containing the first 8 digits of K and K2 that contains the last 8 digits of K.

c.       Expand R0 from 6 t o 8 bits and call it ER0.

d.      Take the XOR of the result of ER0 with K1. Store the first 4 bits in a variable called block1 and the last 4 bits in a variable called block2.

e.      Call Sbox1() with block1 as its parameter.

f.        Call Sbox2() with block2 as its parameter.

g.      Concatenate the results of e) and f) and store the result in a variable called FR0.

h.      Take the XOR of FR0 and L0 and store the results in R1.

i.        Store R0 to L1.

j.        Return L1 concatenated to R1.

k.       Test the function round1() with the following input parameters: round1('000001010111', "001101100")

3.      Write a second function called round2()  that is similar to round1()  except that it uses K2 and returns the concatenation of R2 and L2. (20 points)

4.      Write an encryption function: des_ecrypt() by using the work from 1-3 above.. Encrypt the message” “Wire $2000 to Bob” using the functions you wrote above following the simplified DES discussed in the class. (20 points)

5.      Write a decryption function des_decrypt() as follows. Modify the functions round1() and round2()  such that they can be used for decryption. [Hint: for decryption use K2 instead of K1 for round1() and K1 instead of K2 for round2()]. (20 points)

(5/5)
Attachments:

Expert's Answer

572 Times Downloaded

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme