mirror of
https://codeberg.org/openpgp/notes.git
synced 2024-11-29 11:02:06 +01:00
Some minor changes to chapter 8
This commit is contained in:
parent
6700eddaba
commit
5d096959de
1 changed files with 50 additions and 27 deletions
|
@ -40,7 +40,7 @@ No [key flag](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-
|
|||
|
||||
### Third-party signatures
|
||||
|
||||
Third-party signatures are pivotal in OpenPGP for decentralized authentication, forming the basis of the Web of Trust. They encode authentication-related statements about certificates and linked identities, establishing trustworthiness and verification.
|
||||
Third-party signatures are pivotal in OpenPGP for decentralized authentication, forming the basis of the Web of Trust. They encode authentication-related statements about certificates and linked identities, establishing trustworthiness in identity claims.
|
||||
|
||||
Third-party signatures are used to make specific statements:
|
||||
|
||||
|
@ -49,15 +49,15 @@ Third-party signatures are used to make specific statements:
|
|||
- revoking, and thus invalidating, prior third-party signature statements
|
||||
|
||||
```{note}
|
||||
The **certify others** [key flag](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-key-flags) (`0x01`) is required to issue third-party signatures. Only the certificate's primary can hold this key flag.
|
||||
The **certify others** [key flag](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-key-flags) (`0x01`) is required to issue third-party signatures. Typically, only the certificate's primary can hold this key flag.
|
||||
```
|
||||
|
||||
### Distinct functions of self-signatures and third-party signatures
|
||||
|
||||
The meaning of an OpenPGP signature depends significantly on its issuer. Self-signatures and third-party signatures, even when of the same type, serve distinct functions. For example:
|
||||
The meaning of an OpenPGP signature depends significantly on its issuer. Self-signatures and third-party signatures, even when of the same [signature type](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-signature-types), serve distinct functions. For example:
|
||||
|
||||
- Certifying self-signatures (type IDs `0x10` - `0x13`) bind a User ID to a certificate.
|
||||
- Third-party signatures of the same type IDs endorse the authenticity of a User ID.
|
||||
- Third-party signatures of the same type IDs endorse the authenticity of a User ID claimed by the holder of a certificate.
|
||||
|
||||
In another instance:
|
||||
|
||||
|
@ -70,7 +70,7 @@ Self-signatures play a crucial role in forming and managing the structure of Ope
|
|||
|
||||
Internally, an OpenPGP certificate is essentially a series of packets strung sequentially. When a certificate is stored in a file format known as a [transferable public key](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-10.html#name-transferable-public-keys), packets can be easily added or removed.
|
||||
|
||||
To safeguard against unauthorized additions, OpenPGP uses cryptographic signatures. These validate that any additions, such as subkeys or [identity components](identity_components), were made by the owner of the OpenPGP certificate using its primary key. While anyone can still store unrelated elements to a certificate dataset, OpenPGP implementations will reject them if they lack a valid cryptographic connection with the certificate.
|
||||
To safeguard against unauthorized additions and alterations of components, OpenPGP uses cryptographic signatures. These validate that any additions, such as added subkeys or [identity components](identity_components), were made by the owner of the OpenPGP certificate using its primary key. While anyone can still store unrelated elements to a certificate dataset, OpenPGP implementations will reject them if they lack a valid cryptographic connection with the certificate.
|
||||
|
||||
```{note}
|
||||
Conversely, omissions of packets by third parties can easily occur when handling an OpenPGP certificate dataset. This could pose a challenge, for example, when an attacker deliberately omits revocation packets. Without access to an alternative, complete certificate source, recipients might not detect these omissions.
|
||||
|
@ -112,7 +112,9 @@ Binding subkeys that possess the *signing* key flag to a certificate represents
|
|||
|
||||
That is, to bind a signing-capable subkey to a primary key, it is insufficient that the "primary key wants to be associated with the subkey." The subkey must explicitly signal that it "wants to be associated with the primary key."
|
||||
|
||||
This mutual binding is crucial for security. Without it, an individual (e.g., Alice) could falsely claim a connection to another person's (e.g., Bob's) signing subkey. To prevent such scenarios, where an attacker might wrongfully "adopt" a victim's signing subkey, a dual-layer of signatures is used:
|
||||
This mutual binding is crucial for security. Without it, an individual (e.g., Alice) could falsely claim a connection to another person's (e.g., Bob's) signing subkey.
|
||||
As a consequence, Alice could claim to have issued signatures which were in fact issued by Bob.
|
||||
To prevent such scenarios, where an attacker might wrongfully "adopt" a victim's signing subkey, a dual-layer of signatures is used:
|
||||
|
||||
- the [subkey binding signature](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-10.html#sigtype-subkey-binding) (type ID `0x18`), which is issued by the certificate's primary key
|
||||
- the [primary key binding signature](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#sigtype-primary-binding) (type ID `0x19`), created by the subkey itself. This is informally known as an embedded "back signature," because the subkey's signature points back to the primary key.
|
||||
|
@ -131,11 +133,11 @@ The back signature signifies the mutuality of the subkey's association with the
|
|||
|
||||
Self-signatures also play a vital role in binding identity components, such as User IDs or User Attributes, to an OpenPGP certificate.
|
||||
|
||||
Take for instance, the User ID `Alice Adams <alice@example.org>`. To link this User ID to her OpenPGP certificate (`AAA1 8CBB 2546 85C5 8358 3205 63FD 37B6 7F33 00F9 FB0E C457 378C D29F 1026 98B3`), Alice would use a cryptographic signature.
|
||||
To bind the User ID `Alice Adams <alice@example.org>` to her OpenPGP certificate (`AAA1 8CBB 2546 85C5 8358 3205 63FD 37B6 7F33 00F9 FB0E C457 378C D29F 1026 98B3`), Alice would use a certification signature.
|
||||
|
||||
There are four types of *certifying self-signature*. The most commonly used type for binding User IDs is the [positive certification](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-10.html#sigtype-positive-cert) (type ID `0x13`). Alternatively, types `0x10`, `0x11` or `0x12` might be used. This binding signature must be issued by the primary key.
|
||||
There are four types of *certifying self-signature*. According to the specification, the most commonly used type for binding User IDs is the [generic certification](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-generic-certification-of-a-) (type ID `0x10`). Alternatively, types `0x11`, `0x12` or `0x13` might be used. This binding signature must be issued by the primary key.
|
||||
|
||||
The certifying self-signature packet – calculated over the primary key, User ID, and metadata of the signature packet – is then added to the certificate, directly following the User ID packet.
|
||||
The certifying self-signature packet – calculated over the primary key, User ID, and metadata of the signature packet – is added to the certificate, directly following the User ID packet.
|
||||
|
||||
```{figure} diag/user_id_certification.png
|
||||
:name: fig-user-id-certification
|
||||
|
@ -147,9 +149,9 @@ Linking a User ID to an OpenPGP certificate
|
|||
(primary-metadata)=
|
||||
### Adding metadata to the primary key/certificate
|
||||
|
||||
The signatures that bind subkeys and identity components to a certificate serve dual purposes: linking components to the certificate and adding metadata to components.
|
||||
The signatures that bind subkeys and identity components to a certificate serve dual purposes: linking components to the certificate and adding scoped metadata to components.
|
||||
|
||||
Unlike these components, the primary key of a certificate doesn't require a linking signature since it serves as the central anchor of the certificate. However, associating metadata with the primary key is still essential, as it generally applies to the entire certificate.
|
||||
Unlike subkeys and User IDs, the primary key of a certificate doesn't require a linking signature since it serves as the central anchor of the certificate.
|
||||
|
||||
Metadata can be added to the primary key via two mechanisms:
|
||||
|
||||
|
@ -160,6 +162,7 @@ The types of metadata typically associated with the primary key through these me
|
|||
|
||||
- key expiration
|
||||
- key flags
|
||||
- features
|
||||
- algorithm preference signaling
|
||||
|
||||
(direct_key_signature)=
|
||||
|
@ -167,7 +170,7 @@ The types of metadata typically associated with the primary key through these me
|
|||
|
||||
A [*direct key signature*](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-direct-key-signature-type-i) serves as a key mechanism for storing information about the primary key and the entire certificate.
|
||||
|
||||
In OpenPGP v6, a direct key signature is the [preferred mechanism](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#section-5.2.3.10-9).
|
||||
In OpenPGP v6, a direct key signature is the [preferred mechanism](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#section-5.2.3.10-9) for storing algorithm preferences and features.
|
||||
|
||||
#### Self-signature binding to primary User ID
|
||||
|
||||
|
@ -181,8 +184,8 @@ Revocation self-signatures represent an important class of self-signatures, used
|
|||
There are several types of revocation signatures, each serving a specific purpose:
|
||||
|
||||
- A [**key revocation signature**](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-key-revocation-signature-ty) (type ID `0x20`) marks a primary key as revoked.
|
||||
- A [**subkey revocation signature**](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-subkey-revocation-signature) (type ID `0x28`) revokes a prior subkey binding signature.
|
||||
- A [**certification revocation**](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-certification-revocation-si) (type ID `0x30`) revokes a certification signature.
|
||||
- A [**subkey revocation signature**](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-subkey-revocation-signature) (type ID `0x28`) invalidates the binding of a subkey.
|
||||
- A [**certification revocation**](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-certification-revocation-si) (type ID `0x30`) invalidates the binding of a User ID or User Attribute.
|
||||
|
||||
Common scenarios for using revocations include marking certificates or individual subkeys as unusable (e.g., when the private key has been compromised or replaced) or declaring User IDs as no longer valid.
|
||||
|
||||
|
@ -192,11 +195,17 @@ OpenPGP certificates act as append-only data structures in practice. Once elemen
|
|||
Revocations are used to mark components or signatures as invalid.
|
||||
```
|
||||
|
||||
```{admonition} TODO
|
||||
:class: warning
|
||||
|
||||
Research, under what circumstances revocations revoke individual signatures, and when they instead "unbind" components.
|
||||
```
|
||||
|
||||
Note: certification signatures [can be made irrevocable](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-10.html#name-revocable).
|
||||
|
||||
#### Hard vs soft revocations
|
||||
|
||||
Revocation signatures often include a [*Reason for Revocation* subpacket](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-reason-for-revocation), with a code specifying why the revocation was issued. This code determines whether the revocation is considered *soft* or *hard*.
|
||||
Revocation signatures often include a [*Reason for Revocation* subpacket](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-reason-for-revocation), with a code specifying *why* the revocation was issued. This code determines whether the revocation is considered *soft* or *hard*.
|
||||
|
||||
- **Soft revocation**: This is typically used for graceful or planned invalidation of components, such as retiring or updating components. It invalidates the component from the revocation signature's creation time, but earlier uses remain valid. Soft revocations can be reversed with a new self-signature.
|
||||
- **Hard revocation**: This irrevocably invalidates the component, affecting all past and future uses. It is typically used to signal compromise of secret key material.
|
||||
|
@ -212,17 +221,17 @@ Third-party signatures in OpenPGP primarily encode authentication statements for
|
|||
|
||||
### Certifying identity components
|
||||
|
||||
When a signer issues a certifying signature on an identity, it indicates a verified link between the identity and the certificate. That is, the signer vouches for the connection.
|
||||
When a signer issues a certifying signature on an identity, it indicates a verified link between the identity and the certificate. That is, the signer vouches for the identity claim.
|
||||
|
||||
For example, Alice can vouch that Bob's User ID `Bob Baker <bob@example.com>` is legitimately linked with his certificate `BB28 9FB7 A68D BFA8 C384 CCCD E205 8E02 D9C6 CD2F 3C7C 56AE 7FB5 3D97 1170 BA83`, by creating a certification signature. Bob can then distribute Alice's certifying signature as part of his certificate.
|
||||
|
||||
Other users may or may not decide to rely on Alice's statement.
|
||||
Other users may or may not decide to rely on Alice's statement when questioning the authenticity of Bob's certificate.
|
||||
|
||||
### Trust signatures: delegating authentication
|
||||
|
||||
OpenPGP uses [*trust signature*](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#trust-signature-subpacket) subpackets to delegate authentication decisions, designating the recipient certificate as a "trusted introducer" (or a trust root) for the user. This includes specifying trust depth (or level) for transitive delegations and quantifying trust with numerical values, indicating the extent of reliance on the introducer's certifications.
|
||||
|
||||
Trust signature subpackets are applicable in:
|
||||
Trust signature subpackets are applicable in *third-party* signatures, more specifically:
|
||||
|
||||
- identity certification signatures (type ID `0x10` - `0x13`)
|
||||
- [direct key signatures](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-direct-key-signature-type-i) (type ID `0x1F`)
|
||||
|
@ -233,7 +242,7 @@ The "trust depth" (or level) in OpenPGP signifies the extent of transitive deleg
|
|||
|
||||
A trust depth of 1 means relying on certifications made directly by the trusted introducer. The user's OpenPGP software will accept certifications made directly by the introducer for authenticating identities.
|
||||
|
||||
However, when the trust depth is set higher, it implies a chain of delegation extending beyond the initial introducer. The user's software will recognize and accept certifications made not only by the primary introducer but also by other intermediaries whom the primary introducer designated as trusted introducers.
|
||||
However, when the trust depth is set higher, it implies a chain of delegation may extend beyond the initial introducer. The user's software will recognize and accept certifications made not only by the primary introducer but also by other intermediaries whom the primary introducer designated as trusted introducers.
|
||||
|
||||
This allows for a more extensive network of trusted certifications, enabling a broader and more interconnected Web of Trust.
|
||||
|
||||
|
@ -288,7 +297,7 @@ The OpenPGP RFC doesn't specify exactly how Web of Trust calculations are perfor
|
|||
|
||||
### Revoking third-party signatures
|
||||
|
||||
To reverse a previously issued third-party signature, the issuer can generate a [*certification revocation signature*](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-certification-revocation-si) (type ID `0x30`). The revocation must be issued by the same key that created the original signature or, in deprecated practice, by a designated Revocation Key.
|
||||
To reverse a previously issued third-party signature, the issuer can generate a [*certification revocation signature*](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-certification-revocation-si) (type ID `0x30`). The revocation must be issued by the same key that created the original signature or, in deprecated practice, by a designated [Revocation Key](https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-12.html#name-revocation-key).
|
||||
|
||||
## Advanced topics
|
||||
|
||||
|
@ -316,13 +325,13 @@ This signature should have the following structure:
|
|||
|
||||
#### Change expiration time
|
||||
|
||||
To adjust the expiration time of an OpenPGP certificate, issue a new *DirectKey* signature (type `0x1F`) with a modified Key Expiration Time subpacket. The structure of this signature is identical to the one outlined in the previous section on changing algorithm preferences.
|
||||
To adjust the expiration time of an OpenPGP certificate, a new *DirectKey* signature (type `0x1F`) with a modified Key Expiration Time subpacket must be issued. The structure of this signature is identical to the one outlined in the previous section on changing algorithm preferences.
|
||||
|
||||
Additionally, the expiration date can be altered for individual User IDs (detailed below) or separate subkeys (see {numref}`bind_subkey`).
|
||||
|
||||
#### Add User ID
|
||||
|
||||
To bind a User ID to an OpenPGP certificate, the signature should have the following structure:
|
||||
To bind a User ID to an OpenPGP certificate a certification signature (type `0x10`-`0x13`) is used which should have the following structure:
|
||||
|
||||
| Subpacket | Area | Critical | Mandatory | Notes |
|
||||
|-------------------------|--------|----------------|-------------------|-------------------------------------------------|
|
||||
|
@ -335,7 +344,15 @@ In addition to these subpackets, self-certifications for User IDs can include ot
|
|||
|
||||
#### Remove or revoke a User ID
|
||||
|
||||
Since OpenPGP certificates are often distributed by the means of key servers, new signatures on a certificate are often "merged" into existing copies of the certificate locally by the recipient. This integration process means it is practically impossible to directly remove signatures or User IDs from a certificate, as there is no way to communicate the intention of packet deletion to the recipient.
|
||||
Since OpenPGP certificates are often distributed by the means of key servers, new signatures on a certificate are often "merged" into existing copies of the certificate locally by the recipient.
|
||||
|
||||
```{admonition} TODO
|
||||
:class: warning
|
||||
|
||||
Link to the "Merging" section in chapter 4, once merged.
|
||||
```
|
||||
|
||||
This integration process means it is practically impossible to directly remove signatures or User IDs from a certificate, as there is no way to communicate the intention of packet deletion to the recipient.
|
||||
|
||||
To effectively mark a User ID as invalid, the user can publish a copy of their certificate with a *CertificationRevocation* signature (type `0x30`) attached to the invalidated User ID. This signature signals that the specified User ID is no longer valid or associated with the certificate holder.
|
||||
|
||||
|
@ -354,7 +371,7 @@ It is generally advisable to use reason code `32` for revoking User IDs.
|
|||
(binding_subkeys)=
|
||||
#### Add a subkey
|
||||
|
||||
Users may need to add a new subkey to their OpenPGP certificate, often for reasons such as upgrading to a subkey with more advanced cryptographic algorithms. The process involves creating a specific signature structure:
|
||||
As part of lifecycle management, the user may need to add a new subkey to their OpenPGP certificate, often for reasons such as upgrading to a subkey with more advanced cryptographic algorithms. The process involves creating a specific signature structure:
|
||||
|
||||
| Subpacket | Area | Critical | Mandatory | Notes |
|
||||
|-------------------------------|--------|----------------|-------------------|-----------------------------------------------------|
|
||||
|
@ -388,6 +405,12 @@ In `SubkeyRevocation` signatures, the [reason for revocation](https://www.ietf.o
|
|||
|
||||
Note that a value of `32` is not applicable in these signatures.
|
||||
|
||||
```{admonition} TODO
|
||||
:class: warning
|
||||
|
||||
Research and explain hardness in the context of subkey revocations. What does a hard subkey revocation express concretely?
|
||||
```
|
||||
|
||||
#### Revoke a certificate
|
||||
|
||||
Users may find themselves needing to revoke their entire OpenPGP certificate, rendering it unusable. This could be for various reasons, such as migrating to a new certificate or in response to a compromise of the certificate's secret key material.
|
||||
|
@ -410,7 +433,7 @@ In OpenPGP, certain subpackets are universally expected across all types of sign
|
|||
|
||||
* **Signature Creation Time**: This is a mandatory subpacket in every OpenPGP signature. It contains the timestamp of when the signature was created. For security and integrity, this subpacket must be located in the hashed area of the signature and is recommended to be marked as critical.
|
||||
|
||||
* **Issuer Fingerprint**: Essential for signature verification, this subpacket identifies the key (or subkey) used to create the signature. OpenPGP v6 signatures should include the Issuer Fingerprint subpacket, containing the 32-byte fingerprint of the key.
|
||||
* **Issuer Fingerprint**: Essential for signature verification, this subpacket identifies the key (or subkey) that was used to create the signature. OpenPGP v6 signatures should include the Issuer Fingerprint subpacket, containing the 32-byte fingerprint of the key.
|
||||
|
||||
```{note}
|
||||
The key used as the issuer in the signature might be a subkey of the certificate.
|
||||
|
@ -420,7 +443,7 @@ This subpacket can be placed in either the hashed or unhashed area due to its se
|
|||
|
||||
### Managing subpacket conflicts and duplication
|
||||
|
||||
In OpenPGP signatures, both the hashed and unhashed areas are composed of lists of subpackets. Inherently, this structure permits the duplication of the same subpacket, which could lead to conflicts. To manage these potential conflicts:
|
||||
In OpenPGP signatures, both the hashed and unhashed areas are composed of lists of subpackets. Inherently, this structure permits the duplication of the same subpacket, which could lead to conflicts. To manage these potential conflicts, the following strategies are used:
|
||||
|
||||
- **Precedence of hashed area**: Subpackets within the hashed area of a signature take precedence over those in the unhashed area. This hierarchy helps resolve conflicts when the same subpacket appears in both areas.
|
||||
|
||||
|
|
Loading…
Reference in a new issue