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

  Dynamically allocates an array large enough

Write a program that dynamically allocates an array large enough to hold a number of test score. The size of the array should be input by the user

  Write a c++ program to choose two three-digit primes

Write a C++ program to choose two three-digit primes and an encryption exponent (3 or 17 may do nicely).

  Prepare a linux shell

Prepare a linux shell (in other words, write a C/C++ program) that will recursively prompt for input from the user. The shell should prompt as

  Class named realestate that has data members

Create a class named RealEstate that has data members to hold the price of a house, the number of bedrooms, and the number of baths. Member functions include overloaded insertion and extraction operations

  Design and code a new function that accepts as parameters

design and code a new function that accepts as parameters the gross pay by value and the federal tax state tax local

  How the function delete can be implemented for arrays

Explain in details how the function Delete() can be implemented for arrays to function exactly as it would with lists. Use pseudo code to clarify your explanation.

  Write a class volumeofbox that calculate the volume

write a class VolumeOfBox that calculate the volume by this formula : length * breadth *

  Struct definition to represent the data of a person''s bank

Define a struct definition to represent the data of a person's bank account. There will be one string for the name, and two doubles for balance and interest rate. Declare two variables of this new type in the main function. Modify the values of each ..

  Write a c++ program to help a local restaurant automate

Write a C++ program to help a local restaurant automate its breakfast billing system. The program should do the following:a. Show the customer the different breakfast items offered by the restaura

  Add a non member function

For the code below add the following. Add a non member function that will run the show function of a Sport object. This object is the one parameter of the function.

  Model-view-controller

Explain Model-View-Controller paradigm

  Write in c++. read an inputfile.txt

write in C++.  read an inputFile.txt which contains integers that are virutal addresses, and I am suppossed to translate that into physical addresses using a page table and a transition lookaside buffer

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