CSCI 4174 Dalhousie University Network Security Programming Code
CSCI 4174/CSCI 6708 NETWORK SECURITY: ASSIGNMENT NO. 5Date Given: Tuesday, March 22, 2022
Date Due: Tuesday, April 5, 2022, 11.59 PM
Submission: On Brightspace
PLEASE READ – GENERAL IMPORTANT NOTES FOR ALL ASSIGNMENTS:
1. During this course, we will be using several network security tools. These tools are legitimate tools
used by network administrators and security professionals for network analysis or security
assessment. It is highly important that you use the network tools that you download only for
educational purposes. Never, intentionally, or otherwise, use any of these tools for malicious
purposes or for gaining unauthorized access. Follow the guidelines and principles of ethical
hacking.
2. For research type questions or for questions that require you to do online searches, please ensure
that all references are properly cited in your answers. Use IEEE or ACM reference styles
(https://www.ieee.org/documents/ieeecitationref.pdf)
(https://www.cs.ucy.ac.cy/~chryssis/specs/ACM-refguide.pdf) . Points will be deducted for
improper citations and citations in incorrect formats.
3. Keep in mind that just because you cite references, you must not “cut-and-paste” from these or
other sources. The write-up must be properly paraphrased and referenced.
4. Late Penalty Policy: The assignment is due at 11.59 PM on the due date. It will not be marked late
up to 5 hours past the deadline, that is, the grace time is until 4.59 AM. Beyond the grace time,
there will be a 10% per day on the mark earned on the assignment. For instance, if your score on
the assignment is 8/10 and there is a 10% late penalty, the score will be reduced to 7.2/10.
Assignments that are five days past due will not be accepted.
5. Submission: Submission will be on Brightspace. Convert your documents into pdf. Submit ONE pdf
file containing the answers to all questions. If you have answers in multiple documents, compress
them into a zip file and upload ONE zip file. Please make sure that your full name and banner ID
appears on the document(s).
6. Student Declaration of Absence (SDA): Not required. You have the option to drop one of the six
assignments during the course. No SDA submission is required.
This assignment has two exercises, the first is exploratory and the second involves coding.
Exercise 1 (Exploratory): We discussed Data Encryption Standard (DES) in the lectures as an example of one of the
first symmetric block cipher standards. The Advanced Encryption Standard (AES) is a successor algorithm to DES and
contains more robust features and is more secure against attacks.
In this assignment, you are to read online sources about AES and prepare a one-page summary report giving an
overview of the AES standard, its features, algorithms used, and AES security with advantages and drawbacks. You can
write your report as a summary with bullet points. The report’s approximate length is one page and use 12-point
Times Roman single line spacing font style. Put citations and figures (if required) on additional pages.
Here are some starting online sources on AES:
https://searchsecurity.techtarget.com/definition/Advanced-Encryption-Standard
https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
https://www.tutorialspoint.com/cryptography/advanced_encryption_standard.htm
Exercise 2 (RSA Emulation): The objective of the exercise is to emulate the RSA algorithm. Your program must
accept two prime numbers, p and q, and determine the public and private keys. Then it must accept a plaintext
message, represented by an integer m, and determine the ciphertext c. It should then decrypt the ciphertext c
to get back the original integer m. Your program should be implemented from first principles without using
standard libraries for RSA.
Design the program to accept user input from the console and display the output to the console.
A sample dialog is given below:
Enter the prime numbers, p and q: 11
17
Calculating RSA values ….
Public RSA key is (3, 187)
Private RSA key is (107, 187)
Enter the plaintext message m (an integer):
Encrypting m…
The ciphertext c is
125
Decrypting c ….
The plaintext m is
5
5
Use the steps of the RSA algorithm discussed in the lectures, and given below, in your program:
1. Choose two primes p and q (these are the input values).
2. Find their product n = pq
3. Choose an integer e that is < n and relatively prime to (p-1)(q-1), that is, e and (p-1)(q-1) do not have common
factors.
4. Find an integer d such that ed mod (p-1)(q-1) = 1
Then the public RSA key is (e,n) and the private RSA key is (d, n).
Encryption formula is c = me mod n
Decryption formula is d = cd mod n
For calculating cd mod n where cd can be a large number, use the mod calculation method discussed in the
lectures. For example, to calculate 125107 mod 187, express 107 in powers of 2 as follows:
125(64 + 32 + 8 + 2 + 1) mod 187 = ((12564 mod 187)(12532 mod 187)(1258 mod 187)(1252 mod 187)(125 mod 187))mod 187
Then find the result by working from the smallest power upwards: using 125 mod 187 you would find 1252 mod
187, from that you would find 1258 mod 187, and so on.
Test your program for at least three sets of inputs.
What to submit: A zip file containing the following: a) PDF for Exercise 1; b) Source code for Exercise 2; c)
Sample inputs/outputs for Exercise 2.
Top-quality papers guaranteed
100% original papers
We sell only unique pieces of writing completed according to your demands.
Confidential service
We use security encryption to keep your personal data protected.
Money-back guarantee
We can give your money back if something goes wrong with your order.
Enjoy the free features we offer to everyone
-
Title page
Get a free title page formatted according to the specifics of your particular style.
-
Custom formatting
Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.
-
Bibliography page
Don’t pay extra for a list of references that perfectly fits your academic needs.
-
24/7 support assistance
Ask us a question anytime you need to—we don’t charge extra for supporting you!
Calculate how much your essay costs
What we are popular for
- English 101
- History
- Business Studies
- Management
- Literature
- Composition
- Psychology
- Philosophy
- Marketing
- Economics