Question: Please code in C language 1. Write a program that takes an input string from the user and encrypts the message, or decrypts it, using

Please code in C language

Please code in C language 1. Write a program that takes an

1. Write a program that takes an input string from the user and encrypts the message, or decrypts 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 kh locations later (allowing wraparound; that is, having the letter 'Z' followed by the letter 'A' and the letter 'z' followed by the letter 'a') E(x) + k) mod 26 Dk (x) - (x - k) mod 26 Detailed example below: Plain text: The quick brown fox jumps over the lazy dog Ciphertext 1Uif rvjdl cspxo gpy kvnqt pwfs uif mbaz eph 5 Ymj vznhp gwtbs ktc ozrux tajw ymj qfed itl Znk waoiq hxuct lud pasvy ubkx znk rgfe jum 7Aol xbpjr iyvdu mve qbtwz vcly aol shgf kvn 8 Bpm ycqks jzwev nwf rcuxa wdmz bpm tihg lwo 11Esp bftnv mczhy qzi ufxad zgpc esp wlkj oz 12Ftq cguow ndaiz raj vgybe ahqd ftq xmlk pas 20 Nby kocwe vliqh zir dogjm ipyl nby futs xia 21 Ocz lpdxf wmjri ajs ephkn jqzm ocz gvut yjb 25 Sgd pthbj aqnvm enw itlor nudq sgd kzyx cnf 26 The quick brown fox jumps 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 lqyroyh vxewlwxwlqj rqh wklqj iru dqrwkhu c) What is the maximum number shifts before you could decrypt the message in part b

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!