Cryptanalysis of substitution ciphers

Assignment Help C/C++ Programming
Reference no: EM13679248

The implementation has to be in C or C++ as these are the most recommended (for combined performance and user convenience) programming languages to implement cryptography solutions in the real world. The project comes with a minimal assignment and requires a submission of both software and a report being graded mainly by the TAs according to scoring criteria defined below; any additional work you perform, including a project presentation, will be considered extra credit work (specifically, Extra Credit 3) if clearly identified in the report.

Project 1 Cryptanalysis of substitution ciphers:

This cryptanalysis project consists of a software implementation of an algorithm that tries to decrypt an L-symbol challenge ciphertext using a plaintext dictionary (containing a number q of English words or plaintexts obtained as a sequence of English words), using only partial knowledge of the encryption algorithm used, no knowledge of any keys involved. Your program's goal is to find the plaintext (as one of the dictionary plaintexts or one sequence of English words from those used for the dictionary) and within a reasonable amount of time.

Your program should take as input from stdin:

  1. the number t of key symbols,
  2. an L-symbol challenge ciphertext,

where each symbol is either a space or one of the 26 lower-case letters from the English alphabet (thus, not a special character, punctuation symbol or upper-case letter). Your program should return as output a guess for which L-symbol plaintext was encrypted, where again each symbol is either a space or one of the 26 lower-case letters from the English alphabet (thus, not a special character, punctuation symbol or upper-case letter). A text file Dictionary1 containing a number u of L-symbol candidate plaintexts will be provided to you (as an attachment at the top of this page), and you should feel free to use its content as part of your code. A text file Dictionary2 containing a number v of English words will be provided to you (as an attachment at the top of this page), and you should feel free to use its content as part of your code.

Your executable file should be named "<last name1>-<last name2>-decrypt". Upon execution, it should obtain the above inputs 1,2 from stdin, and finally return the output plaintext on stdout within x minutes (or else it will be declared to default to an incorrect guess); most likely, we will choose x = 2.

Your program will be run using different parameters (most likely: L between 50 and 150, u between 100 and 150, v between 100 and 200, and t between 1 and 40), and on a number of challenge ciphertexts, each computed using a potentially different encryption scheme. Each ciphertext will be computed from a plaintext selected in one of the following two ways:

  1. randomly and independently choosing one of the L-symbol plaintexts in Dictionary1 or
  2. concatenating words randomly and independently chosen from Dictionary2 (any two words being separated by a space, until one has an L-symbol plaintext).

All the encryption schemes used have the following common features:

  • The message space and ciphertext space are the set {<space>,a,..,z}^L. In other words the message m can be written as m[1],...,m[L], where each m[i] is in {(space>,a,..,z}, and the ciphertext c can be written as c[1],...,c[L], where each c[i] is in {<space>,a,..,z}
  • The key space is the set {0,..,26}^t. In other words the key k can be written as k[1],...,k[t], where each k[j] is in {0,..,26}, for j=1,..,t.
  • The encryption algorithm computes each c[i] as equal to the (lexicographic) shift of m[i] by k[j(i)] positions, where the computation of each j(i) is left unspecified and may depend on i,t,L. In other words, each ciphertext symbol c[i] is the shift of the plaintext symbol m[i] by a number of position equal to one of the key symbols, which symbol being chosen according to an undisclosed, deterministic, and not key-based, scheduling algorithm that is a function of i, t and L.

Your accompanying report should at least include the following sections:

  1. team member names; the list of project tasks performed by each student in the team; any modifications you made with respect to the above specifications
  2. a detailed explanation of the cryptanalysis approach used in your program

Allowed extensions (to be considered as extra credit) include any one among the following:

  1. a report section containing a brief (i.e., <= 2 pages) survey on substitution ciphers
  2. a report section containing a brief (i.e., <= 2 pages) survey on cryptanalysis approaches for substitution ciphers
  3. an approach to decrypt an arbitrary random English plaintext (that is, an L-letter sequence of random English words with spaces, but no punctuation, or upper-case letter), possibly using English words not in the dictionary files;
  4. anything else you want to add

Reference no: EM13679248

Questions Cloud

A case study on the respiratory system : A Case Study on the Respiratory System
Monetary policy : We are in 2012 and you have just been appointed Governor of the Central Bank of a hypothetical advanced economy, and you have to chair your first Monetary Policy meeting - carefully explain the pros and cons.
What is the entropy change : Initially 5 mol of an ideal gas with Cv,m=12.5 J K^-1 mol^-1 are at a volume of 5 dm^3 and a temperature of 300K. If the gas is heated to 373 K and the volume changed to 10 dm^3, what is the entropy change?
Probability of the new product achieving break-even : Compute break-even at each level and Is the company likely to achieve its desired target profit of $4,000,000 or more? Support your discussion with financi alanalysis.
Cryptanalysis of substitution ciphers : Cryptanalysis project consists of a software implementation of an algorithm that tries to decrypt an L-symbol challenge ciphertext using a plaintext dictionar - implementation has to be in C or C++ as these are the most recommended (for combined p..
Organism may be similar to the first autotrophs : What present-day organism may be similar to the first autotrophs? Why?
Predict the relative rate of mitosis in a tree : Predict the relative rate of mitosis in a tree in your backyard during the four seasons of the year.
Distinguish between filtration and reabsorption : Distinguish between filtration and reabsorption.
What is the current growth rate in the economy : What is the growth rate in sales for the past three years and are revenues and expenses growing at the same rate? What was the experience in the past few years - what is the current growth rate in the economy?

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write c program to read one ip address

Write a C or C++ program which Read one IP address at a time from Dec_IPAddresses.txt and convert it into Hex. Store converted values stored in another file (e.g. HEX_IPAddresses.txt).

  Menu with options to enter student information

Create a program that uses a menu with options to enter student information (name, ID, GPA), print student information, or quit the program. Use data files and FILE pointers to store and print information entered.

  Local diner that allows customers to see the diner''s menu

Design a program to be used for a small local diner that allows customers to see the diner's menu and then make their meal selections using the program.The program will also calculate and print an itemized bill.

  Program that asks the user to enter up to 100 integer score

Write a C program that asks the user to enter up to 100 integer scores, which are to be stored in an array. (You should allow the user to terminate input prior to entering all 100 scores.) The program should then display all the scores, ten per line,..

  Write a program that inputs a dollar amount to be printed

Write a program that inputs a dollar amount to be printed on a check and then prints the amount in check-protected format with leading asterisks if necessary

  Write a program to hold an array of 20 numbers read

Write a program to hold an array of 20 numbers read in from the keyboard and display them backwards. Use a array and a loop to cycle through the numbers.

  Write a driver program called testrationalnumber.cpp

Write a driver program called testRationalNumber.cpp to test each of the above functions and overloaded operators in the RationalNumber class.

  Calculates the average of three test scores

Write a program that calculates the average of three test scores. The program should contain three value-returning functions: main, getTestScore, and calcAverage

  Difference between a constant pointer

Explain the difference between a constant pointer to non-constant data and a non-constant pointer to constant data. Show the syntax to declare them.

  Brownian motion is a physical phenomenon

Brownian motion is a physical phenomenon which can be observed, for instance, when a small particle is immersed in a liquid.

  Program to calculate word ladders where single-character

Write down a program in C++ to calculate word ladders where single-character substitutions have the cost of 1, and single-character additions or deletions.

  Write a menu-driven c program

Write a menu-driven C program with appropriate functions that allows the user to fill an array of 50 integers with random numbers on the range 1...999, inclusive, sort it, and then find search it to determine if a given random number was generated..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd