Security Midterm Sol
Security Midterm Sol
1
9. Cryptographic hash function takes an arbitrary block of data and returns
(a) fixed size bit string
(b) variable size bit string
(c) both (a) and (b)
(d) none of the above
10. High speed Ethernet works on
(a) coaxial cable
(b) twisted pair cable
(c) optical fiber
(d) none of the above
11. Listen before transmit is the logic of
(a) ALOHA
(b) CSMA
(c) Slotted ALOHA
(d) TDMA
12. What is stat frame delimiter (SFD) in Ethernet frame?
(a) 10101010
(b) 10101011
(c) 00000000
(d) 11111111
13. Pretty good privacy (PGP) is used in
(a) browser security
(b) email security
(c) FTP security
(d) all of the above
+
(c) Get fixed size message digest (a) Ks (m), KB (Ks )
+
(b) Public Key Encryption (b) KB (m)
2
2. Where Is the Link Layer Implemented?
link layer implemented in adaptor (network interface card NIC) or on a chip
1 0 1 1 0 0 1 � 0
1 0 1 0 0 0 1 � 0
0 1 1 0 1 1 0 � 1
−− −− −− −− −− −− −−
1 1 0 0 0 1 1 � 0
Suppose A would like to send an IP datagram to D, and assume that A’s ARP cache does not contain D’s
MAC address.
Will A perform an ARP query to find D’s MAC address? Why?
No, because they are not on the same LAN.
A can find out that they are not on the same subnet by checking D’s IP address.
In the Ethernet frame (containing the IP datagram destined to D) that is delivered to router, what are
the source and destination IP and MAC addresses?
Ethernet frame from A to D: Source IP = A’s IP address Destination IP = D’s IP address
Source MAC = A’s MAC address
Destination MAC = The MAC address of router’s interface connecting to Subnet containing A
Suppose Host A would like to send an IP datagram to Host B, and neither A’s ARP cache contains B’s
MAC address nor does B’s ARP cache contain A’s MAC address. Further suppose that the switch for-
warding table contains entries for Host B and the router only. Thus, A will broadcast an ARP request
message. What actions will the switch perform once it receives the ARP request message?
Switch S1 will broadcast the Ethernet frame via both its interfaces
as the received ARP frame’s destination address is a broadcast address.
And it learns that A resides on Subnet 1 which is connected to S1 at the interface connecting to Subnet 1
And, S1 will update its forwarding table to include an entry for Host A
Will router also receive this ARP request message? If so, will forward the message to the other Subnet?
3
Yes, router R1 also receives this ARP request message, but R1 won’t forward the message to Subnet 3.
Once Host B receives this ARP request message, it will send back to Host A an ARP response message.
But will it send an ARP query message to ask for A’s MAC address? Why?
B won’t send ARP query message asking for A’s MAC address,
as this address can be obtained from A’s query message.
What will the switch do once it receives an ARP response message from Host B?
Once switch S1 receives B’s response message,
it will add an entry for host B in its forwarding table, and then drop the received frame
as destination host A is on the same interface as host B (i.e., A and B are on the same LAN segment).
7. Suppose four active nodes—nodes A, B, C and D—are competing for access to a channel using slotted
ALOHA. Assume each node has an infinite number of packets to send. Each node attempts to transmit
in each slot with probability p. The first slot is numbered slot 1, the second slot is numbered slot 2, and
so on.
a. What is the probability that node A succeeds for the first time in slot 5?
(1–p(A))4 p(A)
where, p(A) = probability that A succeeds in a slot
p(A) = p(A transmits and B does not and C does not and D does not)
= p(A transmits) p(B does not transmit) p(C does not transmit) p(D does not transmit)
= p(1–p)(1–p)(1 − p) = p(1–p)3
Hence, p(A succeeds for first time in slot 5)
= (1–p(A))4 p(A) = (1–p(1–p)3 )4 p(1–p)3
b. What is the probability that some node (either A, B, C or D) succeeds in slot 4?
p(A succeeds in slot 4) = p(1 − p)3
p(B succeeds in slot 4) = p(1 − p)3
p(C succeeds in slot 4) = p(1 − p)3
p(D succeeds in slot 4) = p(1 − p)3
p(either A or B or C or D succeeds in slot 4) = 4p(1 − p)3 (because these events are mutually exclusive)
c. What is the efficiency of this four-node system?
efficiency = p(success in a slot) =4p(1 − p)3