Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1a. Using the original plaintext below in bold quotes (e.g. use only alphabet characters, a-z), write a program (in Matlab or python) to encrypt

Problem 1a.

Using the original plaintext below in bold quotes (e.g. use only alphabet characters, a-z), write a program (in Matlab or python) to encrypt plaintext into ciphertext using the Caesar cipher.

If he had anything confidential to say, he wrote it in cipher, that is, by so changing the order of the letters of the alphabet, that not a word could be made out. Getting started:

1.Define the shift value i.e., the number of positions we want to shift from each character.

2.Iterate over each character of the plain text:

1.If the character is alphabet:

1.Calculate the position/index of the character in the 0-25 range.

2.Perform the positive shift using the modulo operation.

3.Find the character at the new position.

4.Replace the current letter with this new character.

2.Else, If the character is not an alphabet, ignore the character, and move to the next position in the plaintext. with no change.

3.Your program is to print or graph results.

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

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions