Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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: http://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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91787990

Have any Question?


Related Questions in Computer Engineering

Make a function first-char that consumes a nonempty string

Make a function first-char that consumes a nonempty string and produces a string consisting of the first character in the original string. Do not use string-ref.

A humane society claims that less thannbsp32 of us

A humane society claims that less than 32% of U.S. households own a dog. In a random sample of 410 U.S.? households, 153 say they own a dog. At alpha(α) = 0.03, is there enough evidence to support the? society's claim? C ...

What is asymmetric information and how does it affect the

What is asymmetric information and how does it affect the consumer or buyer?

Question suppose you have a 50-bit string that contains

Question : Suppose you have a 50-bit string that contains exactly 37 ones at random positions. How many bits of entropy does this string contain?

Consider the car-caravan analogy from section 4 in chapter

Consider the car-caravan analogy from Section 4 in Chapter 1.  In this problem, assume a propagation speed of 120 km/hr and that each toll booth takes 8 seconds to service a car. a) Suppose the caravan of 10 cars begins ...

Respond to the statement below in at least 100 words

Respond to the statement below in at least 100 words. Original answers only. If developers are making decisions on the requirements, then how do they know that the software will work properly for the end user? Developers ...

One of the issues in early virtualization use was slow

One of the issues in early virtualization use was slow performance due to translation of system commands. Which piece of computer hardware was revised to run hypervisors natively? Also There are three "families" of opera ...

Quesiton direct manipulation and virtual environments

Quesiton: "Direct Manipulation and Virtual Environments" Please respond to the following: • Your software development company has been contracted to build a tool that will manage user accounts and rights in an Active Dir ...

Suppose pointers are 4 bytes long and keys are 12 bytes

Suppose pointers are 4 bytes long, and keys are 12 bytes long. How many keys and pointers will a block of 16,384 bytes have?

You are given a test to enter graduate school you must

You are given a test to enter graduate school. You must select 10 of the 13 essay questions to answer to determine your writing skills. How many ways can you select those questions?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As