2.Consider the following credit card numbers and tell me if they are valid or not. If a number is invalid, write the valid credit number by changing the “check” digit. Show your work for full marks. a. 4519 6731 6055 4166
b. 4515 1663 4722 3333
c. How many valid (according to the Luhn check) 16-digit credit card numbers are there that start with these 14 digits 4444 4444 4444 45? Give one of the valid credit card numbers.
3. We have the following encryption algorithm: XOR with the HEX key AA, rotate 4 places to the right, and XOR with the HEX key BC. Show your work for full marks.
a. If we start with the bit pattern represented by the HEX number ACE1, what would the HEX number be that represents the encrypted bit pattern?
b. Assume that we have intercepted a message that was encoded using the same algorithm. The encoded message as a HEX number was D007. What was the original message as a HEX number?
THIS IS ALL THE INFORMATION THAT WAS GIVEN TO ME FOR THIS QUESTION.
Please please thumbs up!!!
Hope it will help uh ouT!!!
Answer ::
(HANDWRITTEN and TYPED)
------------------------------------------
-------------------------------
3) Encryption algorithm
XOR with the HEX key BC
rotate 4 places to the left
XOR with the HEX key AA
Decryption algorithm
XOR with the HEX key AA
rotate 4 places to the right
XOR with the HEX key BC
a. If we start with the bit pattern represented by the HEX number ACE1, what would the HEX number be that represents the encrypted bit pattern?
Plaintext = ACE1
Encryption
Step 1: ACE1 XOR BCBC (Key is repeated twice to match the length)
= 1010 1100 1110 0001 XOR 1011 1011 1100 1100
= 0001 0111 0010 1101 => 172D
Step 2: Rotate 0001 0111 0010 1101 4 places left
= 0111 0010 1101 0001 => 72D1
Step 3: 72D1 XOR AAAA (Key is repeated twice to match the length)
= 0111 0010 1101 0001 XOR 1010 1010 1010 1010
= 1101 1000 0111 1011 => D87B
Ciphertext = D87B
b. Assume that we have intercepted a message that was encoded using the same algorithm. The encoded message as a HEX number was D007. What was the original message as a HEX number?
Ciphertext = D007
Decryption
Step 1: D007 XOR AAAA (Key is repeated twice to match the length)
= 1101 0000 0000 0111 XOR 1010 1010 1010 1010
= 0111 1010 1010 1101 => 7AAD
Step 2: Rotate 0111 1010 1010 1101 4 places right
= 1101 0111 1010 1010 => D7AA
Step 3: D7AA XOR BCBC (Key is repeated twice to match the length)
= 1101 0111 1010 1010 XOR 1011 1011 1100 1100
= 0110 1100 0110 0110 => 6C66
Plaintext = 6C66
2.Consider the following credit card numbers and tell me if they are valid or not. If...
Consider the following credit card numbers and tell me if they are valid or not. If a number is invalid, write the valid credit number by changing the “check” digit. Show your work for full marks. a. 4634 5163 4122 7983 b. 5321 4142 6379 4771 c. How many valid (according to the Luhn check) 16-digit credit card numbers are there that start with these 14 digits 4444 4444 4444 44? Give one of the valid credit card numbers.
We have the following encryption algorithm: XOR with the HEX key BC, rotate 4 places to the left, and XOR with the HEX key AA. Show your work for full marks. a. If we start with the bit pattern represented by the HEX number ACE1, what would the HEX number be that represents the encrypted bit pattern? b. Assume that we have intercepted a message that was encoded using the same algorithm. The encoded message as a HEX number was...
3. We have the following encryption algorithm: XOR with the HEX key AA, rotate 4 places to the right, and XOR with the HEX key BC. Show your work for full marks. a. If we start with the bit pattern represented by the HEX number ACE1, what would the HEX number be that represents the encrypted bit pattern? b. Assume that we have intercepted a message that was encoded using the same algorithm. The encoded message as a HEX number...
How many valid 16-digit credit card numbers are there that start with these 14 digits 4444 4444 4444 45 (according to the Luhn check)? Give one of the valid credit card numbers.
Credit card numbers adhere to certain constraints. First, a valid credit card number must have between 13 and 16 digits. Second, it must start with one of a fixed number of valid prefixes : 1 • 4 for Visa • 5 for MasterCard • 37 for American Express • 6 for Discover cards In 1954, Hans Peter Luhn of IBM proposed a “checksum” algorithm for validating credit card numbers . 2 The algorithm is useful to determine whether a card...
Program Set 2 10 points) Credit card number validation Program Credit card numbers follow certain patterns: It must have between 13 and 16 digits, and the number must start with: 4 for Visa cards 5 for MasterCard credit cards 37 for American Express cards 6 for Discover cards In 1954, Hans Luhn of IBM proposed an algorithm for validating credit card numbers. The algorithm is useful to determine whether a card number is entered correctly or whether a credit card...
Validating Credit Card Numbers Write a program named Creditcard.java that prompts the user for a credit card number and determines whether it is valid or not. (Much of this assignment is taken from exercise 6.31 in the book) Credit card numbers follow certain patterns. A credit card number must have between 13 and 16 digits, and must start with: 4 for Visa cards 5 for Master cards 6 for Discover cards 37 for American Express cards The algorithm for determining...
Credit card numbers follow certain patterns. A credit card number must have between 13 and 16 digits. The number must start with the following: 4 for Visa cards 5 for MasterCard cards 37 for American Express cards 6 for Discover cards In 1954, Hans Luhn of IBM proposed an algorithm for validating credit card numbers. The algorithm is useful to determine whether a card number is entered correctly or is scanned correctly by a scanner. Almost all credit card numbers...
Banks issue credit cards with 16 digit numbers. If you've never thought about it before you may not realize it, but there are specific rules for what those numbers can be. For example, the first few digits of the number tell you what kind of card it is - all Visa cards start with 4, MasterCard numbers start with 51 through 55, American Express starts with 34 or 37, etc. Automated systems can use this number to tell which company...
The Language is for Java ------ Input ------- credit-cards-2.dat //////////////////// Output//////////// Enter a filename\n Credit card number: 3056 9309 0259 04\n Checksum: 50\n Card status: VALID\n Credit card number: 3852 0000 0232 37\n Checksum: 40\n Card status: VALID\n Credit card number: 6011 1111 1111 1117\n Checksum: 30\n Card status: VALID\n Credit card number: 6011 0009 9013 9424\n Checksum: 50\n Card status: VALID\n Credit card number: 3530 1113 3330 0000\n Checksum: 40\n Card status: VALID\n Credit card number: 3566 0020 2036...