Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
240 changes: 5 additions & 235 deletions schema/2.0/modules/cyclonedx-cryptography-2.0.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -687,70 +687,13 @@
"1.99"
]
},
"cipherSuites": {
"composition": {
"type": "array",
"title": "Cipher Suites",
"description": "A list of cipher suites related to the protocol, as configured or observed for the subject of this BOM. The protocol entry in the `cryptography-defs.schema.json` subschema describes what the protocol version itself can support or negotiate.",
"title": "Composition",
"description": "The composition of the protocol as implemented, configured or observed for the subject of this BOM, using the structure of the protocol entries in the `cryptography-defs.schema.json` subschema. A slot corresponds to the slot of the protocol entry, identified by `type` and `version`, with the same role, and with the same selecting party where several slots share the role. The algorithm set holds the algorithms of the subject, named by the variant patterns of the algorithm families. A named bundle keeps the protocol's own identifier, such as an IANA-registered cipher suite, group or algorithm name, also for a single algorithm. The selection and the selection mechanism are those of the subject, which can be narrower than the protocol's: a negotiated slot can be fixed at build time, for example.",
"items": {
"$ref": "#/$defs/cipherSuite",
"title": "Cipher Suite"
}
},
"ikev2TransformTypes": {
"type": "object",
"title": "IKEv2 Transform Types",
"description": "The IKEv2 transform types supported (types 1-4), defined in [RFC 7296 section 3.3.2](https://www.ietf.org/rfc/rfc7296.html#section-3.3.2), and additional properties, as configured or observed for the subject of this BOM. The protocol entry in the `cryptography-defs.schema.json` subschema describes what the protocol version itself can support or negotiate.",
"additionalProperties": false,
"properties": {
"encr": {
"type": "array",
"title": "Encryption Algorithms (ENCR)",
"description": "Transform Type 1: encryption algorithms.",
"items": {
"$ref": "#/$defs/ikeV2Enc",
"title": "Encryption Algorithm (ENCR)"
}
},
"prf": {
"type": "array",
"title": "Pseudorandom Functions (PRF)",
"description": "Transform Type 2: pseudorandom functions.",
"items": {
"$ref": "#/$defs/ikeV2Prf",
"title": "Pseudorandom Function (PRF)"
}
},
"integ": {
"type": "array",
"title": "Integrity Algorithms (INTEG)",
"description": "Transform Type 3: integrity algorithms.",
"items": {
"$ref": "#/$defs/ikeV2Integ",
"title": "Integrity Algorithm (INTEG)"
}
},
"ke": {
"type": "array",
"title": "Key Exchange Methods (KE)",
"description": "Transform Type 4: Key Exchange Method (KE) per [RFC 9370](https://www.ietf.org/rfc/rfc9370.html), formerly called Diffie-Hellman Group (D-H).",
"items": {
"$ref": "#/$defs/ikeV2Ke"
}
},
"esn": {
"type": "boolean",
"title": "Extended Sequence Number (ESN)",
"description": "Specifies if an Extended Sequence Number (ESN) is used."
},
"auth": {
"type": "array",
"title": "IKEv2 Authentication methods",
"description": "IKEv2 Authentication method per [RFC9593](https://www.ietf.org/rfc/rfc9593.html).",
"items": {
"$ref": "#/$defs/ikeV2Auth",
"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 ?

"title": "Composition Slot"
}
},
"relatedCryptographicAssets": {
Expand All @@ -765,179 +708,6 @@
}
}
},
"cipherSuite": {
"type": "object",
"title": "Cipher Suite",
"description": "Object representing a cipher suite.",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"title": "Common Name",
"description": "A common name for the cipher suite.",
"examples": [
"TLS_DHE_RSA_WITH_AES_128_CCM"
]
},
"algorithms": {
"type": "array",
"title": "Related Algorithms",
"description": "A list of algorithms related to the cipher suite.",
"items": {
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/refLinkType",
"title": "Algorithm reference",
"description": "The `refId` to algorithm cryptographic asset."
}
},
"identifiers": {
"type": "array",
"title": "Cipher Suite Identifiers",
"description": "A list of common identifiers for the cipher suite.",
"items": {
"type": "string",
"title": "identifier",
"description": "Cipher suite identifier.",
"examples": [
"0xC0",
"0x9E"
]
}
},
"tlsGroups": {
"type": "array",
"title": "TLS Groups",
"description": "A list of TLS named groups (formerly known as curves) for this cipher suite. These groups define the parameters for key exchange algorithms like ECDHE.",
"items": {
"type": "string",
"title": "Group Name",
"description": "The name of the TLS group.",
"examples": [
"x25519",
"ffdhe2048"
]
}
},
"tlsSignatureSchemes": {
"type": "array",
"title": "TLS Signature Schemes",
"description": "A list of signature schemes supported for cipher suite. These schemes specify the algorithms used for digital signatures in TLS handshakes and certificate verification.",
"items": {
"type": "string",
"title": "Signature Scheme",
"description": "The name of the TLS signature scheme.",
"examples": [
"ecdsa_secp256r1_sha256",
"rsa_pss_rsae_sha256",
"ed25519"
]
}
}
}
},
"ikeV2Enc": {
"type": "object",
"title": "Encryption Algorithm (ENCR)",
"description": "Object representing an encryption algorithm (ENCR).",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"title": "Name",
"description": "A name for the encryption method.",
"examples": [
"ENCR_AES_GCM_16"
]
},
"keyLength": {
"type": "integer",
"title": "Encryption algorithm key length",
"description": "The key length of the encryption algorithm."
},
"algorithm": {
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/refLinkType",
"title": "Algorithm reference",
"description": "The `refId` to algorithm cryptographic asset."
}
}
},
"ikeV2Prf": {
"type": "object",
"title": "Pseudorandom Function (PRF)",
"description": "Object representing a pseudorandom function (PRF).",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"title": "Name",
"description": "A name for the pseudorandom function.",
"examples": [
"PRF_HMAC_SHA2_256"
]
},
"algorithm": {
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/refLinkType",
"title": "Algorithm reference",
"description": "The `refId` to algorithm cryptographic asset."
}
}
},
"ikeV2Integ": {
"type": "object",
"title": "Integrity Algorithm (INTEG)",
"description": "Object representing an integrity algorithm (INTEG).",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"title": "Name",
"description": "A name for the integrity algorithm.",
"examples": [
"AUTH_HMAC_SHA2_256_128"
]
},
"algorithm": {
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/refLinkType",
"title": "Algorithm reference",
"description": "The `refId` to algorithm cryptographic asset."
}
}
},
"ikeV2Ke": {
"type": "object",
"title": "Key Exchange Method (KE)",
"description": "Object representing a key exchange method (KE).",
"additionalProperties": false,
"properties": {
"group": {
"type": "integer",
"title": "Group Identifier",
"description": "A group identifier for the key exchange algorithm."
},
"algorithm": {
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/refLinkType",
"title": "Algorithm reference",
"description": "The `refId` to algorithm cryptographic asset."
}
}
},
"ikeV2Auth": {
"type": "object",
"title": "IKEv2 Authentication method",
"description": "Object representing a IKEv2 Authentication method.",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"title": "Name",
"description": "A name for the authentication method."
},
"algorithm": {
"$ref": "cyclonedx-common-2.0.schema.json#/$defs/refLinkType",
"title": "Algorithm reference",
"description": "The `refId` to algorithm cryptographic asset."
}
}
},
"cryptographicFunction": {
"title": "Cryptographic Function",
"description": "A cryptographic function or usage.",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
"specFormat": "CycloneDX",
"specVersion": "2.0",
"version": 1,
"serialNumber": "urn:uuid:6136f063-ade0-4403-9623-8e3e05e8946e",
"inventories": [
{
"subject": {
"refId": "subject-1",
"type": "application",
"name": "Acme Application",
"version": "1.0"
},
"components": [
{
"type": "cryptographic-asset",
"refId": "protocol-tls",
"name": "TLS",
"cryptoProperties": {
"assetType": "protocol",
"protocolProperties": {
"type": "tls",
"version": "1.3",
"composition": [
{
"role": "key-exchange",
"selection": "one-of",
"selectedBy": "negotiation",
"algorithmSet": [
{
"name": "X25519MLKEM768"
}
]
}
]
}
}
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
"specFormat": "CycloneDX",
"specVersion": "2.0",
"version": 1,
"serialNumber": "urn:uuid:6836c1f4-a4bf-46f6-9639-4b5ba85f3c58",
"inventories": [
{
"subject": {
"refId": "subject-1",
"type": "application",
"name": "Acme Application",
"version": "1.0"
},
"components": [
{
"type": "cryptographic-asset",
"refId": "protocol-tls",
"name": "TLS",
"cryptoProperties": {
"assetType": "protocol",
"protocolProperties": {
"type": "tls",
"version": "1.3",
"composition": [
{
"selection": "one-of",
"selectedBy": "negotiation",
"algorithmSet": [
{
"name": "TLS_AES_128_GCM_SHA256",
"algorithms": [
"AES-128-GCM-128-96",
"HKDF-SHA-256"
]
}
]
}
]
}
}
}
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"$schema": "https://cyclonedx.org/schema/2.0/cyclonedx-2.0.schema.json",
"specFormat": "CycloneDX",
"specVersion": "2.0",
"version": 1,
"serialNumber": "urn:uuid:61c2f9c1-f0eb-47c3-8f87-6e0358871629",
"inventories": [
{
"subject": {
"refId": "subject-1",
"type": "application",
"name": "Acme Application",
"version": "1.0"
},
"components": [
{
"type": "cryptographic-asset",
"refId": "protocol-tls",
"name": "TLS",
"cryptoProperties": {
"assetType": "protocol",
"protocolProperties": {
"type": "tls",
"version": "1.3",
"composition": [
{
"role": "encryption",
"selection": "two-of",
"selectedBy": "negotiation",
"algorithmSet": [
{
"name": "TLS_AES_128_GCM_SHA256",
"algorithms": [
"AES-128-GCM-128-96",
"HKDF-SHA-256"
]
}
]
}
]
}
}
}
]
}
]
}
Loading
Loading