Design a cryptographic protocol which is secure

Assignment Help Computer Engineering
Reference no: EM131063603

Task 1- Digital Signature Algorithm - DSA

The digital signature algorithm (DSA) was adopted in 1994 as a signature standard by the U.S. Government. Its security is based on the difficulty of the discrete logarithm problem in a large subgroup of the multiplicative group Zp.

1. To generate keys, each user does the following:

  • pick a prime p such that p - 1 has a prime factor q.
  • select a random integer h, 1 < h < p - 1, and such that h(p-1/q) mod p > 1; let g = h(p-1/q) mod p;
  • select a random integer x, 0 < x < q, and compute y = gx mod p;
  • the user's public key is (p, q, g, y); the user's private key is x.

2. The following steps make up a digital signature algorithm where A signs a message that is to be sent to B:

  • signature generation: to sign a message m, A does the following:

- choose a random integer k, 0 < k < q;

- compute k-1 mod q;

- compute r = (gk mod p) mod q;

- compute s = k-1(m + xr) (mod q);

//for simplicity we consider m ∈ Zq

- send the signature (r, s) along with message m to B.

3. signature verification:  B does the following:

  • look up A's public key (p, q, g, y);
  • compute w = s-1 mod q;
  • compute u1 = mw mod q and u2 = rw mod q;
  • compute v = ((gu1 yu2) mod p) mod q;
  • accept the signature only if v = r.

