Decipher simple encrypted messages using a range

Assignment Help Python Programming
Reference no: EM133527720

Applied Cryptography Assignment

Assignment 1:
In this Assignment, you will be applying symmetric encryption, decryption, and hashing of data files using the Python programming language.

Learning Outcome 1: Explain the concepts and principles on which modern cryptography relies upon.
Learning Outcome 2: Employ adapted cryptographic tools and techniques to encrypt, decrypt and sign messages.
Learning Outcome 3: Decipher simple encrypted messages using a range of cryptanalysis methods.

The Assignment

Your mission, should you choose to accept it, is to take a given data file and a partially complete python file and finish the encryption / decryption / hashing / and collision checking activities outlined below.

While this is not a programming unit, you may, in the future need to explore how to use a new st

library to achieve a task. This assignment will get
you to look at the documentation for a small number of Python cryptographic libraries and apply those libraries to your problem. the main cryptography python library - can be used to provide some functionality to encrypt, decrypt, and hash files with symmetric cryptography and hash functions.

What we've provided for you:

1. birthday_aNack_statistics.py - A file that runs a simulated 'birthday aflack' scenario on a random sample of dates in a given date range and repols on the average number of attempts to get a collision.
2. crypto_a1_activity.py - A skeleton python file is provided in iLearn just under this specification . It contains functions to-be completed for this assignment.
3. assignment_answers.txt - A template text file for you to replace selected lines with your answers / outputs from programs.
4. two files, but you only need to use one of
them depending on your OS.
1. windows_data_encrypted.txt
2. mac_Iinux_data_encrypted.txt

Instruction
Setup: Put all of the files ( birthday_attack_statistics.py, crypto_a1_activity.py, assignment_answers.txt, windows_data_encrypted.txt,
mac_linux_data_encrypted.txt) into a folder and open that folder up in your chosen pyhon IDE (e.g. visual studio code).

Task 0:

a) run birthday_attack_statistics.py and copy the last line of the console output into the assignment_answers.txt file for subtask a. The console line should start with
"average number of attempts "

b) now, modify birthday_attack_statistics.py to start a search from your birthday date up until the assignment due date (24 September 2023). Use the lecture slides on the birthday paradox to calculate what your expected size should be for a 50% chance of a collision to have occured with this new date range. Run your updated birthday_attack_statistics.py and copy the new updated console output ¿ust the last line) for subtask b. In the line underneath, indicate if the average was close (within +-2 of what you calculated) or not close (outside 1he +-2 of what you calcualted).

Task 1:

You have been be given an encrypted file that a student has encrypted, but they forgot which student ID they typed. You suspect they might have used the student ID 4000000 instead of their student number.
• modify the task_1(...) function in crypto_a1_activity.py
• modify the decrypt_fiIe(...) function in crypto_a1_activity.py
to call the functions you need to try and decrypt a file. We've provided some empty functions in the file for you to complete with some guidance. You will also need to implement the decrypt_file(...) function for your task J to be completed.
Once you've completed the code, run your python code to decrypt the file and see what the output was: (how to run it...)

Windows users in vscode terminal: python crypto a1 activity.py 40000000 task1
windows data encrypted txt windows data decrypted txt
Mac / Linux users in vscode:
python crypto a1 activity.py
40000000 tasL1

mac Linux aa£a encrypLeo.LxL
mac linux data decrypted.txt

If you've successfully decrypted the file, then copy line 5 of the text file and paste it as your answer. Hopefully the text should be readable in English...

Task 2:

Now that you've successfully decrypted the file, what we would like to you to do is re-encrypt the file. You will need to add code into the task_2 function and also implement the encrypt_fiIe function
• modify the task_2(...) function in crypto_a1_activity.py
• modify the encrypt_fiIe(...) function in crypto_a1_activity.py
J) If you've successfully implemented the function, then you should be able to run the python file with student number 4O000OO0, take in your decrypted file, and then output to a newly encrypted txt.

2) Take the same decrypted file and encrypt it using your own student number. save the output file as task2.txt

