Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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'.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9132106

Have any Question?


Related Questions in Computer Engineering

You own a specialty company self made company smc which

You own a specialty company; self made company (SMC) which sells hats and jackets. You obtained an object IDENTIFIER 5000 under enterprises node from IANA. You have two branch locations. Each has an inventory system that ...

Susans special sauces is a company that produces a variety

Susan's Special Sauces is a company that produces a variety of condiments, salad dressings and sauces. Susan, the company owner, wants to distribute her product overseas and recently purchased a building on the outskirts ...

Question summary on hypertext transfer protocol http

Question : Summary on Hypertext Transfer Protocol (HTTP) describing its major features, principles of operation and application in transferring traffic over the World Wide Web. The response must be typed, single spaced, ...

Systems and networksconsider sending a large file from a

(Systems and Networks) Consider sending a large file from a host to another host using a reliable connection such as TCP. Suppose the reliable connection uses additive-increase, multiplicative-decrease (AIMD) without slo ...

One of the 5 halogens which are diatomic has the fastest

One of the 5 halogens (which are diatomic) has the fastest root mean square velocity at STP. Calculate this velocity in meters per second.

Question bullusing the spss software open the high school

Question: • Using the SPSS software, open the High School Longitudinal Study dataset (ATTACHED). • Based on the dataset you chose, construct a research question that can be answered with a Pearson correlation and bivaria ...

Questionbased on the option chain below consider an

Question: Based on the option chain below : Consider an asymmetric butterfly constructed using the given put options with the low strike at 58, the peak at 60 and the high strike at 64, for one unit of the underlying ass ...

A firm faces the following inverse demand curvep

A firm faces the following inverse demand curve P= 54-0.5Q Where P is the price of output and Q is the number of outputs sold per hour. This firm is the only employer in town and faces an hourly supply of labor given by: ...

Need help with a java program that takes two arrays a and b

Need help with a Java program that takes two arrays a and b of length 5 storing int values, and returns the dot product of a and b. That is, it returns an array c of length n such that c[i]=a[i]*b[i].

What are the overall cost leadership differentiation and

What are the overall cost leadership, differentiation, and focus strategies?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As