Docsity

Assignment 2 - Fall 2006 | Computer Security | 22C 169, Assignments of Computer Science

Toggle sidebar
bg1
Fall 2006 – 22c:169 Computer Security
Assignment 2 - due by Thursday, Oct 5.
2.4 With the ECB mode, if there is an error in a block of the transmitted ciphertext, only the corresponding
plaintext block is affected. However, in the CBC mode, this error propagates. For example, an error in the
transmitted C1(Figure 2.9) obviously corrupts P1and P2.
1. Are any blocks beyond P2affected?
2. Suppose that there is a bit error in the source version of P1. Through how many ciphertext blocks is
this error propagated? What is the effect at the receiver?
Encrypt
Time = 1
IV
K
P1
C1
IV
Encrypt
Time = 2
K
P2
C2
Encrypt
Time = N
K
PN
P1P2PN
CN
C1C2CN
CN–1
CN–1
• • •
Decrypt
KDecrypt
KDecrypt
K
• • •
(a) Encryption
(b) Decryption
Figure 2.9 Cipher Block Chaining (CBC) Mode
2.10 Suppose that someone suggests the following way to confirm that the two of you are both in possession
of the same secret key. You create a random bit string the length of the key, XOR it with the key, and send
the result over the channel. Your partner XORs the incoming block with the key (which should be the same
as your key) and sends it back. You check and if what you receive is your original random string, you have
verified that your partner has the same secret key, yet neither of you has ever transmitted the key. Is there
a flaw in this scheme?
4.3 The original three-way authentication procedure for X.509 illustrated in Figure 4.6c contains a security
flaw. The essence of the protocol is as follows:
A→B: A {tA, rA, IDB}
B→A: B {tB, rB, IDA, rA}
A→B: A {rB}
The text of X.509 states that checking timestamps tAand tBis optional for three-way authentication.
But consider the following example: Suppose A and B have used the preceding protocol on some previous
pf2

Partial preview of the text

Download Assignment 2 - Fall 2006 | Computer Security | 22C 169 and more Assignments Computer Science in PDF only on Docsity!

Fall 2006 – 22c:169 Computer Security Assignment 2 - due by Thursday, Oct 5.

2.4 With the ECB mode, if there is an error in a block of the transmitted ciphertext, only the corresponding plaintext block is affected. However, in the CBC mode, this error propagates. For example, an error in the transmitted C 1 (Figure 2.9) obviously corrupts P 1 and P 2.

  1. Are any blocks beyond P 2 affected?
  2. Suppose that there is a bit error in the source version of P 1. Through how many ciphertext blocks is this error propagated? What is the effect at the receiver?

Encrypt

Time = 1 IV

K

P 1

C 1

IV

Encrypt

Time = 2

K

P 2

C 2

Encrypt

Time = N

K

PN

P 1 P 2 PN

CN

C 1 C 2 CN

CN –

C N –

K^ Decrypt K Decrypt • • • K Decrypt

(a) Encryption

(b) Decryption Figure 2.9 Cipher Block Chaining (CBC) Mode

2.10 Suppose that someone suggests the following way to confirm that the two of you are both in possession of the same secret key. You create a random bit string the length of the key, XOR it with the key, and send the result over the channel. Your partner XORs the incoming block with the key (which should be the same as your key) and sends it back. You check and if what you receive is your original random string, you have verified that your partner has the same secret key, yet neither of you has ever transmitted the key. Is there a flaw in this scheme?

4.3 The original three-way authentication procedure for X.509 illustrated in Figure 4.6c contains a security flaw. The essence of the protocol is as follows:

A→B: A {tA, rA, IDB } B→A: B {tB , rB , IDA, rA} A→B: A {rB }

The text of X.509 states that checking timestamps tA and tB is optional for three-way authentication. But consider the following example: Suppose A and B have used the preceding protocol on some previous

occasion, and that opponent C has intercepted the preceding three messages. In addition, suppose that timestamps are not used and are all set to 0. Finally, suppose C wishes to impersonate A to B. C initially sends the first captured message to B:

C→B: A { 0 , rA, IDB }

B responds, thinking it is talking to A but is actually talking to C.

B→C: B { 0 , r′ B , IDA, rA}

C meanwhile causes A to initiate authentication with C by some means. As a result, A sends C the following:

A→C: A { 0 , r′ A, IDC }

C responds to A using the same nonce provided to C by B.

C→A: C { 0 , r′ B , IDA, r′ A}

A responds with

A→C: A {r′ B }

This is exactly what C needs to convince B that it is talking to A, so C now repeats the incoming message back out to B.

C→B: A {r′ B }

So B will believe it is talking to A whereas it is actually talking to C. Suggest a simple solution to this problem that does not involve the use of timestamps.