Skip to content

Commit 1a9b5f9

Browse files
committed
Restore the more efficient trust anchor negotiation
When trust_anchors was extracted from the first MTC drafts, we lost an optimization because it was not, at the time, relevant for the baseline version of the problem. However, it is still quite useful for MTCs (and may be useful for other scenarios too). This implements tlswg/tls-trust-anchor-ids#62 to put it back. For now, it's in the MTC repo, but in the long run, we should put it back in TAI itself.
1 parent ec6bdf9 commit 1a9b5f9

1 file changed

Lines changed: 68 additions & 6 deletions

File tree

draft-davidben-tls-merkle-tree-certs.md

Lines changed: 68 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1352,19 +1352,72 @@ When a CA is found to be untrustworthy, relying parties SHOULD remove trust in t
13521352

13531353
# Use in TLS
13541354

1355-
TLS implementations that authenticate with or accept Merkle Tree certificates SHOULD support trust anchor IDs ({{!I-D.ietf-tls-trust-anchor-ids}}) for certificate selection.
1355+
Most X.509 fields such as subjectPublicKeyInfo and X.509 extensions such as subjectAltName are unmodified in Merkle Tree certificates. They apply to TLS-based applications as in a traditional X.509 certificate. The primary new considerations for use in TLS are:
13561356

