CP70045E M.Sc. Fundamentals of Cybersecurity Assignment 1 Brief |UWL

Published: 29 Mar, 2025
Category Assignment Subject Computer Science
University University of West London Module Title CP70045E M.Sc. Fundamentals of Cybersecurity

Question 1: Implementing RSA Key Generation Algorithm (20 pts)

Context: Read Task 1 from the RSA Lab document.

Follow the instructions provided to generate an RSA key pair. The bn_sample.c program demonstrates how to use OpenSSL's BIGNUM operations for mathematical computations. Using these OpenSSL functions, write a C program that fully implements RSA key generation.

Required:

A.    Background (Max word count 300): Summarize the background of RSA encryption, including
o    its fundamental principles and why it is widely used
o    the role of prime numbers in key generation.
o    the importance of modular exponentiation in encryption and decryption.

B. Write a C program named task1.c that performs the following:

  •  Generates two random 256-bit prime numbers (p, q).
  • Computes the RSA modulus: N=p×q
  • Computes Euler’s Totient Function: ϕ(N)=(p−1)×(q−1)
  • Sets a public exponent (e = 65537).
  • Computes the private exponent (d): d=e−1mod ϕ(N)
  • Prints the values for:

o    Generated primes (p, q)
o    Modulus (N)
o    Euler’s Totient (ϕ(N))
o    Public exponent (e)
o    Private exponent (d)
o    Private exponent (d)

  • Reveal keys: Write down your public key (e, N) and private key (d, N).
  • Write the keys to keys.txt: Write down your keys to a file named keys.txt. This file content would be read I the subsequent questions.

Question 2: Encrypting and Decrypting Your Group Name (20 pts)

Context:
In Question 1, you generated an RSA key pair (N, e, d). Now, in Task 2, you will use the generated key values to first encrypt and then decrypt your “Group Name”

Required:
A.   Find a unique group name for yourself, such as group_1, group_2, etc.
B. Write a C program named task2.c that takes plain text input, your group name, performs the following steps:

Step 1: Read public key from keys.txt file Read RSA Modulus (N) in hex format.
Read Public Exponent (e) in hex format. Read Private Exponent (d) in hex format.

Step 2: Convert Message to a BIGNUM
Convert the ASCII input message into a hexadecimal string. Convert the hex string into a BIGNUM.

Step 3: Encrypt the Message
Compute the ciphertext (C) using the RSA encryption formula: C=Me mod N
Print the ciphertext in hexadecimal format.

Step 4: Decrypt the Ciphertext
Compute the decrypted message (M) using the RSA decryption formula: M=Cd mod N
Print the decrypted message in hexadecimal format.

Step 5: Convert Decrypted Hex Back to ASCII
Convert the hexadecimal decrypted message back to ASCII.
Print the final decrypted message and verify that it matches the original input.

Deliverables:

  • task2_c,
  • screenshot of executing the task2_c.

Buy Answer of This Assignment & Raise Your Grades

Order Non Plagiarized Assignment

Question 3: Implement RSA Digital Signing using OpenSSL (20 pts)

Context: In Q2 (previous task), you implemented RSA encryption and decryption. Now, in Q3, you will extend RSA to digital signatures, using the same key pair (e, d, N) from Q1.

Required:

Write a C program named task3.c that takes a message (Your message would be “I owe group_name $2000”) to sign and performs the following steps:

Step 1: Read Inputs
a. Read RSA Modulus (N) in hex format.
b. Read Private Exponent (d) in hex format.

Step 2: Convert the Message to a BIGNUM

  • Convert ASCII input message (M) into hex format.
  • Convert the hex string into a BIGNUM (M_bn).

Step 3: Generate the RSA Signature

  • The digital signature (S) is created using: S=Mdmod N
  • Print the signature (S) in hex format.

Step 4: Modify the Message and Sign Again

  • Change "I owe group_name $2000." → "I owe group_name $3000."
  • Sign the new message and compare both signatures. The resulting screenshot should look like below.

Q4: Implement RSA Signature Verification using OpenSSL (15 pts)

Context: In Q3, you implemented RSA signing using the private key (d, N).
Now, in Q4, you will implement RSA signature verification using the public key (e, N). This ensures that the message came from a valid signer and was not modified.

Required:

Develop task4.c (Signature Verification Program) which does the following.

Step 1: Read Inputs

  • Prompt the user for the RSA Modulus (N) in hex format.
  • Prompt the user for the Public Exponent (e) in hex format.
  • Prompt the user for the Signature (S) in hex format.
  • Prompt the user for the Original Message (M).

Step 2: Verify the Signature

  • Compute: M′=Semod NM' = S^e \mod NM′=SemodN
  •  Convert M' back to ASCII and check if it matches the original message (M).
  • If M' is different, the signature is invalid.

