Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Caesar cipher decoder c++

28/03/2021 Client: saad24vbs Deadline: 2 Day

CS150 Assignment 7 Cryptography

Date assigned: Monday, November 23, 2015 Date Due: Tuesday, December 8, 2015, 9:40 am (40 points) There is no late grace period for this last assignment!!!!! Cryptography is an exciting area of Computer Science concerned with hiding and protecting information. This is the branch of Computer Science that allows you to send your credit card securely to a web site or to decrypt or encrypt secret messages. For this project, you will be building a program that will take a plain text file and produce an encrypted file (or vice versa). The encryption scheme you need to implement is inspired by the Enigma Machine, a German encryption machine from WWII (http://en.wikipedia.org/wiki/Enigma_machine). The Enigma machine code was broken by Alan Turing and his team at Bletchley Park during World War II. Encryption Scheme: Simple substitution A simple substitution cipher (sometimes called a Caesar cipher) maps each letter of the alphabet to another letter of the alphabet as shown below:

To encrypt a letter, find the letter on the top and use the letter below it as the encrypted output. Using the above table, the encrypted output for C would be Z. To decrypt a letter, find the letter on the bottom and use the letter above it as the decrypted output. To make things more interesting, a secret key is used to specify how the input characters are mapped to output characters. The key, which is a single character, specifies which letter the output row starts on. The key in the above example is X. (The input row always starts with A). N-Way Substitution You will need to implement an N-Way substitution encryption scheme. This means you will have N substitution mappings. The character to be encrypted will be used as the input to the first mapping; the output of the first mapping will be the input to the second mapping. The output of the second mapping will be the input to the third mapping, etc. The output of the N-1 mapping is the input to the N mapping, and the output of the N mapping is the encrypted character. Each mapping has its own key, so you will have a total of N secret keys for this scheme. The value N, which is specified by the user, may be between 2 and 25. You must use a single, multidimensional array to represent all of these mappings.

Input A B C D E F G H I J K L M N O P Q R S T U V W X Y Z X Y Z A B C D E F G H I J K L M N O P Q R S T U V W Output

Encryption example (N = 2, keys of X and R): The initial input character of F gets mapped to C by the first mapping, and this becomes the input of the second mapping. Under the second mapping, this input character gets mapped to T which is the encrypted output character. Mapping 1: Input character: F (decrypted)

partial mapping array

Mapping 2: partial mapping array Output character: T (encrypted)

Decryption example (N = 2, keys of X and R): Decryption works in the opposite direction with the inputs and outputs reversed in each mapping. The input character of T gets mapped to C under the second mapping, and this becomes the input of the first mapping. Under the first mapping, this input character C gets mapped back to F which is the decrypted output character. Mapping 1: Output character: F (decrypted)

partial mapping array

Mapping 2: partial mapping array

Input character: T (encrypted) For this assignment, you need to allow the user to encrypt or decrypt as many files as they want. The user will need to specify the N keys and the input and output files. Your output must look exactly like the following (user input is in red): ******************** * ENCRYPTION ******************** Enter E)ncode, D)ecode, Q)uit: E Enter Number of Mappings (2-­‐25): 6 Enter the 6 keys: OREGON Enter plaintext filename: plaintext.txt Enter ciphertext filename: ciphertext.txt Encode Success Enter E)ncode, D)ecode, Q)uit: Q

Input A B C D E F G X Y Z A B C D Output

Input A B C D E F G R S T U V W X Output

Output A B C D E F G X Y Z A B C D Input

Output A B C D E F G R S T U V W X Input

Functions

You must use at least the following functions:

• void printHeading (const char heading[]); Description: Prints the heading as displayed on the sample output of the previous page.

• void getMappingData (int &numberOfMappings, char key[]); Description: Prompts the user for the number of mappings and the keys as displayed on the sample output. The number of mappings and keys are returned through the parameters numberOfMappings and key. To validate the key, you will need to use a string function called strlen, which returns the number of characters in the key. For example, the following program segment will allow the user to enter a key such as OREGON and then output 6. You will need to #include for the use of strlen. Remember, do not declare any string variables.

cin >> key; //Typing in OREGON produces a key OREGON\0 cout << static_cast(strlen (key)); // 6 is output

• void openFileForRead (ifstream &inputFile, const char message[]);

Description: Accepts a message to be displayed (e.g. Enter plaintext filename: ), then prompts the user to enter a plaintext file validating that the file exists and is open. Do not proceed until a proper file can be opened.

• void openFileForWrite (ofstream &outputFile, const char message[]); Description: Similar to openFileForRead only we are writing to a file.