3) & We will check the .start of your has with our version run with your student number.

Task 3:

use your student number to encrypt and decrypt the decrypted file. Write "Success:" or "not success" in your answer file for task 3. provide the first 2O characters of the encrypted file (which should be the same as task 2).

Task 4:

Hash the unencrypted data file using SHA256 and copy the hash into task 4

• modify the task_4(...) function in crypto_a1_activity.py
• modify the generate_hash(...) function in crypto_a1_activity.py

Task 5: hash the fiIe that was encrypted with your student number (task2.txt) and save the resultsin task5.txt copy the hash stored in the output file into the assignment_answers.txt file in task 5.

Attachment:- Applied Cryptography.rar

Reference no: EM133527720

Questions Cloud

What is the significance obesity and increased bmi : What is the significance obesity and increased BMI in the context of PCOS? Please provide references, please do not steal information.
What hospice care how do they differ : What Palliative Care and what Hospice Care How do they differ? How are they the same? When in the course of a disease process should patients and their families
How you plan to evaluate achievement of your practicum : how you plan to evaluate achievement of your Practicum Project objectives. What will the evaluation(s) measure and what information you can gain from that.
Discuss any ethical considerations associated with this : Describe a "typical" problem presented by families in treatment with intrapsychic or linear constructions (e.g., acting-out adolescent, absent father/ husband
Decipher simple encrypted messages using a range : Explain the concepts and principles on which modern cryptography relies upon and Decipher simple encrypted messages using a range of cryptanalysis methods
What are all of the things you are currently balancing : What are all of the things you are currently balancing? Work? School? Family? How well are you keeping balance in your life? What are some key things you feel
What is the relevance of psychiatric mental health nurse : What is the relevance of Psychiatric mental health nurse practitioner in identifying, diagnosing, treating and managing depression in an outpatient mental
Review of the information that you have gathered from : briefly touch upon the many aspects that were included in the milestones. Make sure to use citations as needed. Close with the potential solutions to burnout
Discuss how much power these stakeholders exert : Who are the stakeholders and/or power players in the policy of improving accessibility and outcome of mental health? Include both pro and con stakeholders

Reviews

Write a Review

Python Programming Questions & Answers

  Python program that reads in a series of positive integers

Write a Python program that reads in a series of positive integers and writes out theproduct of all the integers less than 25 and the sum of all the integers greater than or equal to 25. Use 0 as a sentinel value

  Write a program that prints the longest substring

HIT137 SOFTWARE NOW - Charles Darwin University - Write a program that prints the longest substring - Write a python program that allows the user to navigate

  Computing and storage infrastructure design

Computing and storage infrastructure design, and Information integration - A Python scrip file with the name ‘practice_locator.py' will contain this RESTful

  Steganography method to send messages

Steganography method to send messages, you must implement two processes connected via sockets or a similar mechanism: a sender and a receiver

  Write a program that multiplies two hard-coded numbers

Write a program that multiplies two hard-coded numbers, then prints the individual numbers out and prints thier product out, all on separate lines.

  Write a python program that prompts the for the name

Write a PYTHON program that prompts the user for the name of the item and the price of each item, and then simply displays whatever the user typed.

  Implement a neural network and search

Implement a neural network and search its hyperparameters for handwritten digits classification and Add your code in the following blocks, and do not change

  Design and development - research design

Design and Development/ Research Design (Explanation of whole procedure, dataset collection, data cleansing, data preprocessing, converting into binary dataset

  Construct a schedule implementing the Johnson rule

Write a python program to construct a schedule implementing the Johnson's rule. Map out the solution of this problem on a Gantt chart and calculate the makespan

  Write about the validity of the political dogma

CSE 231-Write a paragraph on your conclusions of the validity of the political dogma that "Democrats want big government and Republicans create jobs."

  Define your except blocks before the try block

What keyword do we use to specify a block of code that will handle an exception? Define your except blocks before the try block.

  How to plot taylor series approximation along with graph

How to describe the main features of this graph and how those features relate to the loss of precision when numbers of very different magnitudes.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd