Answered step by step
Verified Expert Solution
Question
1 Approved Answer
(Simple Encryption) Some information on the Internet may be encrypted with a simple algorithm known as rot13, which rotates each character by 13 positions in
(Simple Encryption) Some information on the Internet may be encrypted with a simple algorithm known as "rot13," which rotates each character by 13 positions in the alphabet. Thus, 'a corresponds to 'n', and 'x corresponds to 'k. rot13 is an example of symmetric key encryption. With symmetric key encryption, both the encrypter and decrypter use the same key. a) Write a program that encrypts a message using rot13. b) Write a program that decrypts the scrambled message using 13 as the key. c) After writing the programs of part (a) and part (b), briefly answer the following question: If you did not know the key for part (b), how difficult do you think it would be to break the code? What if you had access to substantial computing power (e.g., supercomputers)? In Exercise 1 we ask you to write a program to accomplish this. Exercise 1 (Simple Decryption) In Exercise 2, we asked you to write a simple encryption algorithm. Write a program that will attempt to decrypt a rot13" message using simple frequency substitution. (Assume that you do not know the key.) The most frequent letters in the encrypted phrase should be replaced with the most commonly used English letters (a, e, i, o, u,s,t, r, etc.). Write the possibilities to a file. What made the code breaking easy? How can the encryption mechanism be improved? Exercise 2 (Counting Vowels) Write a program that counts the total number of vowels in a sentence. Output the frequency of each vowel
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started