CS计算机代考程序代写 chain 1 Block Ciphers

1 Block Ciphers

1. All of the following are acceptable modes of operation EXCEPT

(a) Cipher Block Chaining

(b) Counter Mode

(c) Output Feedback

(d) Electronic Code Book

2. While sending a 10-block ciphertext encrypted with CBC mode, block
#7 gets corrupted. When the recipient tries to decrypt it, which plain-
text blocks will be corrupted?

3. Why do SPNs include an extra key-mixing step after the last round?

2 Public Key

2.1 RSA

Bob wants to set up an Plain RSA public key. He chooses p = 11 and q = 17
as his primes, and chooses e = 3 as his encryption exponent.

1. Compute the following other values used by the protocol:

• N =
• d =

2. Which of the previous five values (p, q, e,N, and d) make up the public
key?

3. Alice want to send Bob the message m = 40. What ciphertext does
she send?

4. Name one issue with plain RSA, and describe how an attacker might
exploit it

2.2 Diffie-Hellman

Alice and Bob decide to perform DHKE. They agree on public parameters
p = 7 and g = 3. Alice choose a = 3 for her secret, and Bob chooses b = 5.

1. What does value does Alice send Bob?

1

2. What does value Bob send Alice?

3. What is the value of the shared secret?

4. Suppose Eve passively wiretaps this exchange. What does she learn
about the shared secret?

3 Cryptocurrency

1. Define what a Sybil Attack is, and briefly describe how the Bitcoin
protocol defends against it.

2. Assuming all blocks before it are valid, how do you check if the most
recent block of the blockchain is valid? (Pseudocode is reccomended,
but not required)

3. Suppose a bitcoin node receives two different new extensions of the
blockchain. How does it decide which one to keep?

4 DC

Alice, Bob, Carol, Dave, and Eve decide to run the Dining Cryptographers
protocol on a 1-bit message. Carol wants to broadcast “1”

1. In total, how many shared secrets need to be created among the 5 of
them?

2. If everyone follows the protocol, what is the broadcasted message?

3. Suppose Eve decides to lie (i.e. if the protocol dictates she should say
“0” then she says “1” and vice-versa). In this scenario, what is the
broadcasted message?

In this scenario, who knows the correct message?

4. Suppose Even and Dave both decide to lie. In this scenario, what is
the broadcasted message?

In this scenario, who knows the correct message?

2