Skip to content

Commit 786619a

Browse files
Updated based on feedback. Only editorial.
Signed-off-by: Fredrik Skogman <kommendorkapten@github.com>
1 parent 0acf1fd commit 786619a

1 file changed

Lines changed: 25 additions & 25 deletions

File tree

tap21.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,22 @@ specified by the version.
5353

5454
Pure ML-DSA MUST be used with an **empty context**.
5555

56+
## TUF metadata parameters:
57+
58+
* `keytype`: `ml-dsa`
59+
* `scheme`: (`ml-dsa-<parameter set>/<version>`)
60+
* `ml-dsa-44/<version>`
61+
* `ml-dsa-65/<version>`
62+
* `ml-dsa-87/<version>`
63+
* `keyval.public`: PEM encoding of DER-encoded `SubjectPublicKeyInfo`
64+
structures as defined for ML-DSA in RFC 9881
65+
* `signature.sig`: Hex-encoded signature byte string as per FIPS 204
66+
§7.2
67+
68+
> [!NOTE]
69+
> As of this publication only version 1 (`0x01`) is specified. Any
70+
> other version must be rejected during signing or verification.
71+
5672
## Rationale
5773

5874
Why not use the `scheme` to specify the hash algorithm and instead use
@@ -66,7 +82,9 @@ for possible confusion.
6682
Why not use HashML-DSA? With Ed25519 the ecosystem support has been
6783
much better for the pure version, and it's likely it will be the same
6884
for ML-DSA. Based on this an application specific protocol is better
69-
suited for wider adoption.
85+
suited for wider adoption. Pre-hash algorithms are really not needed
86+
either, and they can add more complexity, see [HashML-DSA considered
87+
harmful](https://keymaterial.net/2024/11/05/hashml-dsa-considered-harmful/).
7088

7189
## Protocol versions
7290

@@ -81,9 +99,9 @@ information into the `scheme` parameter.
8199
* Version byte: `0x01`
82100
* Hash algorithm: SHA-512
83101
* Implementations MUST support
84-
* `ML-DSA-44`
85-
* `ML-DSA-65`
86-
* `ML-DSA-87`
102+
* `ML-DSA-44` (`scheme: ml-dsa-44/1`)
103+
* `ML-DSA-65` (`scheme: ml-dsa-65/1`)
104+
* `ML-DSA-87` (`scheme: ml-dsa-87/1`)
87105
* Metadata canonicalization scheme: encoded as "canonical JSON" as described
88106
in the [TUF
89107
Specification](https://theupdateframework.github.io/specification/v1.0.34/index.html#metaformat).
@@ -107,7 +125,9 @@ information into the `scheme` parameter.
107125
3. Parse `scheme` into parameter set and version
108126
* Reject if the protocol version is not supported
109127
* Implementations MUST NOT infer or select an ML-DSA
110-
parameter set or version from the signature bytes alone
128+
parameter set or version from the signature bytes alone --
129+
underlying crypto implementations should reject mismatched
130+
signature/public key combinations
111131
4. Verifier must reconstruct the exact signed bytes itself
112132
* It should not accept a caller-supplied digest/prefix blindly
113133
* The `version` MUST be taken from the trusted TUF metadata's
@@ -121,18 +141,6 @@ information into the `scheme` parameter.
121141
* Do not try multiple interpretations
122142
* Do not accept the same signature under HashML-DSA or another scheme
123143
124-
## TUF metadata parameters:
125-
126-
* `keytype`: `ml-dsa`
127-
* `scheme`: (`ml-dsa-<parameter set>/<version>`)
128-
* `ml-dsa-44/1`
129-
* `ml-dsa-65/1`
130-
* `ml-dsa-87/1`
131-
* `keyval.public`: PEM encoding of DER-encoded `SubjectPublicKeyInfo`
132-
structures as defined for ML-DSA in RFC 9881
133-
* `signature.sig`: Hex-encoded signature byte string as per FIPS 204
134-
§7.2
135-
136144
# Security considerations
137145
138146
1. SHA-512 length extension: Not a concern. The signature is made over `domain
@@ -147,14 +155,6 @@ information into the `scheme` parameter.
147155
148156
# Appendix
149157
150-
## ML-DSA parameter sets
151-
152-
This is an excerpt only, see FIPS-204 §4 for a complete parameter set.
153-
154-
| Parameter | ML-DSA-44 | ML-DSA-65 | ML-DSA-87 |
155-
|-----------|-----------|-----------|-----------|
156-
| 𝜆 | 128 | 192 | 256 |
157-
158158
## Notes on application level hashing
159159
160160
From FIPS 204 on application level hashing (§5.4):

0 commit comments

Comments
 (0)