Вы находитесь на странице: 1из 3

# Security and Cooperation in Wireless Networks

Exercise Sheet 1

## Name : Philipp Thurow

(1) Yes there is a flaw in this scheme. If the adversary is able to catch both sent messages, he can XOR them and
receives the private key with this method, because the first sent message is the encrypted message and the
second one is the decrypted message.

(2) a.

5 2 4 1 5

1 4 2 3 2
3 1 5 2 3
4 3 1 4 4

2 5 3 5 1
(2) b.
Person A and Person B both have the key k that is as long as the text they want to send safe.
Person A uses this key k to create the text x (text of numbers) via the vector M1 and then encrypting the message p he wants to send while sending the
numbers in the x-th rows and p-th columns, one after another
(encrypted message z). Person B receives this message z and is able to decrypt it with using the key k :
Looking up z-th row and k-th column to decrypt z to the original message.

## (4) a. RSA encryption

p = 17 , q = 31 ➔ n = 17*31 = 527 , phi(n) = 16 * 30 = 480 ; e = 7 ➔ d = 343 , because e*d mod phi(n) = 1
So we got public key (7 , 527) and private key 343. Message M = 2

## Answer : Encryption : c = m^e mod n = 2^7 mod 527 = 128

Decryption : m = c^d mod n = 128^343 mod 527 = 2 (via mathematica)

(4) b.
C = 10 , users public key (5, 35) ➔ phi(n) = 24 ➔ d =5 , because 5*5 mod 24 = 1
Decryption : m = 10^5 mod 35 = 5

## Answer : The plaintext M is „5“!

(4) c.
public key (31 , 3599) ➔ p = 59 , q = 61 ➔ phi(n) = 58*60 = 3480 ➔ d = 3031 via euklid algorithm

## Answer : The private key is d = 3031!

(5) Diffie-Hellman scheme with a common prime p = 11 and a primitive root (generator) g = 2

## Answer : A‘s private key X(A) = 6

b) Public key of B is Y(B) = 3 ➔ B‘s private key is X(B) = 8 , because 3 = 2^8 mod 11

So we get the secret key K(B) =Y(A)^X(B) mod p = 9^8 mod 11 = 3 and the secret key K(A) = Y(B)^X(A) mod p = 3^6 mod 11 = 3

Answer : Both keys are the same , so we get the shared secret key K = 3