Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please make sure the code is tested and properly runs before posting the solution. Write a program in any language you like (Java, C, PHP,

Please make sure the code is tested and properly runs before posting the solution.

Write a program in any language you like (Java, C, PHP, Python) to implement Vigenere Ciphering and deciphering schemes. [50 points]

TheVignere cipher uses a pass phrase to encrypt and decrypt. For example, to encrypt hello world with a pass phrase seal, the pass phrase is repeated over and over again in order to align with the whole plain text. The letter from the pass phrase marks the row and the letter from the plain text marks the column. The encrypted letter is found based on row and column numbers from the following Figure 1.

image text in transcribed

An example of encryption step is shown below.

image text in transcribed

To decrypt, we would reverse the process. Use the same pass phrase seal repeatedly with the encrypted text. This time, the letter from the pass phrase marks the column and the letter from the encrypted text marks the row. An example of decryption step is shown below.

image text in transcribed

A sample snapshot of your programs output should look as follows:

image text in transcribed

a bcdefghijkl mnopqrstu v wxyz a ab cdef ghijk1 b bcdefghjk1mnopqr mnopqrstuvw x y z cdefghjk1mnopqrs efghjk1mnopqrs ghjk1mnopqrstuvwxyzabcde m nopqrstu v wxyza bcde k l m n o pqr stu v w x y z abcdef g k l mn opqr stu vwxyzabcd efg h jk1mnopqrstuvwxyzabcdefgh j Imnopqrstuvwxyzabcdefghjk m m n opqrst u vwx yzabcdefghijki1 o o p qrstu v Wxyzabcdef ghijkl mn q qrstuwv x y z a b c d e f g h j k l m n o p r r s tu vwxyza bcdefghijklmno pq zabcdefghj v w x y z a b c d e f g h j k 1 y yzabcdefghjk1mno u uvv. x y z a b c d e f g h j k l m n o p g r s t mnopqrstu w x y z a b c d e f g h i j k l m n o p q r s t u v r s tu v W zabcdefghj k1mnopqrs Figure 1: Mapping of row and column for Vignere ciphei Pass Phrase seals ealse Plain Text: Encrypted Text: zilwg aocdh hello world Pass Phrase: seals ealse Encrypted Text: zilwg aocdh Plain Text: hello world Ciphering mode: Enter Plain Text to be Encoded: hello world Enter Pass Phrase (no spaces allowed): seal Encoded Text: zilwg aocdh Deciphering mode: Enter Encoded Text to be Decoded: zilwg aocdh Enter Pass Phrase (no spaces allowed): seal Decoded Plain Text: hello world

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions