Concept explainers
(Enforcing Privacy with Cryptography) The explosive growth of Internet communications and data storage on Internet-connected computers has greatly increased privacy concerns. The field of cryptography is concerned with coding data to make it difficult (and hopefully—with the most advanced schemes—impossible) for unauthorized users to read. In this exercise you’ll investigate a simple scheme for encrypting and decrypting data. A company that wants to send data over the Internet has asked you to write a program that will encrypt it so that it may be transmitted more securely. All the data is transmitted as four-digit integers. Your application should read a four-digit integer entered by the user and encrypt it as follows: Replace each digit with the result of adding 7 to the digit and getting the remainder after dividing the new value by 10. Then swap the first digit with the third, and swap the second digit with the fourth. Then print the encrypted integer. Write a separate application that inputs an encrypted four-digit integer and decrypts it (by reversing the encryption scheme) to form the original number. [Optional reading project: Research “public key cryptography” in general and the PGP (Pretty Good Privacy) specific public key scheme. You may also want to investigate the RSA scheme, which is widely used in industrial-strength applications.]
Trending nowThis is a popular solution!
Chapter 4 Solutions
Java How to Program, Early Objects (11th Edition) (Deitel: How to Program)
- Cryptography: Cryptography is a way to keep messages and other data secret. It is the art of writing or solving ciphers. What's a cipher? It's a "secret or disguised way of writing," says the Concise Oxford Dictionary. In the business world, cryptography refers to mathematically based encryption methods that keep data away from the prying eyes of criminals or enemy governments. Today's businesses and governments use what is called "strong" encryption. This type of encryption is created using applied mathematics. Strong encryption was once used solely for military purposes, but in today's information society, encryption is needed for all kinds of uses. Keys are a fundamental component of cryptography, being used in cryptographic operations such as encryption, hashing and signing to provide desirable properties like confidentiality (keeping information secret), integrity (preventing information being altered) or authenticity (verifying who the information came from). One key (public key)…arrow_forwardCIPHERS Cryptology, the science of writing and breaking codes and ciphers, uses many ides from mathematics. It is a rapidly expanding profession. Can you decipher the following message, which is written in pig-pen cipher? BOUFJ Brun FELLOF JUJHO3 The Pigpen Cipher is a Substitution Cipher that was used by the Freemasons in the 18th Century. They substituted each letter of the alphabet with a picture. A key to this cipher is formed by placing the letters of the alphabet in "pens" formed by the sales in a tic-tac-toe grid. In the grid the letters are places as shown below. A B J K L S U D E M V W X G H P Q R Y To make the cipher, no dots are used for the letters A through I, only the sides of the pens. We use one dot in each pen for the letters J through R and two dots per pen for S through Z. Write the cipher for each letter below. A- B- C- D- E- F- G- H- |- J- K- L- M - N- P- Q- R- S- T- U- V- w - X - Y- Z- Use the key to decipher the message(picture on the top page):arrow_forwardQuestion # 5:a) Find keys d and e for the RSA cryptosystem where p=5, q=3b) Encrypt the following plaintext BAc) Decrypt your cipher-text n question b) Remember: i need a Mathematics solution not computer program You must show all the steps of your workarrow_forward
- Barcode Validation As you are aware, barcodes encode numbers. In the Universal Product Code system, each item is assigned a globally unique number. But not every number is a valid UPC. Why? Part of the answer is the check digit. In order to catch errors, the rightmost digit is calculated from the others. If this digit does not match its expected value, you can be assured the barcode is invalid, or has been read incorrectly. To calculate the check digit, perform the following operations modulo 10: • Sum the digits in the odd positions and multiply the result by three. • Add the digits in the even positions to the result. • Subtract the result from 10 to obtain the check digit. Your Task Given a 12-digit UPC, you will need to identify whether is is valid or invalid. The code will be provided from standard input. You simply need to print "valid" or "invalid" in response. Notes The code will be provided on a line by itself, and will consist of numerals alone. You may assume that it will be…arrow_forwardCryptography: Alice is setting up an RSA key pair. She selects two prime numbers: 3319, 9397 and selects e = 3271. What are Alice’s public and private keys and what does she broadcast to make them usable? Then encrypt the following using her public key: HELLO WORLDarrow_forwardComputer science:For what kinds of data is the arithmetic mean inappropriate?arrow_forward
- 9. A personal identification number (PIN) that opens a certain lock consists of a sequence of 3 different digits from 0 through 9, inclusive. How many possible PINS are there?arrow_forwardComputer science What exactly do you mean when you say "Access Modifier"?arrow_forwardComputer science: For what kinds of data is the arithmetic mean inappropriate?arrow_forward
- Read carefully please!arrow_forwardComputer Science Encyrpt this message using AES algorithm for Round1. All encryption steps has to be shown clearly. Plaintext: Two One Nine One Key: This is my Rulesarrow_forwardWrite an essay (200 words) Some people believe that not all criminals should be kept in prison, but that some of them should be allowed to do unpaid work to help the community. Do you agree or disagree?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education