Write a program that can encrypt and decrypt a message

Assignment Help Computer Engineering
Reference no: EM132110174

Your project is to write a program that can encrypt and decrypt a message using a double columnar transposition encryption algorithm.

For the purposes of this project, you will only use one step of column transpositions, although for extra credit, you can modify the file to perform two transpositions.

The text file will consist of messages; each line will start with either E (encrypt) or D (decrypt), and 2 digits for the numbers of columns that will be used (or were used) to encrypt the message. Each message will end with "*." The encryption works as follows: The message is written to a table of n columns of characters, filling one row at a time.

When the message is completely written to the table, any blank spaces in the array will be filled with a character "rarely used", such as X, Z, Q.

The message is then rewritten by reading the table one column at a time (reading down the columns), giving a permutation of the original message.

The process is then repeated using the second digit Your program should output the encrypted message to a text file. The decryption works "in reverse": The message is written to a table of n columns of characters, filling one column at a time. (You will need to calculate the number of rows needed to store the encrypted message.)

The message should fill the table completely.

The message will then be rewritten by reading the table one row at a time (left to right order). The decrypted measure should then be written to a text file.

Your program should read the message into a string, store it in "appropriate" two-dimensional arrays (one for each step), and then write the resulting string to a new text file.

Reference no: EM132110174

Questions Cloud

Create and maintain a resistor linked list : Ifchoice is l, the program will ask the user to enter a resistor ID and value of resistance to be inserted into the end of list.
What is the purpose of the database : Basic business rules need to be developed for cross-sales and up-sales. We will not worry about identifying the formulas for these recommendations.
Design an entire website : Design an entire website which must contain the following items but can contain anything else you want to add.
Advise directors of ruby pty ltd of the tax deductibility : Advise the directors of Ruby Pty Ltd of the tax deductibility of the above amounts. You must make reference to appropriate authorities and legislation
Write a program that can encrypt and decrypt a message : Write a program that can encrypt and decrypt a message using a double columnar transposition encryption algorithm.
Which of the following are essential elements of a project : To reduce the duration of a project using Critical Path Method (CPM), it is necessary to make a reduction on the activity with.
Write a java program similar to the ones used in atm : Write a Java program similar to the ones used in ATM machines. Essentially your program is tohandle the following services.
Describe a project that suffered from scope creep : Describe a project that suffered from scope creep. Could it have been avoided? How? Can scope creep be a good thing? When?
Add functionality to your companys web site : You are the project manager for a project to add functionality to your company's web site. The project has been broken down into four iterations (releases).

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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