In this question you will double encrypt/decrypt your first and last name (separ
ID: 3708724 • Letter: I
Question
In this question you will double encrypt/decrypt your first and last name (separated by a ') using public and symmetric key approaches (if you are working in pairs you will use the first name of each member). Specifically, first encrypt your name using the One-Time Pad algorithm, resulting in ciphertext L1. Then, using the RSA algorithm encrypt L1 into ciphertext L2, which would be the transmitted message. You will then decrypt I2 to yield Ls, and then decrypt L3 to result in Ls, which will be a list of integers corresponding to the letters of your first and last name, as expected. That is, L4 should equal to the integers from the original message. Use the following table to translate between characters and their integer representation. Be sure to show each step of the encryption and decryption processes. A | B |C |D | E |F |G | H | | |J |K | L |M 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 1516 17 18 19 20 21 22 23 24 25 26 Use the RSA algorithm shown in class, for p 2143 and q 3257 (noting that key generation is only needed to be performed once for the entire message). Given the large number of digits suggested to use a powerful calculator such as www.wolframalpha.com. The One-Time Pad: Believe it or not, but "perfect" encryption techniques are theoretically ible! In this context, "perfect" means that there exists a mathematical proof showing that cryptanalysis is impossible (how cool is that!). The proof idea is to show that an attacker does not gain any additional information by having the ciphertext in hand. That is, seeing the encoded message provides zero information to somebody wanting to decipher it. One example letelw mbreakable is known the Qne-Time Pad (OTP).Explanation / Answer
Assuming that the name to the encrypted is TOM_JIM
1. USING ONE TIME PAD:
Step 1: Key Generation:
We randomly choose a list of characters from the table. The number of characters must be greater than or equal to the number of characters in your name ( in this case 7. Since the name we assumed id TOM_JIM).
Key = MYOTKEY (randomly chosen)
Now substitute these letters of the key with their corresponding numbers from the table.
MYOTKEY = 13251520110525
This key and table is shared with both the sender and receiver.
Step 2: Encryption:
Now substitute the letters of your name with the corresponding numbers from the table.
TOM_JIM = 20151000100913
Add the numbers obtained from the name with the key using Fibonacci addition. {Procedure for Fibonacci addition is given in the text itself}
TOM_JIM + MYOTKEY=
20151000100913 + 13251520110525 = 33302820210438. This is ciphertext L1.
Now this has to encrypted using RSA Algorithm:
2. USING RSA
Steps:
For RSA we need two values p and q which are given in the question. p=2143 and q=3257
Now we calculate n=p*q
n= 2143*3257 = 6979751
Now we calculate t = (p-1)(q-1)
t=(2143-1)*(3257-1) = 2142*3256 = 6974352
Now we have a choose an integer prime number 'e' such that e is relatively prime to t
We choose e =13 ( we need to do some trial and error to figure this out)
Now we calculate d which is the inverse of (e mod t)
d=inv(13 mod 6974352) = 55794817
{To verify the value of d, perform (d*e) mod t. The result should be =1}
Now we have all the values required for the encryption.
Encryption using RSA:
L2 = L1e mod n [ This is the equation for RSA encryption]
L2= 3330282021043813 mod 6979751
L2= 289276 [ This is the encrypted ciphertext from RSA. This will be transmitted to the receiver. And using this and the other values that we obtained the decryption will be done in the receiving end]
Decryption using RSA:
L3 = L2dmod n [ This is the equation for RSA decryption]
L3 = 28927655794817? mod 6979751
L3 = 33302820210438
Now we got back L3 which is equal to L1
Now we have to perform the decryption process of ONE TIME PAD on L3 to get L4 which will be the initially encoded message.
Decryption using ONE TIME PAD:
In order to perform decryption using ONE TIME PAD we need to perform Fibonacci Subtraction of L3 and the Key of ONE TIME PAD. {Procedure for Fibonacci subtraction is given in the text itself}
L4 = (L3) minus (Key of ONE TIME PAD)
L4 = 33302820210438 - 13251520110525
L4 = 20151000100913
So we get L4 which is equal to our message that was encoded in the very beginning. If we translate it using the table we get:
L4 = 20151000100913
L4= TOM_JIM
Hence, we have successfully encrypted the name using ONE TIME PAD and RSA and then decrypted it using RSA and ONE TIME PAD again.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.