Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please check before sending me and please dont use gets,thank you very much! Write a C program decode.c which decrypts text encrypted by substitution.c For

please check before sending me and please dont use gets,thank you very much!

image text in transcribedimage text in transcribed

Write a C program decode.c which decrypts text encrypted by substitution.c For example: $ ./decode qwertyuiopasdfghjklzxcvbnm Ovql leqktr gy rtfzolzl qfr zit raka I was scared of dentists and the dark Ovql leqktr gy hktzzn uoksl qfr lzqkzofu egfctklqzogfi I was scared of pretty girls and starting conversations Ctrl-D $ ./decode abcdefghijklmnopqrstuvwxyz The identity cipher!!! The identity cipher!!! $ ./decode bcdefghijklmnopqrstuvwxyza Uif Dbftbs djqifs jt b tvctfu pg uif tvetujuvujpo djqifs! The Caesar cipher is a subset of the substitution cipher! Ctrl-D Your program will only be tested with an appropriate command line argument - but a good programmer would check the command line argument is present and appropriate. Manually Cracking a Substitution Cipher This English text was encrypted with a substitution cipher. Di jd, vdl'ht xtqa dh O qn Vdl rdlwk O'ss wdkith htqromu omkd ok O fhdwqwsv xdm'k Styk kd nv dxm rtzoetj Wlk kiqk'j kit royythtmet om dlh dfomodmj Vdl'ht q ndlkiyls Kiqk qndlmkj ydh qmdkith xtta dm nv dxm Mdx O'n q mdzts nart htjdlhetyls The identity cipher!!! The identity cipher!!! $ ./decode bcdefghijklmnopqrstuvwxyza Uif Dbftbs djqifs jt b tvctfu pg uif tvctujuvujpo djqifs! The Caesar cipher is a subset of the substitution cipher! (Ctrl-D Your program will only be tested with an appropriate command line argument - but a good programmer would check the command line argument is present and appropriate. Manually Cracking a Substitution Cipher This English text was encrypted with a substitution cipher. Di jd, vdl'ht xtqa dh O an Vdl rdlwk O'ss wdkith htqromu omkd ok O fhdwwsv xdm'k Styk kd nv dxm rtzoetj Wlk kiqk'j kit royythtmet om dlh dfomodmj Vdl'ht q ndlkiyls Kick qndlmkj ydh qmdkith xtta dm nv dxm Mdx O'n q mdzts nart htjdlhetyls O jkqhk q eiqom xoki nv kidluik Kasa oj eitqf, nv rahsomu Xitm vdl'ht yttsomu houik gk idnt O xqmmq nqat vdl ndzt xoki edmyortmet O xqmmq wt xoki vdl qsdmt What was the original text? Hint: use frequency_analysis.c on the encrypted text and compare the frequencies to English letter frequencies and then try your guesses with decode.c

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

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

0201844524, 978-0201844528

More Books

Students also viewed these Databases questions

Question

What about leadership lessons from particularly good or bad bosses?

Answered: 1 week ago

Question

When would you use one approach, and when would you use another?

Answered: 1 week ago