Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

http://tschwarz.mscs.mu.edu/Classes/COSC1010/Projects/Project1/cipher.txt this is the link for the encrypted file cipher.txt http://tschwarz.mscs.mu.edu/Classes/COSC1010/Projects/Project1/cipher.txt.zip this is the link for the encrypted file cipher.txt as zip file and this

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

http://tschwarz.mscs.mu.edu/Classes/COSC1010/Projects/Project1/cipher.txt

this is the link for the encrypted file cipher.txt

http://tschwarz.mscs.mu.edu/Classes/COSC1010/Projects/Project1/cipher.txt.zip

this is the link for the encrypted file cipher.txt as zip file

and this is for python thank you very much

Project 1: Breaking the unbreakable Code The middle ages made great progress in many human arts, not excluding the art of cryptography. One of the breakthroughs was an improvement on the Caesar cipher, that was made popular by Vigenre as the "unbreakable code". Caesar's Cipher We first take a look at Caesar's code and how to program it in Python. As is traditional, we convert each text into one containing only capital letters. The Caesar cipher uses as a secret a single letter. It conceptually then places two copies of the alphabet over each other, where the "A" is arranged over the secret letter. If the secret letter is N, then A B C DEF GHIJ K LMNOPQ RST UV WX Y Z NOPQRSTUVVV X Y Z A B C D E F G H I J K L M This table defines the encoding. The letters in the cleartext are then substituted by the letters of which they are placed. For example, "GAULASAWHOLEISDIVIDEDINTOTHREEPARTS becomes "TNHYNFNJUBYRVFQVIVQRQVAGBGUERRCNEGF" There are many ways in which we can implement this transition. One possibility is to use the encoding of ASCII letters. As we have learned, there exist encodings for letters. In Python, we can use the function ord, that gives the encoding for a letter as a decimal integer. Here is the encoding of the capital letters. A B C DEF GHIJ K LMNOPQ RST UV WX Y Z 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 The reverse function is chr. You can see this in action with a simple for loop for letter in "ABCDEFGHIJKLMNOPQRSTUVWXYZ": print (letter, ord(letter)) for num in range (65,91): print (num, chr (num) ) If we want to encode the preceding table, we take the difference between the encoding of a letter and the encoding of 'A'. For example, if the letter is 'J', then we obtain ord (' J')- ord ( 'A')-9. This Just means that J, is the ninth letter of the alphabet. We add the difference to the code of the key: ord 'J- ord 'A') tord('N') - 87, which is the encoding of the cipher for 'J', namely 'W". Unfortunately, we need to be careful about going beyond Z'. If we want to encode 'T', the same calculation yields ord ('T') - ord'A ord('N) 84-65+78-97. Project 1: Breaking the unbreakable Code The middle ages made great progress in many human arts, not excluding the art of cryptography. One of the breakthroughs was an improvement on the Caesar cipher, that was made popular by Vigenre as the "unbreakable code". Caesar's Cipher We first take a look at Caesar's code and how to program it in Python. As is traditional, we convert each text into one containing only capital letters. The Caesar cipher uses as a secret a single letter. It conceptually then places two copies of the alphabet over each other, where the "A" is arranged over the secret letter. If the secret letter is N, then A B C DEF GHIJ K LMNOPQ RST UV WX Y Z NOPQRSTUVVV X Y Z A B C D E F G H I J K L M This table defines the encoding. The letters in the cleartext are then substituted by the letters of which they are placed. For example, "GAULASAWHOLEISDIVIDEDINTOTHREEPARTS becomes "TNHYNFNJUBYRVFQVIVQRQVAGBGUERRCNEGF" There are many ways in which we can implement this transition. One possibility is to use the encoding of ASCII letters. As we have learned, there exist encodings for letters. In Python, we can use the function ord, that gives the encoding for a letter as a decimal integer. Here is the encoding of the capital letters. A B C DEF GHIJ K LMNOPQ RST UV WX Y Z 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 The reverse function is chr. You can see this in action with a simple for loop for letter in "ABCDEFGHIJKLMNOPQRSTUVWXYZ": print (letter, ord(letter)) for num in range (65,91): print (num, chr (num) ) If we want to encode the preceding table, we take the difference between the encoding of a letter and the encoding of 'A'. For example, if the letter is 'J', then we obtain ord (' J')- ord ( 'A')-9. This Just means that J, is the ninth letter of the alphabet. We add the difference to the code of the key: ord 'J- ord 'A') tord('N') - 87, which is the encoding of the cipher for 'J', namely 'W". Unfortunately, we need to be careful about going beyond Z'. If we want to encode 'T', the same calculation yields ord ('T') - ord'A ord('N) 84-65+78-97

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Have issues been prioritized?

Answered: 1 week ago

Question

Has the priority order been provided by someone else?

Answered: 1 week ago

Question

Compare the current team to the ideal team.

Answered: 1 week ago