Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Python - Cryptograpy - Please include all #comments in before each row.

Cryptography is the science of making messages secure, of transforming readable messages into unreadable messages and back again. Messages that are unreadable are called cipher-text. The process of turning plaintext into cipher-text is called encryption. The reverse process of turning cipher-text into plaintext is called decryption.

One of the easiest ways to encrypt a message is to scramble the letters. For example, the word "apple" could be randomly transformed to "lapep." In fact, there are 120 different possible arrangements of the word "apple."

However, if the encryption algorithm randomly scrambles the letters, the task of the decryption algorithm is pretty hard. Encryption and decryption algorithms must work together in some agreed upon way, with the encryption algorithm scrambling letters and the decryption algorithm unscrambling them.

A transposition cipher is one way to scramble the letters of a message. The cipher separates the message into two groups of characters: the first group composed of the even-numbered characters and the second group composed of the odd-numbered characters.

To produce the cipher-text, the cipher puts together both groups; placing the group of the even-numbered characters first, followed by the group of odd-numbered characters. This encryption results in a string with the characters shuffled to new positions.

a) Write a python program that takes a message,encrypts the message as described above and returns the cipher-text.

b) Write a python program that takes as a cipher-text, decrypts the cipher-text as described above and returns the message.

Computer Engineering, Engineering

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

Have any Question?


Related Questions in Computer Engineering

Question please submit your draft apa-formatted research

Question: Please submit your draft APA-formatted research papers through this assignment page. You will have until the end of Week #4 to submit a draft of your paper for consideration as extra credit. This is Part 1 of t ...

Question suppose a process ie parent forks a child process

Question : Suppose a process (i.e., parent) forks a child process using resource sharing such that the parent and child share all resources. Does this include the Process Control Block and memory space or does the child ...

Represent the number obtained by the last you have digits

Represent the number obtained by the last you have digits of your student number in binary, e.g., if your student number is XXX8372 then the question is to represent "8372" in binary. Also, represent the first three digi ...

When using todays digital cameras file sizes are often

When using today's digital cameras file sizes are often saved in a format that is well over 1 Megabyte. This may be great for high definition photo reproductions but is a disaster for uploading to the web. Images on your ...

A student ran numerical simulation on a dual-core computer

A student ran numerical simulation on a dual-core computer (3.2 GHz, 2MB Smartcache, 32GB RAM). Each simulation involve calculation of 2GB of data and takes about 3 hours. To speed up the calculation, he ran two simulati ...

A 1000 utility bond with 14 years remaining before maturity

A $1000 utility bond with 14 years remaining before maturity can now be purchased for $760. It pays interest of $20 each 6-month period. What rate of return is earned by purchasing the bond at the current market price pl ...

Suppose a countrys real gdp is 18 trillion andnbspthat

Suppose a country's real GDP is $18 trillion and that population is 300 million. Instructions:  Enter your answers as whole numbers. a. What is this country's real GDP per capita? $  Suppose that during the next 10 years ...

Task allocation and deallocation of mono-dimensional and

Task Allocation and deallocation of mono-dimensional and bi-dimensional arrays represented by pointers a. Declare and implement a function CreateArray(...) that returns a pointer to an array of n integers. b. Declare and ...

In the scenario activity operating systems and forensics

In the scenario activity Operating Systems and Forensics, which forensic tools would you utilize to recover and process evidence found on the hard drive and what is the objective of recovering data from the USB drive tha ...

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

  • 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