• void constructMappingArray (char mappingArray[][LETTERS_IN_ALPHABET],

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Engineering Exam Guru
Top Grade Essay
Online Assignment Help
Essay Writing Help
Top Class Engineers
Unique Academic Solutions
Writer Writer Name Offer Chat
Engineering Exam Guru

ONLINE

Engineering Exam Guru

I have read your project details. I can do this within your deadline.

$28 Chat With Writer
Top Grade Essay

ONLINE

Top Grade Essay

I am known as Unrivaled Quality, Written to Standard, providing Plagiarism-free woork, and Always on Time

$42 Chat With Writer
Online Assignment Help

ONLINE

Online Assignment Help

I have read your project details. I can do this within your deadline.

$24 Chat With Writer
Essay Writing Help

ONLINE

Essay Writing Help

You can award me any time as I am ready to start your project curiously. Waiting for your positive response. Thank you!

$31 Chat With Writer
Top Class Engineers

ONLINE

Top Class Engineers

Give me a chance, i will do this with my best efforts

$26 Chat With Writer
Unique Academic Solutions

ONLINE

Unique Academic Solutions

I will cover all the points which you have mentioned in your project details.

$70 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

Lucky number program in python - The good immigrant student bich minh nguyen - Balance sheet approach in international compensation - Week 1 discussion cloud computing - Brain work - Blending problem linear programming solution - All the lonely people where do they all come from - Proofreading marks handout pdf - What does y hat mean - A thermocouple is a temperature measurement device that consists - Sex education in schools pros and cons essay - Management - Managing uncertainty in supply chain safety inventory - Two shuffleboard disks of equal mass one orange - Ethical theories - Hello, i need this task done - Labouring the walmart way by deenu parmar - Queensland work health and safety act 2011 - It doesn t matter by nicholas g carr summary - Bonaire navigator evaporative cooling - Accu chek performa e 6 - Macroeconomics institutions instability and the financial system solutions - Active listening skills handout - How to draw hexagon - 3 pin alternator wiring diagram - Southwestern University: (C)- Southwestern University’s Football Program Case Study (PAGE 277) - Kenneth bronson reflection questions - Rodan and fields crp - 817 361 3037 - How to see webassign answers - Dear man role play examples - Responsibility accounting and transfer pricing ppt - Porphyria's lover annotated ppt - Philippians 4 8 object lesson - Sparta use of iron bars - COURSE PROJECT -PART 2 - Week 5 assignment 3 email based on listening skills scenario - Stay where you are until our backs are turned - How to find the volume of a cylinder khan academy - Anu law library opening hours - Annual report sainsburys 2016 - Penn foster biology research paper example - Short Discussion Board DUE 10.2.2020 - Interprofessional Organizational and Systems Leadership - A school field trip essay - How do you write 0.7 as a fraction - Mobile plant risk assessment template - Sodium hydroxide is a common one crossword clue - Discussion: The Future of Offices - Practical english lesson 4 penn foster - Discussion question - What are the trending human resources philosophies values and policies - Wgp chemical company case study - External governance control mechanisms include - Gone tomorrow the hidden life of garbage pdf - Isprs journal of photogrammetry and remote sensing - NURSING: EVIDENCED-BASED PRACTICE PROJECT - Discussion #25 - Snhu apa format - Front squat jeff nippard - I need four paragraphs that answer the following topics and fit into my essay based on Kate Chopin's The Story of an Hour - Molecular models of neutral molecules - Operating system assignment - The minefield poem analysis - GLOB (U3_RPL) - Sir joseph hotung net worth - Coulombic attraction worksheet answers - 8 inch bracelet on wrist - 8 steps of ethical decision making - Martin name meaning in the lottery - Research Question, Problem Statement, Research Purpose - Journals assignment - College persuasive speech outline - Sara wachter boettcher technically wrong - What are the dimensions of a1 paper - Triage assessment form crisis intervention - Capsim human resources - Women’s Health Case Study - What is meant by the holistic approach in anthropology - DISCUSSION 2 FUND OF DATA SYSTEMS - Difference between 1st angle and 3rd angle projection - Tavazo nuts canada - How can luminol help solve crimes - Wyndham nashville 3 bedroom lockoff floor plan - Like dreaming backwards monologue natalie - Discussion - Economics - 8-2 Memo: Creating Effective Web Communications - Introduction to java 11th edition pdf - Full ppt on organizational behaviour - Case analysis - Stefan gives elena a necklace - Unit 4 IP - What is the quotient in simplified form? state any restrictions on the variable. show work. - Quantitative data collection/analysis - Elearning course review checklist - Milke bhi kyun sanam milne ki pyas hai - ASSIGNMENT 2. - Eco - Premier's reading challenge login