Write two programsbull the first program will encipher a

Assignment Help Computer Engineering
Reference no: EM13347742

Write two programs.

• The first program will encipher a message using a keyword;

• The second program will decipher a message using a keyword.

Here is an example of a user interaction with the encipher program: Program output is in bold and user input is in italics.

Enter the keyword: Javabean

Enter the message (end with a blank line):
We are the Borg!
We jqe sde Amqc!
Resistance is futile!
Qerfrsjlve fr ntsfie!

Here is an example of a user interaction with the decipher program:

Enter the keyword: Javabean

Enter the message (end with a blank line):

We jqe sde Amqc!
We are the Borg!
Qerfrsjlve fr ntsfie!
Resistance is futile!

This is how enciphering works. First, the keyword is used to create a "ciphertext" alphabet. The keyword is written out with repeated letters removed, and then the remaining letters of the normal alphabet (the "plaintext" alphabet" are added). So from "Javabean", we get:

For this purpose, we ignore the case of the letters, treating them all as lowercase. Now to encipher a message, we replace each letter in the message with the corresponding ciphertext letter. Other characters, like spaces and punctuation, are left unchanged. Uppercase letters are converted to lowercase, substituted, and then converted to uppercase.

For example, the letter ‘B' is first converted to ‘b', which is the second letter in the plaintext alphabet, and then substituted with the second letter of the ciphertext alphabet, which is ‘a', and then converted back to uppercase, i.e. 'A'.

Deciphering is very similar, except that each letter is located in the ciphertext alphabet, and substituted with the corresponding letter from the plaintext alphabet. So, for example, ‘f' is the 9th letter in the ciphertext alphabet, so it is substituted with the 9th letter is the plaintext alphabet, which is ‘i'.

Reference no: EM13347742

Questions Cloud

Question oneassume as a vc that you want to establish a : question oneassume as a vc that you want to establish a pre- and post-money valuation in support of the issuance of a
Show all work by describing variables stating assumptions : show all work by describing variables stating assumptions illustrating model and showing output solution to the
Problem 1 investing in the stock marketjohnson and johnson : problem 1. investing in the stock marketjohnson and johnson jnj is trading at 68.15. jnj is a large health care
Project nbspintroductionthe public bicycle scheme loris : project nbspintroductionthe public bicycle scheme loris bikes was launched in 2010 in the city of istanbul. there are
Write two programsbull the first program will encipher a : write two programs.bull the first program will encipher a message using a keywordbull the second program will decipher
1 create the following adtsa write the constructor function : 1. create the following adts.a write the constructor function makestk predicate function emptystk and mutator functions
Part-11 how can you perform a oating point comparison you : part-11. how can you perform a ?oating point comparison? you should include two examples one in c-shell and one in
Net salvage valueallen air lines have to liquidate some : net salvage valueallen air lines have to liquidate some equipment that is being replaced. the equipment originally cost
Mergers and acquisitions play a critical part in a : mergers and acquisitions play a critical part in a corporations survival growth and profit strategies.nbsp various

Reviews

Write a Review

Computer Engineering Questions & Answers

  Write down an applet that reads in the size of the side

Write down an applet that reads in the size of the side of a square and displays a hollow square of that size out of asterisks, by using the drawString method inside your applet's paint method. Use an input dialog to read the size from the user. Y..

  Is a shift toward dna based identifications a good idea

What are some of the benefits and limitations of using DNA to identify victims of mass causalities. When answering take into account available resources, types of attacks, evidence collection and preservation, etc.

  Make an asp.net application using visual studio .net 2003

design an ASP.NET application using Visual Studio .NET 2003. Your application should includfe at least one web form and five different types of controls. Feel free to create more than one instance of the same type.

  What are the roles of the management sponsors

What are the roles of the management sponsors

  Design the program in vb.net

Write down the program in VB.Net (not Web based) using a loan amount of $200,000 with an interest rate of 5.75% and a 30 year term. Display the mortgage payment amount. Insert comments to document the program.

  Communicate to database engine via visual basic

The most internationally standardized language in order to communicate to the database engine is Visual Basic. Describe why would it be useful in order to have Data Sources window open?

  Classify and discuss compensation potentially

Classify and discuss compensation potentially.

  Tcp connections experience data segment loss

TCP connections experience data segment loss

  Pseudorandom numbers

In any use of the pseudorandom numbers, whether for the encryption, simulation or the statistical design.

  Programmatic access to a database through the Internet

Programmatic access to a database through the Internet

  Write a java program that uses a two-dimensional array

Write a Java program that uses a two-dimensional array

  Wireless networking

Explain the origins/genesis of the wireless networking. Explain the devices included used and how they operate.

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