clean up the CRT notes
This commit is contained in:
parent
ce2081c811
commit
84838ce0c6
@ -6,3 +6,4 @@ set -e
|
||||
cd "${PWD}/_ref"
|
||||
asciidoctor -o ./KEY_GUIDE.html ./KEY_GUIDE.adoc
|
||||
git add KEY_GUIDE.html
|
||||
echo "Generated KEY_GUIDE.html"
|
||||
|
@ -635,7 +635,7 @@ pre.rouge .gs {
|
||||
<h1>OpenSSH Key Structure Guide</h1>
|
||||
<div class="details">
|
||||
<span id="author" class="author">brent saner <bts@square-r00t.net>, https://r00t2.io</span><br>
|
||||
<span id="revdate">Last updated 2025-09-01 23:58:24 -0400</span>
|
||||
<span id="revdate">Last updated 2025-09-02 00:23:41 -0400</span>
|
||||
</div>
|
||||
<div id="toc" class="toc2">
|
||||
<div id="toctitle">Table of Contents</div>
|
||||
@ -1264,7 +1264,7 @@ ftSfkGNUzTzPFbF5iEukTvKm42a7F/I/ExMVgpN/eQxJ7+m5TOgja0KC1h5fCN4L
|
||||
4.0.1.5 uint32 allocator for 4.0.1.5.0 (4 bytes)
|
||||
4.0.1.5.0 private exponent ('d')
|
||||
4.0.1.6 uint32 allocator for 4.0.1.6.0 (4 bytes)
|
||||
4.0.1.6.0 CRT (Chinese Remainder Theorem) helper value ('q^(-1) % p')
|
||||
4.0.1.6.0 CRT
|
||||
4.0.1.7 uint32 allocator for 4.0.1.7.0 (4 bytes)
|
||||
4.0.1.7.0 prime #1 ('p')
|
||||
4.0.1.8 uint32 allocator for 4.0.1.8.0 (4 bytes)
|
||||
@ -1289,9 +1289,16 @@ ftSfkGNUzTzPFbF5iEukTvKm42a7F/I/ExMVgpN/eQxJ7+m5TOgja0KC1h5fCN4L
|
||||
<p><strong>Chunk 4.0:</strong> This is technically currently unused; upstream hardcodes to 1 (left zero-padded 0x01).</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p><strong>Chunk 4.0.0.1.0, 4.0.1.4.0:</strong> This is almost always <code>65537</code> for a couple reasons. It’s the <a href="https://en.wikipedia.org/wiki/Fermat_number" target="_blank" rel="noopener">"Fermat Prime"</a> <em>F<sub>4</sub></em>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p><strong>Chunk 4.0.0.1.0, 4.0.0.2.0, 4.0.1.3.0, 4.0.1.4.0:</strong> Note that the ordering of <code>e</code>/<code>n</code> in <strong>4.0.0</strong> is changed to <code>n</code>/<code>e</code> in <strong>4.0.1</strong>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p><strong>Chunk 4.0.1.6.0:</strong> The CRT coefficient, or <a href="https://en.wikipedia.org/wiki/Chinese_remainder_theorem" target="_blank" rel="noopener">Chinese Remainder Theorem</a>, is a helper used during decryption and signing. It’s commonly referred to as <code>qnlv</code> or <em>inverse coefficient</em>.
|
||||
The value for this chunk is the result of <code>q^(-1) % p</code>.</p>
|
||||
</div>
|
||||
<div class="paragraph">
|
||||
<p><strong>Chunk 4.0.1.10:</strong> The padding used aligns the private key (<strong>4.0.1.0</strong> to <strong>4.0.1.9.0</strong>) to the cipher blocksize. For plaintext keys, a blocksize of 8 is used.</p>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -43,7 +43,7 @@ Since plaintext/unencrypted keys do not have a cipher or KDF (as there's no encr
|
||||
4.0.1.5 uint32 allocator for 4.0.1.5.0 (4 bytes)
|
||||
4.0.1.5.0 private exponent ('d')
|
||||
4.0.1.6 uint32 allocator for 4.0.1.6.0 (4 bytes)
|
||||
4.0.1.6.0 CRT (Chinese Remainder Theorem) helper value ('q^(-1) % p')
|
||||
4.0.1.6.0 CRT
|
||||
4.0.1.7 uint32 allocator for 4.0.1.7.0 (4 bytes)
|
||||
4.0.1.7.0 prime #1 ('p')
|
||||
4.0.1.8 uint32 allocator for 4.0.1.8.0 (4 bytes)
|
||||
@ -59,8 +59,13 @@ Since plaintext/unencrypted keys do not have a cipher or KDF (as there's no encr
|
||||
|
||||
*Chunk 4.0:* This is technically currently unused; upstream hardcodes to 1 (left zero-padded 0x01).
|
||||
|
||||
*Chunk 4.0.0.1.0, 4.0.1.4.0:* This is almost always `65537` for a couple reasons. It's the https://en.wikipedia.org/wiki/Fermat_number["Fermat Prime"^] __F~4~__.
|
||||
|
||||
*Chunk 4.0.0.1.0, 4.0.0.2.0, 4.0.1.3.0, 4.0.1.4.0:* Note that the ordering of `e`/`n` in *4.0.0* is changed to `n`/`e` in *4.0.1*.
|
||||
|
||||
*Chunk 4.0.1.6.0:* The CRT coefficient, or https://en.wikipedia.org/wiki/Chinese_remainder_theorem[Chinese Remainder Theorem^], is a helper used during decryption and signing. It's commonly referred to as `qnlv` or _inverse coefficient_.
|
||||
The value for this chunk is the result of `q^(-1) % p`.
|
||||
|
||||
*Chunk 4.0.1.10:* The padding used aligns the private key (*4.0.1.0* to *4.0.1.9.0*) to the cipher blocksize. For plaintext keys, a blocksize of 8 is used.
|
||||
====
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user