subject

In cryptography, we use encryption ciphers to encode ("encrypt") a plaintext into a ciphertext. in theory the ciphertext is only readable by someone who knows how the plaintext was encrypted. if they have this information they can "decrypt" and recover the plaintext. there are some very simple ciphers, known as "substitution ciphers". they're so simple that they're not used any more because they are easy to but they are great for us because they are easy to program! first is the "rot13" cipher. rot13 rotates each letter 13 positions in the alphabet. so an a becomes an n, and an o becomes a b. (the rotation wraps). if the rot13 cipher is applied a second time, the original plantext is restored: n becomes a, b becomes o. obviously the rot13 cipher provides no security! it's really used in various places on the internet to hide joke punch-lines or spoilers. another cipher, the "caesar cipher", is a substitution cipher with a little more security. the cipher uses a dictionary where each plaintext letter has a corresponding ciphertext letter paired with it. for example we might say a is substituted with m, bis substituted with x, etc. to encrypt, each letter is replaced with its ciphertext letter. to decrypt, the reverse process takes place: each ciphertext letter is replaced with the plaintext letter. this cipher is not particularly strong. it is quite easy to guess the plaintext-ciphertext mappings by exploiting knowledge of letter frequency and word length. it is, however, harder to break than rot13 for this assignment, we will write a c++ program capable of doing 4 things: 1. perform a rot13 substitution 2. perform a caesar encryption given a dictionary 3. perform a caesar decryption given a dictionary 4. create a random caesar cipher dictionary the format for the caesar cipher dictionary is a file with 26 pairs of letters, one per letter of the alphabet, in alphabetical order. each pair has two letters: the plaintext letter and the ciphertext letter. the pairs are separated by whitespace. while the dictionary contains only lowercase letters, the mappings also apply for uppercase letters. note that the ciphertext letters must be unique; you cannot have two different plaintext letters that map to the same ciphertext letter. for all of the substitution operations, all upper and lower case letters on input should be substituted (or rotated as the case may be) before being output. all other characters are simply copied unchanged from input to output. the program takes several command line arguments. the first, which is required, tells the program what operation to perform: perform rot 13 substitution. generate a random caesar cipher dictionary encrypt using the caesar cipher decrypt using the caesar cipher if the first argument is missing, the program should print missing command, then stop. if the first argument is not one of the four listed above, print the first argument followed by a space and not a valid command, then stop. for -r, there is an optional second argument. if provided, it is the name of the file to read from. if it is not provided, the program should read from standard input. the output should be generated to the standard output. if a filename is provided but the file cannot open for any reason, the program should print the filename followed by a space and file could not be opened, then stop for-g, the dictionary should be printed to the standard output. you must ensure that each plaintext letter maps to a unique ciphertext letter. for both -e and -d there is a required second argument, which is the filename of the dictionary. if the second argument is missing, print the message no dictionary given, and stop. if the dictionary cannot open for any reason, the program should print the filename followed by a space and dictionary could not be opened, then stop. when reading the dictionary, you must ensure that each plaintext letter maps to a unique ciphertext letter. if you find a case where the dictionary is not in alphabetical order, you must print missing letter l, where l is the missing letter, and stop. both -e and -d support an optional third argument, which is the file to read from. if it is not provided, the program should read from standard input. the output should be generated to the standard output. if a filename is provided but the file cannot open for any reason, the program should print the filename followed by a space and file could not be opened, then stop. in all cases if there are too many command line arguments, your program should print too many arguments, then stop.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 19:30
Assignment directions the owner of a popular local coffee shop has approached you to design a network for his business. he would like to offer his customers wifi access to the internet, but also thinks it might be handy to network the kitchen and store room together with the office computer he already uses for ordering, scheduling, and payroll. he thinks that might save him time doing inventory control and ordering. your assignment is to create a set of questions for him that will precisely define the purpose of the network and any constraints and restrictions on its implementation. assignment guidelines create a list of at least ten questions to ask your customer. of those ten questions, at least one question must come from each of the following subject areas: purpose of the network network access and security issue network availability and fault tolerance issues future expansion issues vendor issues briefly explain in two or three sentences why you would ask each question and what you expect to learn from your customer’s response. submission requirements your questions should meet the criteria of a good survey question by being specific, unambiguous, and closed-ended. all questions, as well as your explanations, should be written in proper english using correct grammar, spelling, and punctuation. use complete sentences, and do not use slang, texting abbreviations, or shortcuts.
Answers: 3
question
Computers and Technology, 21.06.2019 23:30
Step 1: choose your topics review the project milestone reflections you submitted for modules 1 through 4. choose the one major idea or concept from each module that you feel most applies to your life. in addition, choose an important concept from module 5 that applies to your life. step 2: write your guidebook for each module: write a catchy headline that clearly and concisely sums up your chosen idea or concept write a brief explanation that includes a description of the concept, why it is important, and how it can be applied to your life to make a positive impact choose an exciting, powerful, or engaging image that illustrates your concept remember, you are writing one for each module, so you will have a total of five headlines, five descriptions, and five images. step 3: design your guidebook choose a format to present your digital guidebook. there are many 21st century tools available for creating and submitting your work in the online environment. for more information on tools your school uses, contact your instructor or visit the web 2.0 tools area.
Answers: 3
question
Computers and Technology, 23.06.2019 20:30
Column a of irma’s spreadsheet contains titles for each row, but her document is too big and will be printed three pages across. she wants to be sure that every page will be understood. what can irma do to with this problem?
Answers: 3
question
Computers and Technology, 23.06.2019 21:40
Draw the resistor’s voltage and current phasors at t=15ms. draw the vectors with their tails at the origin. the orientation of your vectors will be graded. the exact length of your vectors will not be graded.
Answers: 2
You know the right answer?
In cryptography, we use encryption ciphers to encode ("encrypt") a plaintext into a ciphertext. in t...
Questions
Questions on the website: 13722360