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

  • its fundamental principles and why it is widely used
  • the role of prime numbers in key generation.
  • 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.

The output should be in this format

CP70045E M.Sc. Fundamentals of Cybersecurity

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.

The output should look like below

CP70045E M.Sc. Fundamentals of Cybersecurity

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.

The resulting screenshot should look like below.

CP70045E M.Sc. Fundamentals of Cybersecurity

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.

Deliverables:

  • task4.c
  • Screenshot for the execution of the c file

The output should look like below.

CP70045E M.Sc. Fundamentals of Cybersecurity

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?

CP70045E M.Sc. Fundamentals of Cybersecurity

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!

HWSC4006 Assessment Pack Guide 2025  | GBS

HWSC4006 LO1: Demonstrate preparedness for employment. LO2: Evaluate NHS Skills for Health Level 4 and how they relate to employability, competence, skills, and knowledge.

CEIC2000 Material and Energy Systems Assignment Brief 2025- UNSW Sydney

CEIC2000 Design Assignment Part 1: In your CEIC2000 Design tutorials this term, you will be working in your teams to design parts of a process to produce 100 tonnes per day of compressed hydrogen

AC4006 T1 Fundamentals of Business Accounting Assessment Guide/Coursework Question

AC4006: Fortunate Ltd operates in the United Kingdom (UK) and sells Product A - a perishable food item, which is ordered from suppliers. They also specialise in the manufacture and sale of Product B.

BTEC Unit 23: Financial Management Assignment 2 Question 2025

BTEC Unit 23: LO3. Evaluate approaches to working capital management within an organization.  LO4. Recommend alternative investment appraisal techniques to inform decision making.

Strategic Management & Leadership Assignment Brief 2025

Strategic Management & Leadership Assignment: Critically discuss the role of leadership in developing and implementing strategy and innovation within healthcare organisations.

MW4043 Public Health& Wellbeing Strategies and Interventions Assessment Brief | UCLan

MW4043 Assessment Brief: ‘Develop a proposal for a health education and behaviour change initiative on an appropriate public health topic aimed at a small and specific population group’.

Unit 1: Professional Practice in the Digital Economy Assignment Brief 2025

Unit 1: LO1: Explore the evolution and impact of digital technologies on work environments. LO2: Examine the importance of professional development for career success

44-508607 Personal and Professional Development Portfolio Assignment Brief 2025

The aim of this assessment is to support students to become independent and reflective practitioners; knowledgeable of the requirements to work within their chosen sector and able to demonstrate the skills to develop themselves

SG7001 Strategy, Operations and Partnerships Assignment Brief Apr 2025

In this module, you will learn how to create, evaluate, and improve a business strategy and its operations. You will also learn about the challenges and practices of a strategic manager and how organisations manage their day-to-day activities.

7102MAA CW2 Assignment Brief Apr 2025 : Sustainability & Green Logistics

Prepare a 10 MINUTE (maximum) Individual Poster [PowerPoint] Presentation with embedded Audio Recording to demonstrate your knowledge and understanding of key Sustainability and Green Logistics theories and concepts through critical argument, analyses, and evaluation.

Online Assignment Help in UK