Docsity

12 Problems on Security in Computing - Assignment 3 | CIS 3360, Assignments of Computer Science

Toggle sidebar
bg1
CIS 3360 Homework 3
Due Date: September 27
Worth: 4%
1) A value g is known as a primitive root of a prime p if and only if the smallest positive
integer n for which gn ≡ 1 (mod p) is n = p-1. Write a short C program that
prompts the user for the value of p and prompts the user for the value
of g and prints out whether or not g is a primitive root of p. Simply
implement a brute force algorithm that successively computes g1 (mod
p), g2 (mod p), etc. You may also write a function that checks to see
whether or not the value entered by the user is prime. Simply turn in a
printout of your source code.
2) The idea of hierarchical key control was briefly introduced in class.
In this sort of system, if A wants to communicate with B, it may be the
case that a different KDC has access to communication with B than
with A. Sketch out the set of steps that would be necessary for A to
obtain a secret key with which to communicate with B through a
system of hierarchical key control. Keep the following sample situation
in mind where A, B, …, J are end users and there are three KDCs
arranged in a hierarchical structure as shown below, while putting
together your protocol:
Global KDC
/ \
Local-1 KDC Local-2 KDC
/ / | \ \ / / | \ \
A C D E F G B H I J
Also describe the keys that each of the three KDCs in the diagram
above actually have access to.
3) Consider the following protocol for sending a plaintext M between A and B:
a) A sends B the message (A, EB( M), B),
b) B answers A with the message (B, EA(M), A).
Can an adversary Z break this protocol? If yes then write the steps via which the
adversary breaks this protocol.
4) Consider the following mutual authentication protocol in which two parties A and B
authenticates each other by exchanging four messages:
1. A → B: N1
2. B → A: N2
3. A → B: EK[N2]
4. B → A: EK[N1]
pf3

Partial preview of the text

Download 12 Problems on Security in Computing - Assignment 3 | CIS 3360 and more Assignments Computer Science in PDF only on Docsity!

CIS 3360 Homework 3 Due Date: September 27 Worth: 4% 1) A value g is known as a primitive root of a prime p if and only if the smallest positive integer n for which gn^ ≡ 1 (mod p) is n = p-1. Write a short C program that prompts the user for the value of p and prompts the user for the value of g and prints out whether or not g is a primitive root of p. Simply implement a brute force algorithm that successively computes g^1 (mod p), g^2 (mod p), etc. You may also write a function that checks to see whether or not the value entered by the user is prime. Simply turn in a printout of your source code. 2) The idea of hierarchical key control was briefly introduced in class. In this sort of system, if A wants to communicate with B, it may be the case that a different KDC has access to communication with B than with A. Sketch out the set of steps that would be necessary for A to obtain a secret key with which to communicate with B through a system of hierarchical key control. Keep the following sample situation in mind where A, B, …, J are end users and there are three KDCs arranged in a hierarchical structure as shown below, while putting together your protocol: Global KDC /
Local-1 KDC Local-2 KDC / / | \ \ / / | \
A C D E F G B H I J Also describe the keys that each of the three KDCs in the diagram above actually have access to. 3) Consider the following protocol for sending a plaintext M between A and B: a) A sends B the message (A, EB( M), B), b) B answers A with the message (B, EA(M), A). Can an adversary Z break this protocol? If yes then write the steps via which the adversary breaks this protocol. 4) Consider the following mutual authentication protocol in which two parties A and B authenticates each other by exchanging four messages:

  1. A → B: N
  2. B → A: N
  3. A → B: EK[N2]
  4. B → A: EK[N1]

The rest of the variables are as follows: N1, N2 = randomly generated numbers called Nonce. A, B = IDs of parties A and B. K = a symmetric-key already shared between A and B. A successfully authenticates B upon receiving the fourth message. B successfully authenticates A upon receiving the third message. Since K is a key already shared between parties A and B only, whoever encrypts a message using K assures that he/she possesses K, thereby gets authenticated. After sending its nonce, a participant waits for the response, that is, an encrypted message containing that nonce. Upon receiving the response, the participant simply decrypts it and compares it with the nonce it has previously sent for authentication. A match in the nonce values guarantees that authentication is achieved. Find an attack in the protocol such that a participant without the possession of key K could get authenticated. Hint: A participant has no mechanism to check whether N1=N2. 5) Needham and Schroeder suggest the following variant of their protocol:

  1. Alice  Bob: Alice
  2. Bob Alice: { Alice, rand 3 } kBob
  3. Alice  Cathy: { Alice, Bob, rand 1 , { Alice, rand 3 } kBob}
  4. Cathy  Alice: { Alice, Bob, rand 1 , ksession{ Alice, rand 3 , ksession } kBob} kAlice
  5. Alice  Bob: { Alice, rand 3 , ksession } kBob
  6. Bob Alice: { rand 2 } ksession
  7. Alice  Bob: { rand 3 – 1} ksession Show that this protocol solves the problem of replay as a result of stolen session keys. 6) Consider an RSA digital signature scheme (see Section 9.5.2 of Intro. to Computer Security by Matt Bishop). Alice tricks Bob into signing messages m 1 and m 2 such that m = m 1 m 2 mod nBob. Prove that Alice can forge Bob’s signature on m. 7) Perform encryption and decryption using the RSA algorithm, as in Figure 9.6 (of Cryptography and Network Security book by William Stallings also given on your course web site as figureforhw3.pdf ) for the following: a. p = 3; q = 11, e = 7; M= 5 b. p = 5; q = 11, e= 3; M= c. p = 7; q = 11, e = 17; M= d. p = 11; q =13, e = 11; M= e. p = 17; q = 31, e =7; M = 2. Hint: Decryption is not as hard as you think; use some finesse.