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?
Given:
Encryption:
1) XOR with HEX Key AA
2) rotate 4 places to right
3) XOR with HEX Key BC.
a) plain text given = ACE1
We need to twice the key to match the length of the plain text that
is AAAA
1) We should XOR with key AAAA
ACE1 XOR AAAA
= 1010 1100 1110 0001
XOR 1010 1010 1010 1010
--------------------------------------
= 0000 0110 0100 1011
----------------------------------------
2) we should rotate 4 places right
0000 0110 0100 1011 -> 1011 0000 0110 0100 = B064
We need to twice the key to match the length of the text that is
BCBC
3) We should XOR with key BCBC.
B064 XOR BCBC
= 1011 0000 0110 0100
XOR 1011 1100 1011 1100
----------------------------------------
= 0000 1100 1101 1000
------------------------------------------------
That is "0CD8".
The cipher text is "0CD8".
Decryption:
1) XOR with key BC
2) rotate 4 places left
3) XOR with key AA
b) Given encoded message is D007.
We need to twice the key to match length of encrypted message that
is BCBC.
1) We should XOR with BCBC
D007 XOR BCBC
= 1101 0000 0000 0111
XOR 1011 1100 1011 1100
-------------------------------------------
= 0110 1100 1011 1011
-------------------------------------------
2) We rotate 4 places left.
0110 1100 1011 1011 -> 1100 1011 1011 0110 = CBB6
We need to twice the key to match length of message that is
AAAA
3) We shold XOR with AAAA
CBB6 XOR AAAA
= 1100 1011 1011 0110
XOR 1010 1010 1010 1010
-------------------------------------------
= 0110 0001 0001 1100
-------------------------------------------
That is "611C".
The plaintext is "611C".
Please do comment for any queries.
PLease like it.
Thank You.
3. We have the following encryption algorithm: XOR with the HEX key AA, rotate 4 places...
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...
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 intercepted a message that we need to decode. Luckily, we know that they use the letters A to Z, space, 0 to 9. We also know that when they encode messages they start by shifting the first letter once to the right, then shift the next two letters left twice, then the next three letters right 3 times, then the next four letters left 4 times, the next five letters right 5 times, and so on. a. If...
We have intercepted a message that we need to decode. Luckily, we know that they use the letters A to Z, space, 0 to 9. We also know that when they encode messages they start by shifting the first letter once to the left, then shift the next two letters right twice, then the next three letters left 3 times, then the next four letters right 4 times, the next five letters left 5 times, and so on. a. If...
The Diffie-Hellman public-key encryption algorithm is an alternative key exchange algorithm that is used by protocols such as IPSec for communicating parties to agree on a shared key. The DH algorithm makes use of a large prime number p and another large number, g that is less than p. Both p and g are made public (so that an attacker would know them). In DH, Alice and Bob each independently choose secret keys, ?? and ??, respectively. Alice then computes...
Write a program that implements an elementary bit stream cipher. An elementary level bit stream cipher is an encryption algorithm that encrypts 1 byte of plain text at a time. This one uses a given 4-bit bit pattern as the key. The size of the encrypted message that we want to be able to send has a maximum length of 200 characters. You must: 1. prompt the user to input the clear text to be encrypted. You must use printf()...
3) Out of the following, name which kind of attack you carried out in part 1 and part2: a. ciphertext only, b. known plaintext, c. chosen plaintext, d. chosen ciphertext. Explain your answer Problem 3 10 points] A 4-bit long message was encrypted using one-time pad to yield a cipher-text “1010” Assuming the message space consists of all 4-bit long messages, what is the probability that the corresponding plaintext was “1001”? Explain your answer. Problem 4 Assume we perform a...
JAVA PROJECT Part 1 - Normalize Text The first thing we will do is normalize the input message so that it’s easier to work with. Write a method called normalizeText which does the following: Removes all the spaces from your text Remove any punctuation (. , : ; ’ ” ! ? ( ) ) Turn all lower-case letters into upper-case letters Return the result. The call normalizeText(“This is some \“really\” great. (Text)!?”) should return “THISISSOMEREALLYGREATTEXT” Part 2 - Obfuscation...
You will be writing a simple Java program that implements an ancient form of encryption known as a substitution cipher or a Caesar cipher (after Julius Caesar, who reportedly used it to send messages to his armies) or a shift cipher. In a Caesar cipher, the letters in a message are replaced by the letters of a "shifted" alphabet. So for example if we had a shift of 3 we might have the following replacements: Original alphabet: A B C...
I NEED HELP WITH DEBUGGING A C PROGRAM! PLEASE HEAR ME
OUT AND READ THIS. I just have to explain a lot so you understand
how the program should work.
In C programming, write a simple program to
take a text file as input and encrypt/decrypt it by reading the
text bit by bit, and swap the bits if it is specified by the first
line of the text file to do so (will explain below, and please let
me...