CRY303c PE
CRY303c PE
Q2:
- The English alphabet:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
Q3:
- Because the formula of decryption Caesar cipher is:
p = (x-k) mod 26
---> If forgot the key, after 26 times rotated the text will come right back to the original.
Q4:
12:It
34:logs
18:of
48:vivid
16:expensive
10:yellow
18:of
2:upon
So, the decrypted message is "Iloveyou"
Q5:
605 = 5 * 11^2
Totient(605) = 605 * (1-1/5)*(1-1/11) = 440
Q6:
p = 5, q = 11, e = 7, n = p*q
Totient(n)=Totient(5*11) = totient(55) = (p-1) * (q-1) = 40
C = M^e mod n
C= 17^7 mod 55 = 8
Q7:
Alice’s public value A is computed as:
A = g^a mod p = 5^11 mod 79 = 42
Bob’s public value B is computed as:
B = g^b mod p = 5^7 mod 79 = 73
The shared secret key K can be computed by:
K = B^a mod p or A^b mod p
K = 73^11 mod 79 or 42^7 mod 79
K = 16
Q8:
Alice’s public value A is calculated as:
A = g^a mod p = 5^11 mod 79 = 42
K’ =(B’)^a mod p = 23^11 mod 79 = (5) = 55
Q9: