《计算机网络 自顶向下方法》(第7版)答案(第八章)(五)

P22

a) F
b) T
c) T
d) F

P23

If Trudy does not bother to change the sequence number, R2 will detect the duplicate when checking the sequence number in the
ESP header. If Trudy increments the sequence number, the packet will fail the
integrity check at R2.

P24

a) Since IV = 11, the key stream is 111110100000 ……….

Given,
m = 10100000

Hence,
ICV = 1010 XOR 0000 = 1010

The
three fields will be:

IV: 11

Encrypted
message: 10100000 XOR 11111010 = 01011010

Encrypted
ICV: 1010 XOR 0000 = 1010

b) The receiver extracts the IV (11) and generates the
key stream 111110100000 ……….

XORs
the encrypted message with the key stream to recover the original message:

01011010
XOR 11111010 = 10100000

XORs
the encrypted ICV with the keystream to recover the original ICV:

1010
XOR 0000 = 1010

The receiver
then XORs the first 4 bits of recovered message with its last 4 bits:

1010
XOR 0000 = 1010 (which equals the recovered ICV)

c) Since the ICV is calculated as the XOR of first 4
bits of message with last 4 bits of message, either the 1st bit or the 5th bit
of the message has to be flipped for the received packet to pass the ICV check.

d) For part (a), the encrypted message was 01011010

Flipping
the 1st bit gives, 11011010

Trudy
XORs this message with the keystream:

11011010
XOR 11111010 = 00100000

If
Trudy flipped the first bit of the encrypted ICV, the ICV value received by the
receiver is 0010

The receiver XORs this value with the keystream to get the ICV:

0010 XOR 0000 = 0010

The receiver now calculates the ICV from the recovered message:

0010 XOR 0000 = 0010 (which equals the recovered ICV and so the received packet
passes the ICV check)

P25

《计算机网络 自顶向下方法》(第7版)答案(第八章)(五)_第1张图片

P26

《计算机网络 自顶向下方法》(第7版)答案(第八章)(五)_第2张图片

你可能感兴趣的:(网络原理)