Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Entry level python code 1. (2 points) (Attacking the Caesar Cipher.) We discussed how the Caesar Cipher is sus- ceptible to a brute force attack

Entry level python code image text in transcribed
1. (2 points) (Attacking the Caesar Cipher.) We discussed how the Caesar Cipher is sus- ceptible to a brute force attack since there are only 25 possible keys (1-25). Write a function caesarBrute that, given a ciphertext as input, prints to the screen every possible decryption. comment under your func but need to copy these functions into your lab. this function to find the message that led to 'ghm 1h lxvkxm and put the answer in s tion. You are welcome to use any of the functions we wrote in class 2. (3 points) (Two-Key Caesar Cipher.) In the two-key Caesar Cipher, there are two keys key even and key.odd, each a number from 1 to 25. Letters in even positions are shifted over key-even spots, while letters in odd positions in the string are shifted over key-odd spots. Implement encryption and decryption functions for this cipher called tuoCaesarEnc and twoCaesarDec. As with the modifications you made to the Caesar Cipher your functions should only shift letters and handle both upper and lower case letters.(Hint: your encryption function will now take three arguments instead of just two.) 3. (2 points) (A Transposition Cipher: Swap-Them.) To encrypt a string s using the Swap- Them transposition cipher, the character in position i is swapped with the character in posi- tion (key-i)%len (s). Implement encryption and decryption functions for this cipher called swapenc and swapdec For example, swapenc (4,'strong vind) should return nortsdniw g 4. (4 points) (Acronyms.) An acronym is a word formed by taking the first letters of the words in a phrase and making a word from them. For example, RAM is an acronym for "random access memory." Write a function acronym that takes one input string and then outputs t acronym for that phrase. Note: the acronym should be all uppercase, even if the words in the phrase are not capitalized. For example acronym'Random access memory) should return RAM'. (Hint: don't forget to test strings with multiple spaces and spaces at the beginning.) Note that since we have not covered lists, you may not use any string functions or methods that return lists (e.g., split is not allowed)

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

What-if anything-would you say to your other students?

Answered: 1 week ago

Question

1. Which position would you take?

Answered: 1 week ago