26.10.2012 Views

Internet Security - Dang Thanh Binh's Page

Internet Security - Dang Thanh Binh's Page

Internet Security - Dang Thanh Binh's Page

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

314 INTERNET SECURITY<br />

MSB<br />

7 6 5 4 3 2 1 0<br />

1<br />

2<br />

1<br />

2<br />

Packet tag<br />

Content tag<br />

(4 bits)<br />

Content tag<br />

(6 bits)<br />

Length<br />

type<br />

Packet length<br />

Old format packets: content tag (bits 5, 4, 3, 2); length type (bits 1,0)<br />

New format packets: content tag (bits 5, 4, 3, 2, 1, 0)<br />

Figure 9.4 Packet header.<br />

2–Signature packet<br />

3–Session key packet encrypted by symmetric key<br />

4–One-pass signature packet<br />

5–Secret-key packet<br />

6–Public-key packet<br />

7–Secret-subkey packet<br />

8–Compressed data packet<br />

9–Symmetrically encrypted data packet<br />

10–Marker packet<br />

11–Literal data packet<br />

12–Trust packet<br />

13–User ID packet<br />

14–Public subkey packet<br />

60 ∼ 63–Private or experimental values<br />

9.1.5.2 Old-Format Packet Lengths<br />

The meaning of the length type in old-format packets is:<br />

0–The packet has a one-octet length. The header is two octets long.<br />

1–The packet has a two-octet length. The header is three octets long.<br />

2–The packet has a four-octet length. The header is five octets long.<br />

3–The packet is of indeterminate length. An implementation should not use indeterminate<br />

length packets except where the end of data will be clear from the context. It is better<br />

to use a new-format header described below.<br />

9.1.5.3 New-Format Packet Lengths<br />

New-format packets have four possible ways of encoding length:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!