UP TO 15 % DISCOUNT

Get Your Assignment Completed At Lower Prices

Plagiarism Free Solutions
100% Original Work
24*7 Online Assistance
Native PhD Experts
Hire a Writer Now
CSCI361: Cryptography and Secure Applications Assignment, UOW, Singapore you are to design and implement (t, n) Shamirβs secret sharing scheme as described in the lecture in C++, Java or Python
 University University of Wollongong (UOW) Subject CSCI361: Cryptography and Secure Applications
Posted on: 13th Jun 2023

# CSCI361: Cryptography and Secure Applications Assignment, UOW, Singapore you are to design and implement (t, n) Shamirβs secret sharing scheme as described in the lecture in C++, Java or Python

Let πΈππ be an encryption algorithm based on a one-way function πΉ , and π a shared secret key between the sender and the receiver. πΈππ works as follows:

1. Compute πΎ = πΉ(π)||πΉ(2π)||πΉ(3π)||πΉ(4π)||.. ;

2. For a message π, the ciphertext is computed as πβ¨πΎ (i.e., one-time pad).

Assume that an eavesdropper knows the function πΉ but does not know the secret key π.

a) Suppose πΉ is defined as πΉ(π₯) = π π₯ πππ π where p is a 1024-bit prime number and π is a generator of ππβ . Assume that the discrete logarithm problem cannot be solved in the group ππ β . The secret key π is chosen randomly from ππβ1 . Show that the eavesdropper can decrypt the whole message easily once after obtaining π, π, and the first 1024 bits of the plaintext-ciphertext pair.

b) Suppose πΉ is an RSA function, that is πΉ(π₯) = π₯ π πππ π where n is 1024-bit long. Assume the RSA problem cannot be solved in the group ππ β, and r is chosen randomly from ππ β . Show that the eavesdropper can decrypt the
message easily once after obtaining n, e, and the first 1024 bits of the plaintext-ciphertext pair.

In this section, you are to design and implement (t, n) Shamirβs secret sharing scheme as described in the lecture in C++, Java or Python. Your program should be called SSS.cpp, SSS.java, or SSS.py and it comprises at least the following functionalities:

β’ Share Generation: to generate shares in the (t, n) Shamirβs secret sharing scheme. As a hint, you should at least accept the secret, t, n and the modulus in the parameter.

β’ Share Reconstruction: to reconstruct the secret from the given shares in the (t, n) Shamirβs secret sharing scheme.

In this part, you need to explain your design first in file Task2.pdf to explain the logic of your functions. As usual, you need to take the screen capture of the sample run of your program and put it in Task2.pdf as well.

Task 3. ElGamal Signature with SHA-1

In this section, you are to implement an ElGamal signature scheme, where the message will need to be first hashed with the SHA-1 algorithm. The algorithm for SHA-1 is available online, for example at:

In your report for this section, you will need to quote any algorithm where you download online and cite it accordingly, instead of stating that it is written by you. The program is divided into three parts:

β’ Keygen: this part is to generate the private and public key for ElGamal algorithm and store it in a file called πππ¦ππππ.π‘π₯π‘.

β’ Sign: this part is to sign a text file given as an input. In this mode, the program will ask for the name of the text file, then read the private key from πππ¦ππππ.π‘π₯π‘ for signing. Prior to signing the file, the program will compute the hash of the file using SHA-1, then sign it to produce π ππ.π‘π₯π‘.

β’ Verify: this part is used to verify the signature in π ππ.π‘π₯π‘ for the file, using the public key from πππ¦ππππ.π‘π₯π‘.

You need to structure your program using the possible inputs given as the parameter of the program. This part needs to be written in Java, C++, or Python. This part will need to be submitted with the filename ElGamalsign (with .cpp, or java, or py respectively), together with Task3.pdf containing your report detailing how to use the program.

Task 4. Design of One-Time Signature Schemes

A fail-stop signature scheme provides some extra protection to the system. An the unbounded adversary is an adversary who can solve a computationally hard problem, such as discrete logarithm problem and factorization problem.
Please refer to the following scheme:

Key Generation

