[CBOM] nistQuantumSecurityLevel cannot express "not evaluated", and carries no basis
Hi CycloneDX team,
We generate CBOMs for a stack that mixes NIST PQC (ML-KEM, ML-DSA, SLH-DSA) with Chinese commercial algorithms (SM2, SM3, SM4). Two limitations in cryptoProperties.algorithmProperties force us to work around the standard, and both are about what a security level means rather than about missing values.
I checked the definition in both schema/bom-1.7.schema.json and schema/2.0/modules/cyclonedx-cryptography-2.0.schema.json on 2.0-dev; the two are identical:
"classicalSecurityLevel": {
"type": "integer",
"description": "The classical security level that a cryptographic algorithm provides (in bits).",
"minimum": 0
},
"nistQuantumSecurityLevel": {
"type": "integer",
"description": "The NIST security strength category as defined in <csrc.nist.gov URL>. A value of 0 indicates that none of the categories are met.",
"minimum": 0, "maximum": 6
}
classicalSecurityLevel is unambiguous — "in bits" is right there — so we are not asking for anything there.
1. There is no way to say "not evaluated"
nistQuantumSecurityLevel: 0 means "none of the categories are met". That covers "assessed, does not reach category 1". It does not cover "nobody has assessed this yet", and there is no third value to express that. A consumer therefore cannot distinguish an unevaluated algorithm from a deliberately non-quantum-resistant one.
This is not hypothetical. In #1126 the field is used exactly as a vulnerability signal — algorithms with nistQuantumSecurityLevel: 0 are those whose data is at risk. That reading is reasonable given the definition, but the same 0 is what you get when the assessment has simply not happened, so any downstream computation over that field inherits the ambiguity.
What we do today: we omit the field entirely and emit fibemate:nistQuantumSecurityLevel = "notEvaluated" as a component property. In our current CBOM that is 9 of 9 cryptographic components, and 0 uses of the standard field. Any consumer reading only standard fields sees nothing at all — which is the worst of both outcomes: the information exists but is invisible to the standard.
The reason is not laziness. Our scan is file-level and records algorithm families, not parameter sets, so emitting any integer from 0–6 would require inventing a category for something we did not evaluate. Omitting is the honest answer; the schema just has no way to say that.
2. There is no way to state the basis of a level
The field name binds the value to NIST's category ladder. A non-NIST scheme whose strength is argued under a different framework — national scheme evaluation, a published reduction, a bits-based estimate — has two bad choices: leave the field out, or put a NIST category number on something that was not evaluated as one. The second is silent misinformation.
Adding a generic "quantum security level" field would have the same problem in reverse (the number means nothing without its scale), so a basis indicator seems more useful than a third number.
Proposal, smallest first
a. Documentation change (no schema change). State explicitly that omission of nistQuantumSecurityLevel means "not evaluated", and that 0 means "evaluated, no category met". That alone removes the ambiguity for consumers, and it gives implementers a sanctioned way to represent the missing case instead of a private property.
b. Optional schema extension, if non-NIST schemes are in scope for 2.0. For example a basis indicator alongside the level (nist-category / bits / other plus a reference URI), or allowing the level to be an object { value, basis }. We would rather keep 2.0 small, so this only matters if non-NIST schemes are meant to be representable.
Offer
We can contribute deterministic CBOMs for the PQC + SM mix above as fixtures — they are generated reproducibly (SOURCE_DATE_EPOCH, fixed serialNumber) and validated against the official 1.6 schema in CI, so they would exercise the nine-component case rather than a hand-written snippet. Say the word and we will open a PR against whatever fixtures location the working group prefers.
Thanks for the spec work — the crypto module is the reason we can emit a CBOM at all instead of a spreadsheet.
Thanks @Lennonhaha, your fibemate:nistQuantumSecurityLevel property shows the need to distinguish a category assertion from assessment status.
as a contributor, I suggest starting with a description-only clarification. The field definitions I checked in 1.7 and 2.0-dev are identical:
- The property is optional and defines no
default, so omission is not an implicit0. Omission makes no NIST-category assertion and does not establish whether an assessment occurred. 0means that none of the referenced categories are met. Under the existing definition, it does not represent unknown or unevaluated results.- Consumers should not interpret omission as
0, and should not treat it as evidence of quantum safety.
The schemas and the tested Python serializer already distinguish an explicit zero from omission:
- The 1.7 and 2.0-dev schemas accept an explicit
0, and the official 1.7 fixtures include"nistQuantumSecurityLevel": 0. - In the tested 1.7 JSON serialization,
cyclonedx-python-lib11.12.0 preserves an explicit0and omits the field when it is supplied asNone(reproduction below).
I would avoid defining omission specifically as "not evaluated." Doing so would give an absent field a meaning in 2.0 that published 1.x documents do not share. Producers also omit for different reasons. Trivy's experimental CBOM output, for example, leaves out a level it cannot estimate (docs, discussion #11409). That fits "no assertion," but it doesn't say whether an assessment was attempted.
The existing parameterSetIdentifier can help identify a parameter set for which an authoritative category mapping exists. However, its presence alone does not establish that mapping, and a family-only observation may provide insufficient information. Omitting the category is appropriate when the producer cannot support an assertion.
This matters for the consumer scenario in #1126 (closed), which treats 0 as "data at risk." A query selecting only category 0 excludes components without an asserted category. Consumers should report these omissions separately as unresolved category coverage, rather than presenting the category-zero subset as a complete inventory of potential risk.
Explicit assessment status is a separate question. Would your consumer, for example, route "not evaluated" to an assessment task and "evaluated but indeterminate" to further investigation? That would help scope a standardized representation.
I would retain this field's NIST-specific meaning and consider supporting assessment evidence separately from claims on another security scale.
Your offered fixtures would be useful for family-only observations with the category omitted. They don't need invented category values. For 2.0 they could go under tools/src/test/resources/2.0 on 2.0-dev, subject to maintainer preference.
Python reproduction (cyclonedx-python-lib 11.12.0)
python3 -m venv /tmp/cdxenv && . /tmp/cdxenv/bin/activate
pip install -q cyclonedx-python-lib==11.12.0
python - <<'EOF'
import json
from cyclonedx.model.bom import Bom
from cyclonedx.model.component import Component, ComponentType
from cyclonedx.model.crypto import (CryptoProperties, CryptoAssetType,
AlgorithmProperties, CryptoPrimitive)
from cyclonedx.output import make_outputter
from cyclonedx.schema import OutputFormat, SchemaVersion
for lvl in (0, None):
ap = AlgorithmProperties(primitive=CryptoPrimitive.PKE, nist_quantum_security_level=lvl)
c = Component(name="rsa", type=ComponentType.CRYPTOGRAPHIC_ASSET,
crypto_properties=CryptoProperties(asset_type=CryptoAssetType.ALGORITHM, algorithm_properties=ap))
b = Bom(); b.components.add(c)
out = make_outputter(b, OutputFormat.JSON, SchemaVersion.V1_7).output_as_string()
document = json.loads(out)
properties = document["components"][0]["cryptoProperties"]["algorithmProperties"]
print(lvl, repr(properties.get("nistQuantumSecurityLevel", "<absent>")))
EOF
Output:
0 0
None '<absent>'
Thanks @Mehrn0ush — this framing is sharper than the one in my issue, and I'll take the correction.
You're right that "omission = not evaluated" was the wrong mapping. An absent field asserts nothing — neither a category nor whether an assessment happened — while 0 is an assertion that none of the categories are met. I should not overload omission with assessment status, and I withdraw that part of the proposal.
To answer your question about consumer routing, we do treat the three states differently:
- Asserted
1–5→ feeds the PQC migration priority queue. - Asserted
0→ a real finding ("not quantum-safe"), actionable for broken or pre-quantum algorithms. - Absent → counted separately as unresolved category coverage, never folded into the category-zero subset. But today we cannot distinguish "nobody assessed this yet" (should be queued for assessment) from "assessed, and NIST categories are the wrong scale for it" — the latter is what our SM2 / GM/T stack actually produces.
So the scope I would ask for is narrower than my original proposal:
- Description-only clarification that omission asserts nothing and must not be read as
0; consumers should report absent values as unresolved coverage rather than merging them into the category-zero subset. - If assessment status is ever standardised, keep it as a separate, scale-agnostic field (assessment performed: yes/no; scale: NIST | other) rather than reinterpreting
nistQuantumSecurityLevel. That keeps this field NIST-specific, as you suggest, and gives non-NIST algorithms somewhere to land instead of namespaced properties.
On the fixtures — good catch on "no invented category values". Our explicit-zero component was carrying 0 on ML-KEM-768, whose real category is 3. That is exactly what should not ship as an example, so it now uses a genuine 0 case (MD5, which meets none of the categories) and the README no longer claims that omission means "not evaluated": https://github.com/Lennonhaha/fibemate-tools/pull/90
The two documents (1.6.2 and 1.7.2) are in the repo and were ajv-validated against the official schemas at those tags: https://github.com/Lennonhaha/fibemate-tools/tree/main/cbom-tools/examples
Happy to add the 2.0 variants under tools/src/test/resources/2.0 on 2.0-dev once a maintainer says where they would prefer them.
One correction to my previous comment, before it gets quoted:
nistQuantumSecurityLevel's range is0..6— both 1.7 and 2.0-dev say"minimum": 0, "maximum": 6. I wrote "1–5" in my previous comment; it should have covered the whole range above0, including the schema's6, which is beyond the NIST categories 1–5. And to be explicit, agreeing with your first bullet:0means "none of the categories are met" — it is not "not evaluated".- The "wrong scale" example should not be SM2: it is ECC-based, so Shor breaks it and
0is a defensible assertion. The case I actually mean is a family-only observation, where the parameter set is not identified and no category can be derived — the case you described.
One data point for the consumer side: our diff tool compares the field with a strict inequality, so absent → 0 is reported as a change rather than silently equal. Nothing in our pipeline depends on reading absence as 0.