Skip to content

Commit 1739752

Browse files
committed
Add types for most artwork/sourcecode blocks
xml2rfc v3 distinguishes between <artwork> and <sourcecode> now. It seems kramdown-rfc handles it by treating untyped blocks as <artwork>, and almost all types as <sourcecode>, except for the handful of ones set for artwork. https://www.rfc-editor.org/rpc/wiki/doku.php?id=sourcecode-types has some "recommended" values for <sourcecode> types, so I've filled tehm in. The only non-obvious case was the example X.500 name. I've left that alone. This seems to have no effect on the rendering, just the resulting XML.
1 parent 66079af commit 1739752

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

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

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -348,14 +348,14 @@ A subtree `[start, end)` can be efficiently proven to be consistent with the ful
348348

349349
The subtree consistency proof, `SUBTREE_PROOF(start, end, D_n)` is defined similarly to {{Section 2.1.4.1 of !RFC9162}}, in terms of a helper function that tracks whether the subtree hash is known:
350350

351-
~~~
351+
~~~pseudocode
352352
SUBTREE_PROOF(start, end, D_n) =
353353
SUBTREE_SUBPROOF(start, end, D_n, true)
354354
~~~
355355

356356
If `start = 0` and `end = n`, the subtree is the root:
357357

358-
~~~
358+
~~~pseudocode
359359
SUBTREE_SUBPROOF(0, n, D_n, true) = {}
360360
SUBTREE_SUBPROOF(0, n, D_n, false) = {MTH(D_n)}
361361
~~~
@@ -364,34 +364,34 @@ Otherwise, `n > 1`. Let `k` be the largest power of two smaller than `n`. The co
364364

365365
* If `end <= k`, the subtree is on the left of `k`. The proof proves consistency with the left child and includes the right child:
366366

367-
~~~
367+
~~~pseudocode
368368
SUBTREE_SUBPROOF(start, end, D_n, b) =
369369
SUBTREE_SUBPROOF(start, end, D[0:k], b) : MTH(D[k:n])
370370
~~~
371371

372372
* If `k <= start`, the subtree is on the right of `k`. The proof proves consistency with the right child and includes the left child.
373373

374-
~~~
374+
~~~pseudocode
375375
SUBTREE_SUBPROOF(start, end, D_n, b) =
376376
SUBTREE_SUBPROOF(start - k, end - k, D[k:n], b) : MTH(D[0:k])
377377
~~~
378378

379379
* Otherwise, `start < k < end`, which implies `start = 0`. The proof proves consistency with the right child and includes the left child.
380380

381-
~~~
381+
~~~pseudocode
382382
SUBTREE_SUBPROOF(0, end, D_n, b) =
383383
SUBTREE_SUBPROOF(0, end - k, D[k:n], false) : MTH(D[0:k])
384384
~~~
385385

386386
When `start` is zero, this computes a Merkle consistency proof:
387387

388-
~~~
388+
~~~pseudocode
389389
SUBTREE_PROOF(0, end, D_n) = PROOF(end, D_n)
390390
~~~
391391

392392
When `end = start + 1`, this computes a Merkle inclusion proof:
393393

394-
~~~
394+
~~~pseudocode
395395
SUBTREE_PROOF(start, start + 1, D_n) = PATH(start, D_n)
396396
~~~
397397

@@ -432,7 +432,7 @@ Given a Merkle Tree over `n` elements, a subtree defined by `[start, end)`, a co
432432

433433
Not all `[start, end)` intervals of a Merkle tree are valid subtrees. This section describes how, for any `start < end`, to determine up to two subtrees that efficiently cover the interval. The subtrees are determined by the following Python procedure:
434434