Step 3: Modify the Signature and Re-Verify

  • Change one byte in S to simulate corruption.
  • Repeat the verification and describe what happens.

Question 5: Frequency Analysis (20 pts) Context:

In this question you will analyze an encrypted message without knowing the encryption algorithm used. You will be provided with the following files: task5_1.c, task5_2.c, ciphertext.txt, and mappings.txt

  • task5_1.c: This program performs frequency analysis on the encrypted text. It counts the occurrences of each letter and sorts them in descending order to help infer letter mappings.
  • task5_2.c: This program applies the determined letter mappings to decrypt the text. It takes a mapping file as input and replaces each letter in the ciphertext accordingly.
  •  mappings.txt file is empty initially ( I will only provide sample row to show the format). It should have two columns each column containing a letter.
  • ciphertext.txt: This file containsthe encrypted text.

Required:

A. Decrypt the Ciphertext: In this part you will create the content for the mappings.txt file. For that first run task5_1.c to perform frequency analysis on ciphertext.txt. This will generate frequency statistics for each letter, helping to determine the most probable letter mappings. Create mappings.txt based on the frequency analysis output. Compare the letter frequencies with typical English letter frequencies to infer the correct substitutions.

When you have the mappings.txt ready. run task5_2.c to decrypt the message using the mappings from mappings.txt. This will output the decrypted text. You can adjust mapping.txt file until you are happy with the result.

B.  Reflection and Analysis (Max 250 words)

  • Where did you encounter difficulties during the analysis?
  •  If the ciphertext were longer or shorter, would the decryption process be easier or more challenging?
  • What strategies helped you determine the correct mappings?

Buy Non Plagiarized & Properly Structured Assignment Solution

Order Non-Plagiarized Assignment

Are you worried about the CP70045E M.Sc. Fundamentals of Cybersecurity Assignment 01, There's no need to worry! If you need help on assignments, we are here to assist you We also provide free assignment samples of high-quality, original content written by our PhD expert writers, so you can get an idea of ​​the quality. Our focus is to provide you with computer science assignment help in the UK, that too before the deadline! Now stop worrying about late submissions and contact us for the best grades. Hand over your assignment worries to our experts today!

PSY 101 Introduction to Cultural Psychology Lab Report Assessment Brief | SUSS

The introduction plan is to help you prepare the introduction of your lab report and to ensure you have a good understanding of the topic before writing your lab report.

ECO202: Economic Ideas and Models for Business Tutor-Marked Assignment 2025 | SUSS

ECO202: Conduct research into the private property market and the medical services market in Singapore. Analyse the relevant factors that affect the demand and the supply in these two markets.

BSE207: Exercise Physiology Tutor-Marked Assignment 1 (TMA01) January 2025 | SUSS

BSE207 Question 2: Identify TWO (2) of the major findings of the study. Discuss how the major findings of the study are in agreement or disagreement with other studies cited in the article.

BUSM2562 Understanding Business Environment Assessment 02 Brief | RMIT University

BUSM2562 Task 1 | Project Plan, you are required to set up a project plan that outlines all the assessment tasks in the lead up to an Executive Planning Day. Within the organisation you have recently been employed

COM388: Communication Campaign planning Tutor-Marked Assignment 02 January 2025 | SUSS

COM388: Question, The First Device Campaign in Singapore, initiated by Touch Community Services, is designed to equip children aged five and above with essential life skills, enabling them to navigate

APR 7104 Professional Digital Media Skills Assignment Brief Spring 2025 | RAUL

APR 7104 Professional Digital Media Skills, analyse critically industry online content on a variety of platforms and use that analysis to develop a high-level strategy for their own work on the net, both practical and conceptual

MTH316 Multivariable Calculus Tutor Marked Assignment 01 (TMA01) | SUSS

A GPS application designed for hikers measures the altitude, z, at various positions on a terrain and performs a regression, yielding the altitude function below, where x, y and z are measured in km.

404TH Marketing and Financial Management in Hospitality and Tourism CWK2 (Block 4)  Assignment Brief

404TH: Identify the link between customer relationships and business performance. Evaluate the financial performance and the use of capital investment in a hospitality or tourism business.

ICT114: This question is based on the EASY68K simulated processor: Computer Architecture TMA Assignment | SUSS

ICT114: Computer Architecture Question 3: This question is based on the EASY68K simulated processor. Assume the contents of all data and address registers are equal to zero before the program starts. All numbers are in hexadecimal.

ICT114: Computer Architecture Tutor-Marked Assignment January 2025 Semester Presentation | SUSS

Solved Question 1: A digital system uses 8-bit for integer representation and 32-bit for floating point number representation. Explain and analyse the various number representations and answer the following questions

Online Assignment Help in UK