Public Key:
π¦1 = π π1π¦ π2 (πππ π)
π¦2 = π π1π¦ π2 (πππ π)

π denotes a generator of ππ

β and π¦ is a random element from ππ
β. The private key is (π1,π2, π1,π2).

Signing

π1 = π1π + π1Β  (πππ π)
π2 = π2π + π2 (πππ π)
where π|π β 1. The signature on π is (π1,π2).

The notation π|π β 1 means that π is a multiple of π β 1.

Verification

To verify (π,π1, π2 ), one does the following.
π¦1 ππ¦2 π π1 =? π¦ π2 (πππ π).

If the equation holds, then the signature is accepted. Otherwise, the signature is rejected.

Write a C++, Java or Python program to accomplish the task. You need to take the screen capture of the sample run of your program and put it in a file named

5 Task 5. Implementing Ring Signature of 2 users

In this task, you are to implement a ring signature for 2 users, as described in the lecture notes. The input files are the following:
β’ publickey.txt
β’ message.txt
The file publickey.txt has four lines, which indicates: π1 ,π1 ,π2 ,π2 from RSA algorithm. The message.txt contains a string of characters, which needs to be signed. You need to implement two programs: sign and verify. The sign program will sign the message (from message.txt) and read the public keys from publickey.txt. It will ask for one input, which is user 1 or user 2, who is the signer, and the program will ask for that userβs private key. Then, the sign program will output signature.txt.

The verify program will take an input of publickey.txt, message.txt and signature.txt and it will output True or False to show the verification of the ring signature.

The symmetric encryption should use the AES algorithm. You can import the AES algorithm from the existing library or use any implementation of AES algorithm (with 10 rounds) to do this.

You may implement you program using C++, Java, or Python. You need to take the screen capture of the sample run of your program and put it in a file named

1. Assume that the size of message space (domain) for a given hash function is 2 50. Also, assume that we want the chance of the adversary finding a collision to be at most 2 β30. What is the size of the hash (in bits) required?

2. Sign and verify the message π = 11 using the RSA signature when π = 59, π = 47, and π = 15.

3. Demonstrate that the RSA signature with the parameters given in Q2 is forgeable under chosen message attack with two messages π1 = 2 and π2 = 3.

4. Adam and Bob share the same modulus π = 21 for RSA, and encryption exponents ππ = 5 and ππ = 4 with πππ(ππ,ππ ) = 1 . Charlie sends them the same message π encrypted with ππ and ππ respectively, resulting in the ciphertexts ππ = 14 and ππ = 7. Eve intercepts both ππ and ππ , and applies a common modulus attack to recover the message π. What is the message π?

Write your answer in a file called Task6.pdf. You need to show all the key steps in order to obtain full marks. Submit Task6.pdf together with the other tasks in this assignment to Moodle.

##### Stuck with a lot of homework assignments and feeling stressed ? Take professional academic assistance & Get 100% Plagiarism free papers

Get Help By Expert

Unlock Your Potential in CSCI361 at UOW! Are you struggling with designing and implementing Shamir's secret sharing scheme for your Cryptography and Secure Applications assignment at the University of Wollongong (UOW) in Singapore? Don't let the challenges hinder your progress. Our assignment help services are tailored to cater to your specific needs. Whether it's group-based assignments or individual tasks, our expert writers are equipped with the knowledge and skills required for CSCI361. With our reliable Online Exam Help, you can confidently approach your assessments and achieve academic excellence. Pay our experts to take help on your course and unlock your true potential in CSCI361!

Categories:-
##### No Need To Pay Extra
• Turnitin Report

\$10.00

\$9.00
Per Page
• Consultation with Expert

\$35.00
Per Hour
• Live Session 1-on-1

\$40.00
Per 30 min.
• Quality Check

\$25.00
##### Free

New Special Offer

## Get 30% Off

UP TO 15 % DISCOUNT

Get Your Assignment Completed At Lower Prices

Plagiarism Free Solutions
100% Original Work
24*7 Online Assistance
Native PhD Experts
Hire a Writer Now
My Assignment Help SG Services
My Assignment Help SG