Skip to content

(CBOM) Protocol properties: replace protocol-specific properties with a generic composition - #1213

Open
bhess wants to merge 7 commits into
CycloneDX:2.0-devfrom
bhess:feat/protocol-composition-bom
Open

bhess wants to merge 7 commits into
CycloneDX:2.0-devfrom
bhess:feat/protocol-composition-bom

Conversation

@bhess

@bhess bhess commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

TLS and IKEv2 have separate properties for describing their algorithms. Adding SSH the same way would mean defining another set of properties. This PR replaces cipherSuites and ikev2TransformTypes in the 2.0 BOM schema with protocolProperties.composition. It also brings the TLS 1.3 and X.509 v3 registry entries from #1211 into this PR.

The BOM and the cryptography registry share one definition of a composition. Each slot says what the algorithms do and how they are selected. The registry lists options for a protocol version. A BOM records what a producer knows about a particular implementation, configuration or connection.

What a producer can report

A scanner that observes IKEv2 key exchange group 19 can report { "identifier": "19" }. The IKEv2 key-exchange slot in the registry maps that value to ECDH-secp256r1. A private-use codepoint can be reported the same way even when its mapping is unknown.

When the producer knows which assets are involved, it can link them to the option. For example, this SSH signature slot identifies both the Ed25519 implementation and the host key used with it.

{
  "role": "signature",
  "selection": "one-of",
  "algorithmSet": [{
    "name": "ssh-ed25519",
    "algorithms": [{ "name": "Ed25519", "ref": "algorithm-ed25519" }],
    "relatedCryptographicAssets": [{ "type": "private-key", "ref": "key-ssh-host-ed25519" }]
  }]
}

Registry and migration

  • Roles remain open strings. Producers should reuse the registry spelling where it applies. A query on key-exchange finds slots that use that role. TLS uses record-protection because its cipher suites include integrity-only suites.
  • The TLS cert-chain-signature slot lists TLS signature schemes, as used in signature_algorithms_cert. The separate x509 entry describes the X.509 signature algorithms an implementation supports. The signature algorithm on an individual certificate belongs on the certificate asset.
  • The PR migrates the existing TLS and IKEv2 fixtures and adds examples for TLS (feat(2.0): add protocol-level TLS groups and signature schemes #1184), SSH (feat(2.0): add SSH algorithm lists to protocolProperties #1200) and IPsec (test(2.0): illustrate separate IKE and ESP protocol assets #1194). IKEv2 encryption transform "20" covers both AES key sizes in the examples. The algorithm variant distinguishes them when the key size is known. The old ESN flag described packet numbering and has no equivalent in composition.

Open point

Fuller IKEv2 coverage and registry entries for SSH and ESP can follow separately.

Closes #1162.

"title": "IKEv2 Authentication Method"
}
}
"$ref": "../../cryptography-defs.schema.json#/definitions/compositionSlot",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I support the generic direction(as discussed in meeting). One regression concerns me: the link from a slot to the algorithm asset in the BOM is lost.

Before this PR, cipherSuites[].algorithms and the ikeV2* algorithm properties were refLinkType references, so a slot pointed at a specific algorithm component. Here algorithms are name strings, and the description says they resolve "to the algorithm components of the BOM". In this PR's own test cases they do not:

  • valid-cryptography-full-2.0.json: AES-128-GCM-128-96, AES-256-GCM-128-96 and HMAC-SHA-256-128 have no component with that name (the components are AES-128-GCM, AES-256-GCM, HMAC-SHA-256).
  • valid-cryptography-certificate-2.0.json: AES-256-GCM-128-96 versus component AES-256-GCM.
  • The three new examples define no algorithm components at all.

I think it matters because the algorithm component carries the implementation facts (certification level, execution environment, implementation platform, security levels, the providing library). Two components can share a name, for example the same algorithm from a validated and a non-validated module, and a string cannot choose between them. A Misspelled name also dangles silently, where a refId can be checked.

The migrated examples keep relatedCryptographicAssets beside the composition, but that list is unlabelled, which is the "which algorithm does what" problem of #1162 again. The same applies to keys: the SSH example names the host key algorithm, but there is no key asset and no link to one.

