CS计算机代考程序代写 chain CMSC 414 Computer and Network Security, Section 0101 Fall 2018

CMSC 414 Computer and Network Security, Section 0101 Fall 2018

Second Third-Term Exam

Closed book and notes; In class Tuesday, November 6

⊕ Do not forget to write your name on the first page. Initial each subsequent page.
⊕ Be neat and precise. I will not grade answers I cannot read.
⊕ You should draw simple figures if you think it will make your answers clearer.
⊕ When working with hex dumps, it may be helpful to visually identify the components.
⊕ Please indicate if your response to a question is continued on the back of the page.
⊕ You may punt on any question (or individually labeled part) for 1/10 of the points
by putting a � in the answer section for the question. We will ignore anything else
written as part of the answer, unless you scratch out the punt box.
⊕ For multiple choice questions, providing 2 answers will give you one-half the possible
points if one is correct, and providing 3 answers will give you one-third the possible
points. More than three answers will get you no points. Answer with A–E.
⊕ Good luck and remember, brevity is the soul of wit

• All problems are mandatory

• I cannot stress this point enough: Be precise. If you have written something incorrect along
with the correct answer, you should not expect to get all the points. I will grade based upon
what you wrote, not what you meant.

• Maximum possible points: 50.

Name:

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 1 2 3 4 5 6 7 8 9 A B C D E F

0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536

1. Symmetric-Key Cryptography

(a) Compute one round of the following S-P Network (6pts)

The block size is 8 bits, with a 4-bit S-box applied to each half. Given

S-box:
in 0 1 2 3 4 5 6 7 8 9 A B C D E F

out 5 A F 2 D 1 8 6 C 0 E 3 9 7 4 B

P-box:

0 1 2 3 4 5 6 7

2 5 7 1 3 6 0 4

What is the output byte after a single round for input byte A5?

A) 08

B) 4F

C) 50

D) B2

E) E1

Answer:

(b) Describe CBC mode (you may use a diagram, if you like), and explain how it prevents splicing
attacks. (2pts)

(c) What does the diagram below represent? (2pts)

EK EK EK EK EK

K0 K1 K2 K3 K4

IV

P0 P1 P2 P3 P4⊕ ⊕ ⊕ ⊕ ⊕
C0 C1 C2 C3 C4

A) Cipher Block Chain

B) Cryptographic Hash

C) Feistel Cipher

D) Output Feedback

E) SP-Network

Answer:

1

2. Asymmetric-Key Cryptography

(a) You are creating a public/private RSA key pair. Given the following parameters, what is the
decryption exponent d? (6pts)

p = 11 q = 23 p · q = 253 (p− 1) · (q − 1) = 220 e = 3

A) 85

B) 147

C) 169

D) 218

E) 251

Answer:

(b) Given a prime p, a generator g of Z∗p, g
a mod p, and gb mod p, why is it difficult to compute

gab mod p? (2pts)

(c) What problem does random padding of plaintexts solve, and how? (2pts)

2

3. Using Cryptography

(a) Your company’s RSA private key might have been exposed to an attacker. What steps should
you take? (3pts)

(b) What guarantees do an HTTPS connection provide? (2pts)

(c) What guarantee does an HTTPS connection not provide, and how can we get this guarantee?
(2pts)

(d) Do we prefer symmetric or asymmetric encryption for large messages, why is this the case,
and why might we sometimes prefer the other type of encryption? (3pts)

3

4. Digital Currencies

(a) List two benefits that malware creators can gain from digital currencies. (2pts)

(b) If a user runs a Bitcoin SPV node on a host with address 1.2.3.4 and downloads the following
blocks, what does an adversary learn by observing this, and how does it affect the user’s
anonymity (if at all)? (3pts)

Block Input Output Value
Identifier Transaction Block Transaction Pubkey

0x0032C2 0 0x00916E 3 0x64FC 0.35
1 0x00454C 1 0xFB65 0.12

0x0048F1 0 0x009790 0 0xC50B 0.81
1 0x004100 2 0x64FC 0.24

0x00AE77 0 0x0032C2 0 0xA7A9 0.30
1 0x00CA71 4 0x63AA 0.05

(c) How can the user running the SPV node in the previous question reduce the information
learned by the adversary? Be specific. (3pts)

(d) Why do Ethereum transactions include gas? (2pts)

4

5. Anonymous Communications

(a) Alice, Bob, and Carol form a DC-net. Alice has shared keys kAB = 4B and kAC = 12. What
should she broadcast to anonymously send the message BE? (3pts)

A) 18

B) 59

C) A6

D) E7

E) FD

Answer:

(b) In a Mix-net cascade containing 5 mix nodes, how many must be trustworthy to preserve the
sender and receiver anonymity, and why? (3pts)

(c) In a Tor network with 1000 relay nodes, the adversary controls 50 of them. Given a circuit of
3 relays between Alice and Bob, what is the probability that the exit node sending the traffic
to Bob will be under the adversary’s control? (2pts)

(d) List two techniques that can be used to deanonymize website visitors, even with standard
HTTP cookies disabled. (2pts)

5