1357-
A full certificate has a trust anchor ID of the corresponding log ID ({{log-ids}}). The authenticating party can obtain this information either by parsing the certificate's issuer field or via out-of-band information as described in {{Section 3.2 of !I-D.ietf-tls-trust-anchor-ids}}.
1357+
* Whether the authenticating party should send a certificate from one Merkle Tree CA, another Merkle Tree CA, or a traditional X.509 CA
1358+
* Whether the authenticating party should send a full or signatureless certificate
1359+
* What the relying party should communicate to the authenticating party to help it make this decision
1360+
1361+
Certificate selection in TLS, described in {{Section 4.4.2.2 and Section 4.4.2.3 of !RFC8446}}, incorporates both explicit relying-party-provided information in the ClientHello and CertificateRequest messages and implicit deployment-specific assumptions. This section describes a RECOMMENDED integration of Merkle Tree certificates into TLS trust anchor IDs ({{!I-D.ietf-tls-trust-anchor-ids}}), but applications MAY use application-specific criteria in addition to, or instead of, this recommendation.
1362+
1363+
## Extensions to Trust Anchor IDs
1364+
1365+
[[TODO: Move this into draft-ietf-tls-trust-anchor-ids once the PLANTS WG is further along. See https://github.com/tlswg/tls-trust-anchor-ids/issues/62]]
1366+
1367+
A TLS deployment may know that all relying parties that accept one trust anchor must additionally accept another trust anchor, or desire identifiers for groups of related trust anchors. For example, in this document, any relying party which recognizes some landmark is known to additionally accept earlier landmarks, up to the `max_landmarks` parameter.
1368+
1369+
Incorporating this knowledge into certificate selection can optimize the ClientHello or CertificateRequest extension. It is RECOMMENDED that this information be provisioned alongside the certificate, e.g. provided by the CA. This section extends the CertificatePropertyList structure ({{Section 6 of !I-D.ietf-tls-trust-anchor-ids}}) with the `additional_trust_anchor_ranges` certificate property to do this:
1370+
1371+
~~~ tls-presentation
1372+
enum {
1373+
additional_trust_anchor_ranges(1), (2^16-1)
1374+
} CertificatePropertyType;
1375+
1376+
struct {
1377+
TrustAnchorID base;
1378+
uint64 min;
1379+
uint64 max;
1380+
} TrustAnchorRange;
1381+
1382+
TrustAnchorRange TrustAnchorRangeList<1..2^16-1>;
1383+
~~~
1384+
1385+
A trust anchor range `r` is said to *contain* a trust anchor ID `id`, if `id`, as a relative OID, is the concatenation of `r.base` and some integer component between `min` and `max`. The following procedure succeeds if `r` contains `id` and fails otherwise:
1386+
1387+
1. Check that the most-significant bit of the last byte of `r.base` is unset. If it is set, fail the procedure.
1388+
2. Check that `r.base` is a prefix of `id`. If not, fail the procedure. Let `rest` be `id` with the prefix removed.
1389+
3. Decode `rest` as a minimally-encoded, big-endian, base-128 OID component as follows:
1390+
1. If `rest` is empty, fail the procedure.
1391+
2. If the most-significant bit of the last byte of `rest` is set, fail the procedure.
1392+
3. If the most-significant bit of any other byte of `rest` is unset, fail the procedure.
1393+
4. If the first byte of `rest` is 0x80, fail the procedure.
1394+
5. Set `v` to zero. Throughout this procedure, `v` will be less than 2<sup>64</sup>.
1395+
6. For each byte `b` of `rest`:
1396+
1. Unset the most significant bit of `b`. `b` is now at most 127.
1397+
2. If `v` is greater than or equal to 2<sup>57</sup>, fail the procedure.
1398+
3. Set `v` to `(v << 7) + b`.
1399+
4. Check if `min <= v <= max`. If this is not true, fail the procedure. Otherwise, the procedure succeeds.
1400+
1401+
{{Section 4.2 of !I-D.ietf-tls-trust-anchor-ids}} is updated as follows. If the ClientHello or CertificateRequest contains a `trust_anchors extension`, the authenticating party SHOULD send a certification path such that one of the following is true:
1402+
1403+
* The certification path's trust anchor ID appears in the relying party's `trust_anchors` extension
1404+
* One of the certification path's additional trust anchor ranges contains some ID in the relying party's `trust_anchors` extension
1405+
1406+
In applications that use additional trust anchor ranges, relying parties MAY send a single trust anchor ID to represent all certificates whose trust anchor ranges contain that trust anchor ID.
1407+
1408+
## Using Trust Anchor IDs
1409+
1410+
A full certificate will generally be accepted by relying parties that trust the issuing CA. To determine this, a full certificate has a trust anchor ID of the corresponding log ID ({{log-ids}}). The authenticating party can obtain this information either by parsing the certificate's issuer field or via out-of-band information as described in {{Section 3.2 of !I-D.ietf-tls-trust-anchor-ids}}. Authenticating and relying parties SHOULD use the `trust_anchors` extension to determine whether the full certificate would be acceptable.
13581411

13591412
[[TODO: Ideally we would negotiate cosigners. https://github.com/tlswg/tls-trust-anchor-ids/issues/54 has a sketch of how one might do this, though other designs are possible. Negotiating cosigners allows the ecosystem to manage cosigners efficiently, without needing to collect every possible cosignature and send them all at once. This is wasteful, particularly with post-quantum algorithms.]]
13601413

1361-
A full certificate MAY be used without signals about what the relying party trusts. As with other choices of default certificates, an authenticating party that does so assumes that the relying party trusts the issuing CA, e.g. because the CA is relatively ubiquitous among the relying parties that it supports.
1414+
A full certificate MAY also be sent without explicit relying party trust signals, however doing so means the authenticating party implicitly assumes the relying party trusts the issuing CA. This may be viable if, for example, the CA is relatively ubiquitous among supported relying parties.
13621415

1363-
A signatureless certificate has a trust anchor ID of the corresponding landmark, as described in {{landmarks}}. This can be configured in the authenticating party via out-of-band information, as described in {{Section 3.2 of !I-D.ietf-tls-trust-anchor-ids}}. A relying party that has been configured with trusted subtrees ({{trusted-subtrees}}) derived from a set of landmarks SHOULD be configured to support those landmarks' trust anchor IDs. TLS certificate selection will then correctly determine whether the signatureless certificate is compatible with the relying party.
1416+
A signatureless certificate, defined against landmark number `L`, has a trust anchor ID of `base_id`, concatenated with `L`, as described in {{landmarks}}, and SHOULD be provisioned with this value. Additionally, relying parties that trust later landmarks may also be assumed to trust landmark `L`, so a signatureless certificate SHOULD additionally provisioned with an additional trust anchor range whose `base` is `base_id`, `min` is `L + 1`, and `max` is `L + max_landmarks - 1`.
13641417

1365-
[[TODO: We can do slightly better. If the relying party supports landmark 42, it can be assumed to also support landmark 41, 40, 39, etc. https://github.com/tlswg/tls-trust-anchor-ids/issues/62 discusses how to fit this into the trust anchor IDs framework. This allows the client to summarize its state with one ID per CA.]]
1418+
A relying party that has been configured with trusted subtrees ({{trusted-subtrees}}) derived from a set of landmarks SHOULD configure the `trust_anchors` extension to advertise the highest supported landmark in the set. The selection procedures defined in {{!I-D.ietf-tls-trust-anchor-ids}} and {{!extensions-to-trust-anchor-ids}} will then correctly determine whether a signatureless certificate is compatible with the relying party.
13661419

1367-
Authenticating parties SHOULD preferentially use signatureless certificates over full certificates, when both are supported by the relying party. A signatureless certificate asserts the same information as its full counterpart, but is expected to be smaller. A signatureless certificate SHOULD NOT be used without a signal that the relying party trusts the corresponding landmark subtree. Even if the relying party is assumed to trust the issuing CA, the relying party may not have sufficiently up-to-date trusted subtrees predistributed.
1420+
When both a signatureless and full certificate are supported by a relying party, an authenticating party SHOULD preferentially use the signatureless certificate. A signatureless certificate asserts the same information as its full counterpart, but is expected to be smaller. An authenticating party SHOULD NOT send a signatureless certificate without a signal that the relying party trusts the corresponding landmark subtree. Even if the relying party is assumed to trust the issuing CA, the relying party may not have sufficiently up-to-date trusted subtrees.
13681421

13691422
# ACME Extensions
13701423

@@ -2021,3 +2074,12 @@ In draft-04, there is no fast issuance mode. In draft-05, frequent, non-landmark
20212074
- Improve subtree consistency proof verification algorithm
20222075

20232076
- Add an appendix that explains the Merkle Tree proof procedures
2077+
2078+
## Since draft-davidben-tls-merkle-tree-certs-08
2079+
{:numbered="false"}
2080+
2081+
- Improvements to malleability discussion
2082+
2083+
- Improvements to subtree definition
2084+
2085+
- Improvements to `trust_anchors` integration

0 commit comments

Comments
 (0)