Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ Nothing too advanced please. In this exercise, you will apply a much more complex cypher. Ask the user to enter a long value of

image text in transcribed

image text in transcribed

C++

Nothing too advanced please.

In this exercise, you will apply a much more complex cypher. Ask the user to enter a long value of 16 digits. You will use block cypher technique with the addition of Caesar cypher. The block size will be entered by the user and valid values could be 2,4,8, or 16. Ask the user to enter k value as well. Here is how the algorithm will work: Example: Block size: 4 k value: 5 The 16-digit number will be corsidered in n blocks each of which will consist of 4 digits. In this case, we can have 4 blocks of 4-digit values. If the number is 2395856810034426, then the blocks are: 2395 8568 1003 4426 For each block apply the Caesar cypher with the given k value 5: 2395 -> 7840 8568 -> 3013 1003 -> 6558 4426 -> 9971 Then swap the first half of each block with the second half. For example: 7840 becomes 4078, 3013 becomes 1330, 6558 becomes 5865, and 9971 becomes 7199 As a final result, the encrypted integer becomes 4078133058657199.Only if k and block size a known, it can be decrypted. Apply the same steps for the encrypt.cpp and decrypt.cpp files. This time ask the user to enter number, a k value and a block size value. Sample output for encrypt.cpp Enter a 16-digit integer to encrypt: 2395856810034426 Enter a block size (possible values: 2, 4, 8, 16): 4

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

Step: 3

blur-text-image

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

Data And Databases

Authors: Jeff Mapua

1st Edition

1978502257, 978-1978502253

More Books

Students also viewed these Databases questions

Question

Provide examples of Dimensional Tables.

Answered: 1 week ago