435-
~~~py
435+
~~~python
436436
def find_subtrees(start, end):
437437
""" Returns a list of one or two subtrees that efficiently
438438
cover [start, end). """
@@ -541,7 +541,7 @@ Each issuance log is identified by a *log ID*, which is a trust anchor ID {{!I-D
541541

542542
An issuance log's log ID determines an X.509 distinguished name ({{Section 4.1.2.4 of !RFC5280}}). The distinguished name has a single relative distinguished name, which has a single attribute. The attribute has type `id-rdna-trustAnchorID`, defined below:
543543

544-
~~~
544+
~~~asn.1
545545
id-rdna-trustAnchorID OBJECT IDENTIFIER ::= {
546546
iso(1) identified-organization(3) dod(6) internet(1) security(5)
547547
mechanisms(5) pkix(7) rdna(TBD1) TBD2}
@@ -561,7 +561,7 @@ For initial experimentation, early implementations of this design will use the O
561561

562562
Each entry in the log is a MerkleTreeCertEntry, defined with the TLS presentation syntax below. A MerkleTreeCertEntry describes certificate information that the CA has validated and certified.
563563

564-
~~~
564+
~~~tls-presentation
565565
struct {} Empty;
566566

567567
enum {
@@ -582,7 +582,7 @@ When `type` is `tbs_cert_entry`, `N` is the number of bytes needed to consume th
582582

583583
`tbs_cert_entry_data` contains the DER {{X.690}} encoding of a TBSCertificateLogEntry, defined below:
584584

585-
~~~
585+
~~~asn.1
586586
TBSCertificateLogEntry ::= SEQUENCE {
587587
version [0] EXPLICIT Version DEFAULT v1,
588588
issuer Name,
@@ -614,7 +614,7 @@ A single cosigner, with a single cosigner ID and public key, MAY generate cosign
614614

615615
A cosigner computes a cosignature for a subtree in some log by signing a MTCSubtreeSignatureInput, defined below using the TLS presentation language ({{Section 3 of !RFC8446}}):
616616

617-
~~~
617+
~~~tls-presentation
618618
opaque HashValue[HASH_SIZE];
619619

620620
/* From Section 4.1 of draft-ietf-tls-trust-anchor-ids */
@@ -784,7 +784,7 @@ The TBSCertificate's `subjectPublicKeyInfo` contains the specified public key. I
784784

785785
The TBSCertificate's `signature` and the Certificate's `signatureAlgorithm` MUST contain an AlgorithmIdentifier whose `algorithm` is id-alg-mtcProof, defined below, and whose `parameters` is omitted.
786786

787-
~~~
787+
~~~asn.1
788788
id-alg-mtcProof OBJECT IDENTIFIER ::= {
789789
iso(1) identified-organization(3) dod(6) internet(1) security(5)
790790
mechanisms(5) pkix(7) algorithms(6) TBD}
@@ -794,7 +794,7 @@ For initial experimentation, early implementations of this design will use the O
794794

795795
The `signatureValue` contains an MTCProof structure, defined below using the TLS presentation language ({{Section 3 of !RFC8446}}):
796796

797-
~~~
797+
~~~tls-presentation
798798
opaque HashValue[HASH_SIZE];
799799

800800
struct {
@@ -1221,7 +1221,7 @@ IANA is requested to add the following entry to the "SMI Security for PKIX Relat
12211221

12221222
# ASN.1 Module
12231223

1224-
~~~
1224+
~~~asn.1
12251225
MerkleTreeCertificates
12261226
{ iso(1) identified-organization(3) dod(6) internet(1)
12271227
security(5) mechanisms(5) pkix(7) id-mod(0)
@@ -1294,13 +1294,13 @@ The note body is a sequence of the following lines, each terminated by a newline
12941294

12951295
Each note signature has a key name of the cosigner name. The signature's key ID is computed using the reserved signature type in {{SIGNED-NOTE}}, and a fixed string, as follows:
12961296

1297-
~~~
1297+
~~~pseudocode
12981298
key ID = SHA-256(key name || 0x0A || 0xFF || "mtc-subtree/v1")[:4]
12991299
~~~
13001300

13011301
A subtree whose `start` is zero can also be represented as a checkpoint {{TLOG-CHECKPOINT}}. A corresponding subtree signature can be represented as a note signature using a key ID computed as follows:
13021302

1303-
~~~
1303+
~~~pseudocode
13041304
key ID = SHA-256(key name || 0x0A || 0xFF || "mtc-checkpoint/v1")[:4]
13051305
~~~
13061306

0 commit comments

Comments
 (0)