Could a member carry an optional reference to the asset on the BOM side, or could the resolution rule be stated normatively ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, we lost that link. I’ll add an optional ref so an algorithm entry can point to a specific BOM component, even when two components have the same name, and update the examples.

},
{
"role": "authentication",
"selection": "one-of",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The role authentication is not in the registry entry for ike version 2, which has encryption, prf, integrity and key-exchange. The same slot is in valid-cryptography-full-2.0.json. ssh and esp have no registry entry at all, so all their roles are unchecked.

role is a free string in compositionSlot, and the schema cannot check it against the registry. So "a consumer finds every key exchange with one query" only holds if producers spell roles identically. A filter on key-exchange for a post-quantum readiness check would silently miss kex or key-agreement.

Could the registry schema define the role vocabulary as a closed list (or a recommended one), and could the description say what a slot means when the registry entry has no slot with that role?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ll drop authentication from both IKE examples for now and bring it back when we elaborate the IKEv2 registry entry.

},
{
"role": "cert-chain-signature",
"selection": "any-of",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This slot does not resolve against the TLS 1.3 entry in #1211. There, cert-chain-signature holds only the sub-protocol reference { "protocol": "x509", "version": "3" }, with all-of and protocol-fixed. Here it holds TLS signature scheme bundles with any-of and configuration, and ECDSA-secp256r1-SHA-256 is not in the x509 entry (which has ECDSA-SHA-256).

Which is intended on the BOM side: the TLS scheme names from signature_algorithms_cert, or X.509 signature algorithm names? The two PRs should agree, otherwise a checker cannot match this slot.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant the TLS scheme names from signature_algorithms_cert here. The slot describes which certificate signatures the endpoint can validate. If we've observed a chain, we can record the actual signatures on the certificate assets. I’ll keep the TLS names in #1213 and update the registry slot in #1211 to match.

"algorithmSet": [
{
"name": "256-bit random ECP group",
"algorithms": [

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the open point about codepoints: I think IKEv2 needs them. The IANA "name" here is descriptive text ("256-bit random ECP group"), not an identifier. Implementations label the same thing differently (group 19, ecp256), and what is on the wire is the Transform ID. The removed ikeV2Ke.group integer was the only stable identifier.

For TLS the IANA name is already a unique identifier, so the codepoint matters less there. An optional identifier on a member would cover both.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, we should keep the Transform ID. I'll add an optional identifier to each member. The IKEv2 key exchange example would carry "identifier": "19" alongside "name": "256-bit random ECP group". The same field can hold a TLS codepoint when that’s what the creator of the BOM sees.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to an optional identifier. One caveat for IKEv2: Key Exchange Method Transform IDs 1024–65535 are reserved for private use (IANA), so for those the number alone has no fixed meaning across implementations, and the BOM would need the name or the implementation context next to it.

@beatquantum

Copy link
Copy Markdown

The generic composition is a good direction. On the open point about codepoints, I would add that TLS needs them too, for groups outside the IANA registry.

During migration, groups circulate under draft and private-use codepoints, and the codepoints for the same hybrid have changed as drafts moved on. Several jurisdictions also prefer algorithms and hybrids that are not yet in the IANA registry, and strategic sectors such as defence may run profiles that never will be. For those groups the name is not a stable identifier. The codepoint is what a scanner observes on the wire, and it is what matches a CBOM to a captured handshake.

An optional identifier on each algorithmSet member, as suggested above for IKEv2, would cover IKEv2 Transform IDs, TLS codepoints including private-use ones, and SSH names in one field. It would also let a CBOM record what a service actually negotiates where the registry in #1211 has no entry yet, rather than leaving those groups out of the inventory.

@bhess

bhess commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

My plan is to combine this PR with #1211 because some things depend on each other.

@thedaemon-wizard

Copy link
Copy Markdown

Some IKEv2 data points on the ike registry entry and the IPsec example as updated today, following up on #1162:

  1. One key-exchange slot per transform type, each one-of. IKEv2 negotiates the initial key exchange (Transform Type 4, run in IKE_SA_INIT) and each additional one of RFC 9370, ADDKE1–ADDKE7 (types 6–12, run in IKE_INTERMEDIATE exchanges in type order), as separate transform types, and the responder selects a single transform of each proposed type (RFC 7296 §3.3, RFC 9370 §2.2.1). So ecp256-ke1_mlkem768 (strongSwan syntax) means ECP-256 and then ML-KEM-768, both performed. One key-exchange slot with any-of over both, as in the IPsec example and in the registry's ike entry, says "one or more of these", which also covers either one alone.
    Two slots would need two things the composition does not have yet: a way to tell repeated key-exchange slots apart (both are selected by the responder, so role plus selecting party does not), such as an ordinal or registry roles for ADDKE1–ADDKE7; and a way to mark an ADDKE as optional, which RFC 9370 does by offering NONE.

  2. INTEG depends on ENCR. When an AEAD cipher is selected, an integrity algorithm MUST NOT be (RFC 5282 §8). That covers every cipher in the ike entry's encryption set except AES-256-CBC. The composition now says which slots apply depends on use, but nothing in the entry ties the integrity slot to a non-AEAD encryption choice, so a checker cannot tell that it applies only with CBC. The example rightly leaves it out.

  3. On the ESN open point: Transform Type 5 is "Sequence Numbers (SN)" since RFC 9827, mandatory in ESP proposals (RFC 7296 §3.3.3) and negotiated like the others. Its values (0 32-bit Sequential Numbers, 1 Partially Transmitted 64-bit Sequential Numbers, 2 32-bit Unspecified Numbers) are not algorithms. Now that a protocol option needs only a name or an identifier, an SN slot in the esp entry that the new ipsec entry refers to could carry them, next to optional KE and ADDKE slots for PFS.

"selectingParty": "responder",
"algorithmSet": [
{
"name": "ENCR_AES_GCM_16",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This member doesn't resolve against the ike 2 entry. The registry's encryption slot has only bare names ("AES-128-GCM", "AES-256-GCM", …). Here the name is ENCR_AES_GCM_16, which isn't in the slot, and the algorithm is AES-256-GCM-128-96, which is spelled differently from the registry's AES-256-GCM. So a checker can't match this slot by name or by algorithm. Key exchange already uses named options with identifiers; encryption, prf and integrity don't yet.

There's also a security issue with using the Transform ID as the identifier. In IKEv2, ENCR_AES_GCM_16 (ID 20) doesn't fix the key length. The length comes from a separate Key Length attribute (RFC 7296, section 3.3.5). If the identifier is "20" alone, AES-128 and AES-256 look the same, and that's the difference a security assessment cares about. Before this PR, ikeV2Enc.keyLength carried it.

Could the encryption, prf and integrity slots in the registry become named options like key exchange, and could an option carry the key length (for example in the identifier, or as an extra field)? ESN, from the open points, is the same kind of value: a per-SA setting rather than an algorithm.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supporting the named-option idea: RFC 5282 §10.3 already tabulates each AEAD_* algorithm as an (ENCR Transform ID, Key Length) pair, e.g. AEAD_AES_128_GCM = 20/128 and AEAD_AES_256_GCM = 20/256 (18 and 19 are the 8- and 12-octet ICV variants; 14–16 are CCM). Two details if an option gets a key-length field:

  1. It would be optional. RFC 7296 §3.3.5: the Key Length attribute MUST NOT be used with fixed-length-key transforms, which covers every PRF and integrity transform in RFC 7296 and, by the same rule, ENCR_CHACHA20_POLY1305 (28, always a 256-bit key, RFC 7634). It MUST be included for ENCR_AES_CBC and ENCR_AES_CTR (RFC 7296) and for AES-GCM/CCM (RFC 5282 §7.3).
  2. An initiator that accepts several key lengths sends one transform per length (RFC 7296 §3.3.5), so AES-128-GCM and AES-256-GCM would be two members of the slot even though both carry identifier 20.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed @Mehrn0ush, the example should match the registry. I’ll align the IKE entries it uses. I’d keep 20 as the transform ID and report AES-256-GCM-128-96 in algorithms when the key size is known. Seeing 20 alone doesn’t tell us the key size.

@thedaemon-wizard 10.3 is a good example for the guide. IIf both lengths are offered, we can show two options with ID 20, one with the AES-128 variant and one with AES-256. Fields are optional by default in CycloneDX.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @bhess, that matches how I read it: two options with transform ID 20, and the key size in algorithms when it is known.

"test:v2.0:t2-json-schema-semantic": "node -- json-schema-semantic-tests.js -v 2.0",
"test:v2.0:t3-json-schema-functional": "node -- json-schema-functional-tests.js -v 2.0"
"test:v2.0:t3-json-schema-functional": "node -- json-schema-functional-tests.js -v 2.0",
"test:v2.0:t4-protocol-composition": "node --test protocol-composition-tests.js"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protocol-composition-tests.js isn't on the branch ? It may missed from this commit.

@stevespringett stevespringett added the RFC notice sent A public RFC notice was distributed to the CycloneDX mailing list for consideration label Nov 19, 2026
@stevespringett stevespringett added this to the 2.0 milestone Nov 19, 2026
{
"role": "encryption",
"role": "record-protection",
"selection": "one-of",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TLS now uses the role record-protection, but IKE, ESP and SSH use encryption for the same function. The PR description says "a consumer finds every key exchange in a BOM with one query, whatever the protocol", and that only holds if the same function has the same role name in every protocol.

This matters for security queries. A filter for weak or non-post-quantum bulk ciphers across a BOM that filters on encryption would silently skip every TLS endpoint.

ESP/SSH have no registry composition entries yet — only fixtures. I mean “IKE registry and the ESP/SSH examples use encryption, while TLS uses record-protection” so it doesn’t sound like ESP/SSH are populated registry rows.

Could the registry use one role name per function across protocols, or document how roles map to each other?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A filter on encryption would miss TLS, yes. I’d keep record-protection because TLS also has integrity-only suites like TLS_SHA256_SHA256. Roles differ across protocols, so a filter on encryption alone won’t find every bulk cipher. A cross-protocol query can look at the algorithms themselves, using the registry to resolve suite names or IDs where it has a mapping. I’ll update the PR description accordingly.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. make sense. Thanks.

"algorithm": "Mathematical function commonly used for data encryption, authentication, and digital signatures.",
"certificate": "An electronic document that is used to provide the identity or validate a public key.",
"protocol": "A set of rules and guidelines that govern the behavior and communication with each other.",
"protocol": "Rules for selecting and combining cryptographic algorithms in communication protocols such as TLS or data formats such as X.509.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This says protocols include "data formats such as X.509", while the x509 registry entry says to "model an individual certificate as a certificate asset". Since protocolProperties.type uses protocolFamiliesEnum, a protocol asset with "type": "x509" is now valid. So a certificate's signature algorithm can be described in two places, and a consumer that reads only one of them will miss the other.

Is x509 as a protocol type meant only for registry sub-protocol references? If so, could this description and the enum say that, so producers keep certificates as certificate assets?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree protocol is a stretch for X.509. The case I want to cover is a library that implements Ed25519. That alone doesn’t tell if its certificate verifier accepts Ed25519-signed certificates. I’d like to be able to record that capability even when there’s no certificate in the BOM. That’s why I’d allow type: x509 and reuse composition here. For “what signed this particular certificate and what is its metadata?”, the certificate asset should be the one place to look. I’ll think about a good description and it's something for the guide to explain.

@jkowalleck

Copy link
Copy Markdown
Member

RFC period ends on 17th December 2026

@jkowalleck

This comment was marked as outdated.

@bhess
bhess force-pushed the feat/protocol-composition-bom branch from 59a3ce3 to c8d0136 Compare November 20, 2026 09:53

@Mehrn0ush Mehrn0ush left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Signed-off-by: Basil Hess <[email protected]>
@bhess

bhess commented Nov 25, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @jkowalleck , I've reverted the changes to ref.

@jkowalleck
jkowalleck requested review from a team and stevespringett November 25, 2026 15:05

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cap: cryptography Capability: Cryptography (CBOM) request for comment RFC notice sent A public RFC notice was distributed to the CycloneDX mailing list for consideration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants