Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programing language is c++ BACKGROUND INFORMATION: A cryptosystem is a system for encryption and decryption. Encryption, also called encoding or enciphering message, while decryption, also

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Programing language is c++

BACKGROUND INFORMATION: A cryptosystem is a system for encryption and decryption. Encryption, also called encoding or enciphering message, while decryption, also called decoding or deciphering, involves just the opposite - changing the secret message back into its original readable form. In cryptography, a plaintext file is a file containing data in its original, or readable, form while a ciphertext file is a file containing data in coded, or scrambled, form. involves changing the original message into a secret In this assignment, you will be creating a modified stream cipher that shifts each original letter or digit to a new, encrypted letter or digit, respectively, corresponding to individual randomly generated integral key. For example, consider the plaintext to be encrypted is: "ABC 1.", without the quotes. Then, for each letter and digit, we generate a random integer between 3 and 277 that serves as the key for the corresponding letters and digits. Consider the following example Plaintext: Key: Ciphertext: ABC 1 76 97 74 75 YUY6 Thus, the A would be shifted 76 places in the alphabet, which means that it "rolls over" twice, and then gets shifted 24 places in the alphabet to the ciphertext Y. Notice that there are only four keys generated for the six characters. Whitespace (and any unsupported characters) should be discarded, so no key is generated in this case. Note that the whitespace has been removed in the ciphertext. Additionally, punctuation should be kept as is, meaning that it is not discarded, but left in its original form (e.g., the"." in the above example remains a .") in the ciphertext. Mathematically, each letter of the plaintext and key can be given a number and a formula can be derived to encrypt for c (i.e., ciphertext) and m (i.e., plaintext) using k (i.e., key) as follows C=(m+k) % 26 m = (26 + c- k) % 26 Note that formula assumes A is 0, B is 1, and so forth with nothing to distinguish between uppercase A and lowercase a. Since you will most likely be using the character ASCII values, you will have to modify these formulas to fit your needs (e.g., the letter A has an ASCIl value of 65), but this should give you a place to start. One other item to consider is that characters (i.e., letters and digits in this case) roll over. For example, in shifting the letter z, then next letter would be the letter A (both uppercase)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

25 Vba Macros For Data Analysis In Microsoft Excel

Authors: Klemens Nguyen

1st Edition

B0CNSXYMTC, 979-8868455629

More Books

Students also viewed these Databases questions

Question

How is our behavior affected by the presence of others?

Answered: 1 week ago