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)
- Symmetric key encryption: 1- Choose an algorithm that uses modern key symmetric cryptography technology. 2- Writing a report on it and explaining its method of work in detail, with no more than two pages (in Arabic or English). 3- Apply and implement the algorithm that you have chosen in the encryption and decryption process and include that in the report. (You can write code in one of the languages you are proficient if needed)arrow_forwardCryptography: 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_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
- Cryptography: 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_forwardBarcode 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_forwardComputer science What exactly do you mean when you say "Access Modifier"?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:For what kinds of data is the arithmetic mean inappropriate?arrow_forwardComputer science: For what kinds of data is the arithmetic mean inappropriate?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