mirror of
https://codeberg.org/openpgp/notes.git
synced 2025-03-28 03:33:14 +01:00
edit User ID packet
This commit is contained in:
parent
580325dca4
commit
a2b8f75ea2
1 changed files with 7 additions and 5 deletions
|
@ -632,7 +632,7 @@ To understand the internal packet structure of this identity and its connection
|
|||
|
||||
### User ID packet
|
||||
|
||||
First, let's look at the User ID packet, which encodes an identity that Alice has connected to her OpenPGP certificate:
|
||||
First, let's look at the User ID packet, which encodes an identity that is associated with an OpenPGP certificate:
|
||||
|
||||
```text
|
||||
$ sq packet dump --hex alice.pub-2--UserID
|
||||
|
@ -645,11 +645,13 @@ User ID Packet, new CTB, 2 header bytes + 19 bytes
|
|||
00000010 2e 6f 72 67 3e
|
||||
```
|
||||
|
||||
- `CTB: 0xcd`: The Packet type ID for this packet. Bits 7 and 6 show that the packet is in “OpenPGP packet format” (as opposed to in “Legacy packet format”). The remaining 6 bits encode the type ID’s value: “13.” This is the value for a [User ID packet](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-10.html#name-user-id-packet-tag-13).
|
||||
- `length: 0x13`: The remaining length of this packet (here: 19 bytes).
|
||||
- `value`: 19 bytes of data that contain UTF-8 encoded text. The value corresponds to the string `<alice@example.org>`. With this identity component, Alice states that she uses (and has control of) this email address. Note that the email address is enclosed in `<` and `>` characters, following [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822) conventions.
|
||||
- `CTB: 0xcd`: This is the Packet Type ID for this packet. Bits 7 and 6 show that the packet is in “OpenPGP packet format” (not “Legacy packet format”). The remaining 6 bits encode the type ID’s value: “13,” which is the value for a [User ID packet](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-10.html#name-user-id-packet-tag-13).
|
||||
|
||||
So, a User ID packet is really just a string, marked as a User ID by the packet type id.
|
||||
- `length: 0x13`: This field shows the remaining length of the packet (here: 19 bytes).
|
||||
|
||||
- `value`: This comprises 19 bytes of data that contain UTF-8 encoded text. The value corresponds to the string `<alice@example.org>`. With this identity component, Alice asserts usage and control over the specified email address. Note that the email address is enclosed in `<` and `>` characters, in line with the conventions of [RFC 2822](https://www.rfc-editor.org/rfc/rfc2822).
|
||||
|
||||
Essentially, a User ID packet is just a string marked as a User ID by the packet type ID.
|
||||
|
||||
### Linking the User ID with a certification self-signature
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue