You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pid="section-5.3-3">When <code>type</code> is <code>tbs_cert_entry</code>, <code>N</code> is the number of bytes needed to consume the rest of the input. A MerkleTreeCertEntry is expected to be decoded in contexts where the total length of the entry is known.<ahref="#section-5.3-3" class="pilcrow">¶</a></p>
3743
-
<pid="section-5.3-4"><code>tbs_cert_entry_data</code> contains the DER <span>[<ahref="#X.690" class="cite xref">X.690</a>]</span> encoding of a TBSCertificateLogEntry, defined below:<ahref="#section-5.3-4" class="pilcrow">¶</a></p>
3743
+
<pid="section-5.3-4"><code>tbs_cert_entry_data</code> contains the contents octets (i.e. excluding the initial identifier and length octets) of the DER <span>[<ahref="#X.690" class="cite xref">X.690</a>]</span> encoding of a TBSCertificateLogEntry, defined below. Equivalently, <code>tbs_cert_entry_data</code> contains the DER encodings of each field of the TBSCertificateLogEntry, concatenated. This construction allows a single-pass implementation in <ahref="#verifying-certificate-signatures" class="auto internal xref">Section 7.2</a>.<ahref="#section-5.3-4" class="pilcrow">¶</a></p>
<pid="section-7.2-3">This procedure only replaces the signature verification portion of X.509 path validation. The relying party MUST continue to perform other checks, such as checking expiry.<ahref="#section-7.2-3" class="pilcrow">¶</a></p>
4510
+
<pid="section-7.2-4">In this procedure, <code>entry_hash</code> can equivalently be computed in a single pass from the DER-encoded TBSCertificate, without storing the full TBSCertificateLogEntry or MerkleTreeCertEntry in memory:<ahref="#section-7.2-4" class="pilcrow">¶</a></p>
<pid="section-7.2-5.1.1">Initialize a hash instance.<ahref="#section-7.2-5.1.1" class="pilcrow">¶</a></p>
4514
+
</li>
4515
+
<liid="section-7.2-5.2">
4516
+
<pid="section-7.2-5.2.1">Write the big-endian, two-byte <code>tbs_cert_entry</code> value to the hash.<ahref="#section-7.2-5.2.1" class="pilcrow">¶</a></p>
4517
+
</li>
4518
+
<liid="section-7.2-5.3">
4519
+
<pid="section-7.2-5.3.1">Write the TBSCertificate contents octets to the hash, up to the <code>subjectPublicKeyInfo</code> field.<ahref="#section-7.2-5.3.1" class="pilcrow">¶</a></p>
4520
+
</li>
4521
+
<liid="section-7.2-5.4">
4522
+
<pid="section-7.2-5.4.1">Write the octet 0x04 to the hash. This is an OCTET STRING identifer.<ahref="#section-7.2-5.4.1" class="pilcrow">¶</a></p>
4523
+
</li>
4524
+
<liid="section-7.2-5.5">
4525
+
<pid="section-7.2-5.5.1">Write the octet L to the hash, where L is the hash length. (This assumes L is at most 127.)<ahref="#section-7.2-5.5.1" class="pilcrow">¶</a></p>
4526
+
</li>
4527
+
<liid="section-7.2-5.6">
4528
+
<pid="section-7.2-5.6.1">Write H to the hash, where H is the hash of the <code>subjectPublicKeyInfo</code> field.<ahref="#section-7.2-5.6.1" class="pilcrow">¶</a></p>
4529
+
</li>
4530
+
<liid="section-7.2-5.7">
4531
+
<pid="section-7.2-5.7.1">Write the remainder of the TBSCertificate contents octets to the hash, starting just after the <code>subjectPublicKeyInfo</code> field.<ahref="#section-7.2-5.7.1" class="pilcrow">¶</a></p>
4532
+
</li>
4533
+
<liid="section-7.2-5.8">
4534
+
<pid="section-7.2-5.8.1">Finalize the hash and set <code>entry_hash</code> to the result.<ahref="#section-7.2-5.8.1" class="pilcrow">¶</a></p>
4535
+
</li>
4536
+
</ol>
4537
+
<pid="section-7.2-6">This is possible because the structure in <ahref="#log-entries" class="auto internal xref">Section 5.3</a> omits the TBSCertificateLogEntry's identifier and length octets.<ahref="#section-7.2-6" class="pilcrow">¶</a></p>
Copy file name to clipboardExpand all lines: index.html
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ <h2>Preview for branch <a href="russ-feedback">russ-feedback</a></h2>
45
45
<tr>
46
46
<td><ahref="russ-feedback/draft-davidben-tls-merkle-tree-certs.html" class="html draft-davidben-tls-merkle-tree-certs" title="Merkle Tree Certificates (HTML)">Merkle Tree Certificates</a></td>
47
47
<td><ahref="russ-feedback/draft-davidben-tls-merkle-tree-certs.txt" class="txt draft-davidben-tls-merkle-tree-certs" title="Merkle Tree Certificates (Text)">plain text</a></td>
48
-
<td>same as main</td>
48
+
<td><ahref="https://author-tools.ietf.org/api/iddiff?url_1=https://davidben.github.io/merkle-tree-certs/draft-davidben-tls-merkle-tree-certs.txt&url_2=https://davidben.github.io/merkle-tree-certs/russ-feedback/draft-davidben-tls-merkle-tree-certs.txt" class="diff draft-davidben-tls-merkle-tree-certs">diff with main</a></td>
49
49
</tr>
50
50
</table>
51
51
<h2>Preview for branch <ahref="bas">bas</a></h2>
@@ -62,7 +62,7 @@ <h2>Preview for branch <a href="single-pass">single-pass</a></h2>
62
62
<tr>
63
63
<td><ahref="single-pass/draft-davidben-tls-merkle-tree-certs.html" class="html draft-davidben-tls-merkle-tree-certs" title="Merkle Tree Certificates (HTML)">Merkle Tree Certificates</a></td>
64
64
<td><ahref="single-pass/draft-davidben-tls-merkle-tree-certs.txt" class="txt draft-davidben-tls-merkle-tree-certs" title="Merkle Tree Certificates (Text)">plain text</a></td>
65
-
<td><ahref="https://author-tools.ietf.org/api/iddiff?url_1=https://davidben.github.io/merkle-tree-certs/draft-davidben-tls-merkle-tree-certs.txt&url_2=https://davidben.github.io/merkle-tree-certs/single-pass/draft-davidben-tls-merkle-tree-certs.txt" class="diff draft-davidben-tls-merkle-tree-certs">diff with main</a></td>
65
+
<td>same as main</td>
66
66
</tr>
67
67
</table>
68
68
<h2>Preview for branch <ahref="demo">demo</a></h2>
0 commit comments