In this assignment, you are to implement a GP program (which should be called 'dsa.gp' which performs Digital Signature Algorithm as described above. The program must have the following functions:

  • Keygen(x, y): a function to produce the DSA parameters: (p, q, g, y, x) as described above. The output of this function is (p, q, g, y, x).
  • Sign(m): a function to sign a message m using the secret key x.
  • Verify(m, r, s): a function to verify a message m with the signature (r, s). A signature is acceptable if the v = r as described above.

Task 2 - PARTIAL COLLISION OF SHA1

SHA-1 is a commonly used cryptographic hash function. It produces 20-byte (160-bit) hash value. We learnt in the lecture that a good hash function should be collision-resistant, meaning that it is difficult to find two different messages m and mt such that H(m) = H(m').

SHA-1 has been widely used in many standardized digital signature schemes, such as the Digital Signature Algorithm (DSA). If the hash function is not collision-resistant, then it will directly affect the security of the digital signature scheme.

In this task, we assume a simplified version of SHA-1, named SSHA-1, is used for hashing. SSHA- 1 only outputs the first 4 bytes (32 bits) of SHA-1 when hashing a message, and you are asked to find two different messages which produce the same 32 bits hash output. It is required that both messages MUST contain your UOW login ID. An online SHA1 generator: https://www.sha1-online.com/ would allow you to check your answer easily.

Write a C/C++ or JAVA program to accomplish the task. Your program should output the two messages and their hash values (should be the same). In this task, you are allowed to use any existing free source code for SHA1 (but make sure the code produces the correct output). If you are using JAVA, you are also allowed to directly invoke the SHA1 function in the JAVA library.

Task 3 - Protocol Design

In this section, you are to design a cryptographic protocol which is secure to help Alice, Bob and Charlie.  Alice, Bob and Charlie have the following problem. They want to know the sum of all of their ages, but they do not want to reveal their age to each other. Note that collusion attack is assumed not to happen here (e.g., Alice is trying to collude with Bob to cheat Charlie).  Devise a secure protocol to allow them to conduct what they would like to do.

Task 4 - Cryptanalysis

Let Enc be an encryption algorithm based on a one-way function F , and r a shared secret key between the sender and the receiver. Enc works as follows:

1. Compute K = F (r)||F (2r)||F (3r)||F (4r)|| · · ·;

2. For a message M, the ciphertext is computed as M ⊕ K (i.e., one-time pad). Assume that each block F (ir)(i = 1, 2, ...) has the same length, and an eavesdropper knows the function F but not the secret key r.

(a) Suppose F is defined as F (x) = gx mod p where p is a 1024-bit prime (i.e. each block F (ir) has 1024 bits) and g is a generator of Zp. Assume that the discrete logarithm problem is hard in the group Zp, and the secret key r is chosen randomly from Zp-1. Show that the eavesdropper can decrypt the whole message once after obtaining the public parameters (g, p) and the first 1024 bits of a plaintext-ciphertext pair.

(b) Suppose F is the RSA function, that is F (x) = xe mod n where n is 1024-bit long. Assume the RSA problem is hard in the group Zp, and r is chosen randomly from Zn. Show that the eavesdropper can decrypt the whole message once after obtaining (n, e) and the first 1024 bits of a plaintext-ciphertext pair.

Reference no: EM131063603

Questions Cloud

Ranges of the stock price at maturity : A call with a strike price of $60 costs $6. A put with the same strike price and expiration date costs $4. A trader creates a straddle by buying a call option and a put option, and holds it until maturity. For which of the following ranges of the sto..
Finding that people in high-income economies : 1. How would you explain the finding that people in high-income economies seem happier than people in low-income economies, but, over time, people in high-income economies do not seem to be any happier even if their country grows richer? Briefly d..
About the smallest expected loss : Tyler Trucks stock has an annual return mean and standard deviation of 14 percent and 37 percent, respectively. Michael Moped Manufacturing stock has an annual return mean and standard deviation of 11.2 percent and 55 percent, respectively. What is t..
Prepare a comprehensive six-month budget : You need to prepare a comprehensive 6-month budget, including supporting schedules and a report for the period January 1, 2014 to June 30, 2014 for Henron, Inc (a fictional company).
Design a cryptographic protocol which is secure : In this section, you are to design a cryptographic protocol which is secure to help Alice, Bob and Charlie.  Alice, Bob and Charlie have the following problem
An option investor believes that the stock price : An option investor believes that the stock price of a company will have a big jump in the next 3 months. But he is uncertain about the direction of the jump. Which of following strategies should the investor take to profit from his belief?
Conducive to economic growth : An institution is "the rules of the game in a society or, more formally, the humanly devised constraints that shape human interaction: the rules and regulations, laws, customs, and business practices of a country." Do you agree that institutions a..
Dividends are paid and the company is all equity-financed : Suppose that the ABC Company is expected to be worth $100 per share one year from today. How much are you willing to pay for one share today if the risk-free rate is 7%, the expected rate of return of the market is 15%, and the company's beta is 1.5?..
Job prospects after leave college : Briefly discuss how aggregate demand and aggregate supply may affect your job prospects after you leave college. In other words, do you think the aggregate demand (AD) in near future will increase?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Explain the method to find cost of sorting the relation

Explain the method to find cost of sorting the relation In each case, how many combine passes are required?

  Fiber used in the desktop to the lan closet switch

What type of transmission do most people use at home or work?fiber used in the desktop to the LAN closet switch?

  Define the types of the expressions

Using no other objects besides those already declared, how may you alter ptrPtr so that is points to a pointer to b without directly touching ptr?

  Explain the evolution of machine language

consider the evolution of machine language from generation one to fifth generation programming language. Also Explain what you think about the future of programming language?

  What fields you believe would be primary keys

Be sure to include the field type and size. Please do not jump ahead and try to create tables. now I'm just looking for a list of fields. This is somewhat vague on purpose. I want you to decide what is required in the database.

  What levels of osi model tcp/ip functions

Use short answers to define the difference (including the advantages and disadvantages of) between.

  Which power plan is typically used with mobile computers

Which power plan is typically used with mobile computers. Which tab of a service's Properties dialog box do you use to configure the operating system response when the service fails

  Find instruction format for each instruction - mips program

Using the MIPS program below (including bugs), find the instruction format for each instruction and the hexadecimal values of each instruction field.

  When recording digital audio what is the relation of the

question 1 what is a cpu? which two companies manufacture cpus for personal computers?question 2 in what form does a

  Visit a businesss online web presence construct a list of

visit a businesss online web presence. construct a list of complex data types that would be needed to store all the

  State how you would recover an actual set s

Prove accuracy of your greedy algorithm by stating and proving the loop invariant.State how you would recover an actual set S.

  Establish a formal evaluation criterion

Why would it be wise to build a formal evaluation criterion for a company to use when purchasing new hardware or software.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd