From 10f026df4d720e9d116537fb756ee497d5745a4c Mon Sep 17 00:00:00 2001 From: Mehrn0ush Date: Sun, 16 Aug 2026 17:15:04 +0330 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20correct=20LMOTS=20Winternitz=20param?= =?UTF-8?q?eter=20and=20add=20HSS=20variant=20Align=20LMOTS=20with=20RFC?= =?UTF-8?q?=208554=20Table=201=20(N=20and=20W,=20not=20tree=20height)=20an?= =?UTF-8?q?d=20add=20the=20HSS=20levels=20pattern=20from=20RFC=208554=20?= =?UTF-8?q?=C2=A76=20/=20NIST=20SP=20800-208.=20Signed-off-by:=20Mehrn0ush?= =?UTF-8?q?=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schema/cryptography-defs.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/schema/cryptography-defs.json b/schema/cryptography-defs.json index 5e0d20480..390809795 100644 --- a/schema/cryptography-defs.json +++ b/schema/cryptography-defs.json @@ -810,7 +810,11 @@ "primitive": "signature" }, { - "pattern": "LMOTS[_{hashfun}][_N{bytespernode}][_H{treeheight}]", + "pattern": "LMOTS[_{hashAlgorithm}][_N{bytesPerNode}][_W{winternitzParameter}]", + "primitive": "signature" + }, + { + "pattern": "HSS[_L{levels}]", "primitive": "signature" } ] From 112e5fe4805c55470770b7b8b16c6430cc7e847f Mon Sep 17 00:00:00 2001 From: Mehrn0ush Date: Sun, 27 Sep 2026 17:59:25 +0800 Subject: [PATCH 2/3] feat: document naming-pattern notation and add per-level HSS pattern Extend the algorithm naming convention with variant references () and repeated groups ((...)+) to describe ordered LMS/LMOTS pairs in HSS, and document the full notation on the pattern property, including the constructs already in use (top-level alternation, plain grouping, literal -, _, /, +). HSS pairs are ordered root level first; when both {levels} and pairs are present their number shall match; omitted parameters are unspecified and not inherited between pairs. Rename the LMOTS N placeholder to hashOutputLength (RFC 8554 n, in bytes), make the SHA256/SHAKE tokens explicit, and add RFC 9858 to the LMS family. The JSON structure is unchanged; consumers interpreting naming patterns may need to support the new notation. Signed-off-by: Mehrn0ush --- schema/cryptography-defs.json | 10 +++++++--- schema/cryptography-defs.schema.json | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/schema/cryptography-defs.json b/schema/cryptography-defs.json index 390809795..efd564595 100644 --- a/schema/cryptography-defs.json +++ b/schema/cryptography-defs.json @@ -802,19 +802,23 @@ { "name": "RFC8554", "url": "https://doi.org/10.17487/RFC8554" + }, + { + "name": "RFC9858", + "url": "https://doi.org/10.17487/RFC9858" } ], "variant": [ { - "pattern": "LMS[_{hashAlgorithm}][_M{bytesPerNode}][_H{treeHeight}]", + "pattern": "LMS[_(SHA256|SHAKE)][_M{bytesPerNode}][_H{treeHeight}]", "primitive": "signature" }, { - "pattern": "LMOTS[_{hashAlgorithm}][_N{bytesPerNode}][_W{winternitzParameter}]", + "pattern": "LMOTS[_(SHA256|SHAKE)][_N{hashOutputLength}][_W{winternitzParameter}]", "primitive": "signature" }, { - "pattern": "HSS[_L{levels}]", + "pattern": "HSS[_L{levels}][(__)+]", "primitive": "signature" } ] diff --git a/schema/cryptography-defs.schema.json b/schema/cryptography-defs.schema.json index e17815057..d83e31e4c 100644 --- a/schema/cryptography-defs.schema.json +++ b/schema/cryptography-defs.schema.json @@ -71,8 +71,8 @@ "properties": { "pattern": { "type": "string", - "title": "Standard Name", - "description": "Defines the pattern used to construct the complete algorithm name. Placeholders are defined by {} for algorithm-specific properties." + "title": "Naming Pattern", + "description": "Defines the pattern used to construct the algorithm name. Notation: `{name}` is a placeholder for an algorithm-specific property; `|` separates alternatives, of which exactly one is used, either across the whole pattern or within a parenthesized group such as `(a|b)`; `( )` groups content, and a group without `|` is plain grouping; `[ ]` marks optional content; `( )+` marks one or more repetitions of the group; `` references the variant pattern in the cryptographic algorithm definitions registry whose leading literal is `Name`, the leading literal being the initial literal token before the first notation construct (for example `LMS` in `LMS[_(SHA256|SHAKE)]...`), and stands for a name constructed from that pattern, preserving its optional parts. Braces, brackets, parentheses, angle brackets, `|`, and a `+` directly following `)` are notation and are not part of the constructed name; every other character is literal, including `-`, `_`, `/`, and a `+` elsewhere (as in `SPAKE2+`). A reference shall resolve to exactly one variant pattern and shall not be cyclic. Omitted optional parts mean that the corresponding parameters are unspecified, so a name following this notation may be a partial identification rather than a fully specified parameter configuration. For `LMS` and `LMOTS`, `{bytesPerNode}` and `{hashOutputLength}` are measured in bytes. For `HSS`, repeated `LMS`/`LMOTS` pairs are ordered from the root level downward; when both `{levels}` and the repeated pairs are present, the number of pairs shall equal `{levels}`; omission of the pairs leaves the per-level parameters unspecified, and parameters omitted from one pair are unspecified and are not inherited from another pair." }, "primitive": { "type": "string", From 463ad607417932279d87ff020d4a335e26abfcd9 Mon Sep 17 00:00:00 2001 From: Mehrn0ush Date: Fri, 9 Oct 2026 11:07:56 +0400 Subject: [PATCH 3/3] docs: shorten naming-pattern description per review Keep a construct summary in the schema (placeholders, optional content, alternation, group repetition, references, literal +, HSS ordering/count). Move the detailed grammar to the CBOM guide. Distinguish omitted parameters from omitted fixed literals such as [-PKCS7] or [E]. Signed-off-by: Mehrn0ush --- schema/cryptography-defs.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema/cryptography-defs.schema.json b/schema/cryptography-defs.schema.json index d83e31e4c..f14c687c1 100644 --- a/schema/cryptography-defs.schema.json +++ b/schema/cryptography-defs.schema.json @@ -72,7 +72,7 @@ "pattern": { "type": "string", "title": "Naming Pattern", - "description": "Defines the pattern used to construct the algorithm name. Notation: `{name}` is a placeholder for an algorithm-specific property; `|` separates alternatives, of which exactly one is used, either across the whole pattern or within a parenthesized group such as `(a|b)`; `( )` groups content, and a group without `|` is plain grouping; `[ ]` marks optional content; `( )+` marks one or more repetitions of the group; `` references the variant pattern in the cryptographic algorithm definitions registry whose leading literal is `Name`, the leading literal being the initial literal token before the first notation construct (for example `LMS` in `LMS[_(SHA256|SHAKE)]...`), and stands for a name constructed from that pattern, preserving its optional parts. Braces, brackets, parentheses, angle brackets, `|`, and a `+` directly following `)` are notation and are not part of the constructed name; every other character is literal, including `-`, `_`, `/`, and a `+` elsewhere (as in `SPAKE2+`). A reference shall resolve to exactly one variant pattern and shall not be cyclic. Omitted optional parts mean that the corresponding parameters are unspecified, so a name following this notation may be a partial identification rather than a fully specified parameter configuration. For `LMS` and `LMOTS`, `{bytesPerNode}` and `{hashOutputLength}` are measured in bytes. For `HSS`, repeated `LMS`/`LMOTS` pairs are ordered from the root level downward; when both `{levels}` and the repeated pairs are present, the number of pairs shall equal `{levels}`; omission of the pairs leaves the per-level parameters unspecified, and parameters omitted from one pair are unspecified and are not inherited from another pair." + "description": "Defines the pattern used to construct the algorithm name. `{name}` is a placeholder for an algorithm-specific value, `[ ]` marks optional content, `|` separates alternatives of which exactly one is used, across the whole pattern or within `( )`, and `( )+` repeats a group one or more times. `` stands for a name built from the variant pattern whose text before the first notation character is `Name`, for example ``. All other characters, such as `-`, `_` and the `+` in `SPAKE2+`, are part of the name. An omitted optional part means the value is unspecified, except for a fixed literal such as `[-PKCS7]` or `[E]`, whose absence selects the variant without it. For `HSS`, the `LMS`/`LMOTS` pairs are listed per level, starting at the root; when both `{levels}` and pairs are given, their numbers shall be equal." }, "primitive": { "type": "string",