Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HW 03 CI5 477 1. Write a program that takes an input string from the user and encrents the message, or decrvpts it, using a

image text in transcribed
HW 03 CI5 477 1. Write a program that takes an input string from the user and encrents the message, or decrvpts it, using a variable shift cipher Shift Cypher: creates one substitution alphabet (monoalphabetic) where each letter in the plaintext message is substituted by the letter ka locations later (allowing wraparound; that is, having the letter "Z" followed by the letter 'A' and the letter 't' followed by the letter 'a). .(x)-(x+k)mod 26 Dr(x)-k) mod 26 Detailed example below: Plain text: The quick brown fox jumps over the lazy dog Ciphertext Ymj vznhp gwtbs ktc ozrux tajw ymj qfed it nk waoig hxuct lud pasvy ubkx znk rgte jum Esp bftnv mczhy qzi ufxad zgpc esp wikj ozr 12 Ftq cguow ndaiz raj vgybe ahqd ftq xmlk pas Nby kocwe vligh zir dogjn ipyl nby futs xia 26 The quick brown fox junps over the lazy dog a) Implement the following functions: char "shiftCipher (char inputstr, int k) char revShiftcipher (char inputstr, int k) b) Decrypt the following message assuming it uses a shift cipher: fubswrjudsklf dojrulwkpv lgyroyh vxevwlwxwlqj rgh wklqj iru dqrwkhu c) What is the maximum number shifts before you could decrypt the message in part b? Compress your source code as a one file and upload it to Blackboard HW 03 CI5 477 1. Write a program that takes an input string from the user and encrents the message, or decrvpts it, using a variable shift cipher Shift Cypher: creates one substitution alphabet (monoalphabetic) where each letter in the plaintext message is substituted by the letter ka locations later (allowing wraparound; that is, having the letter "Z" followed by the letter 'A' and the letter 't' followed by the letter 'a). .(x)-(x+k)mod 26 Dr(x)-k) mod 26 Detailed example below: Plain text: The quick brown fox jumps over the lazy dog Ciphertext Ymj vznhp gwtbs ktc ozrux tajw ymj qfed it nk waoig hxuct lud pasvy ubkx znk rgte jum Esp bftnv mczhy qzi ufxad zgpc esp wikj ozr 12 Ftq cguow ndaiz raj vgybe ahqd ftq xmlk pas Nby kocwe vligh zir dogjn ipyl nby futs xia 26 The quick brown fox junps over the lazy dog a) Implement the following functions: char "shiftCipher (char inputstr, int k) char revShiftcipher (char inputstr, int k) b) Decrypt the following message assuming it uses a shift cipher: fubswrjudsklf dojrulwkpv lgyroyh vxevwlwxwlqj rgh wklqj iru dqrwkhu c) What is the maximum number shifts before you could decrypt the message in part b? Compress your source code as a one file and upload it to Blackboard

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 Publishing With Filemaker Pro On The Web

Authors: Maria Langer

1st Edition

0201696657, 978-0201696653

More Books

Students also viewed these Databases questions

Question

Discuss the purpose of the publication of anonymous case histories.

Answered: 1 week ago

Question

121. If X is uniformly distributed on [1, 3], find the pdf of Y X2.

Answered: 1 week ago

Question

What is the effect of word war second?

Answered: 1 week ago