Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
76745f2
Initial checkin of algorithm family support.
stevespringett Mar 22, 2025
5b8fff6
Update cryptography-defs.json
bhess Apr 10, 2025
391aec5
Merge branch '1.7-dev' into 1.7-dev-cryptography
jkowalleck Apr 14, 2025
7c731a5
Merge branch '1.7-dev-cryptography' into patch-1
jkowalleck Apr 14, 2025
643fca9
Add more algorithms, used by SSLv3, TLS1.0-1.3
bhess Apr 17, 2025
761903f
Update cryptography-defs.json (#622)
stevespringett Apr 17, 2025
9f243b0
Revise variants structure
bhess May 9, 2025
d376ff5
- Extends cryptography-defs list by Algorithms from PKCS11
bhess May 14, 2025
b05ba4d
Add missing closing bracket
bhess May 14, 2025
4e9ef89
Extends cryptography-defs.json (#644)
stevespringett May 14, 2025
cb07283
add python script to generate algorithm families
n1ckl0sk0rtge May 22, 2025
fb68b25
Review algorithm list, the following rules for the patterns apply:
bhess Jun 5, 2025
193c4d8
fix LMS pattern
bhess Jun 5, 2025
c8734da
fix json syntax error
n1ckl0sk0rtge Jun 12, 2025
f504252
update python script to generate algorithm falimiles in the cryptogra…
n1ckl0sk0rtge Jun 12, 2025
599be38
refine a script, add $comment to schema for the date of the last update
n1ckl0sk0rtge Jun 12, 2025
4cc3d6f
add algorithm family to cyclondx schema
n1ckl0sk0rtge Jun 12, 2025
2481f1a
add new protocol typs
n1ckl0sk0rtge Jun 12, 2025
ab88132
Add python script to generate algorithm families (#645)
stevespringett Jun 19, 2025
167deb9
Review algorithm list, apply rules for patterns (#646)
stevespringett Jun 19, 2025
b1a254b
Added EC and moved algorithmFamilies to definitions.
stevespringett Jun 30, 2025
486f867
Attempting to resolve unit tests
stevespringett Jul 1, 2025
d037d71
Removing unnecessary additionalItems from schema
stevespringett Jul 1, 2025
9eeaa26
changed iri to iri-reference
stevespringett Jul 1, 2025
8349470
Moved generator. Added missing BLS
stevespringett Jul 1, 2025
35ba915
add lost changes to the spec
n1ckl0sk0rtge Jul 1, 2025
ec5d576
add lost changes to the spec
n1ckl0sk0rtge Jul 1, 2025
d5bcdb1
Add missing changes (#658)
stevespringett Jul 1, 2025
6f93579
Added missing doc
Jul 3, 2025
5ed95f6
- Schema fix: Avoid name collision in 'oneOf' of certificateExtensions
bhess Jul 17, 2025
22f8d2d
Add certificate cases
bhess Jul 17, 2025
6e24424
fix custom state schema
bhess Jul 17, 2025
94141ea
Schema Fixes
bhess Jul 17, 2025
4aa6f1a
Adding 3GPP algorithms and protocols, thanks to Ian Deakin
bhess Jul 18, 2025
e4de276
Add eap-aka-prime
bhess Jul 24, 2025
b213b8d
CBOM 1.7: Update test cases & a few schema fixes/extensions (#661)
stevespringett Jul 24, 2025
cb133aa
Porting changes from JSON to XML
stevespringett Jul 25, 2025
bc0b8fc
Clarified deprecations
stevespringett Jul 25, 2025
e9a9d93
Porting JSON changes to XML
stevespringett Jul 25, 2025
839896c
Porting JSON changes to protobuf
stevespringett Jul 25, 2025
ff2734a
tests: fix Java schema tests regarding `cryptography-defs.schema.json`
jkowalleck Jul 29, 2025
a647e1a
streamline proto schema
jkowalleck Aug 8, 2025
12f716c
tests: streamline test data
jkowalleck Aug 8, 2025
493c84e
tests: streamline test data
jkowalleck Aug 11, 2025
fdf8627
tests: streamline test data
jkowalleck Aug 11, 2025
a396a12
tests: streamline test data
jkowalleck Aug 11, 2025
d60ff1d
fix: streamline schema
jkowalleck Aug 11, 2025
20e189c
tests: streamline test data
jkowalleck Aug 11, 2025
145061e
tests: streamline test data
jkowalleck Aug 11, 2025
0d87035
tests: streamline test data
jkowalleck Aug 11, 2025
d673e8e
tests
jkowalleck Aug 11, 2025
070e355
streamline docs
jkowalleck Aug 11, 2025
95b691a
streamline docs
jkowalleck Aug 11, 2025
7d76dfd
revert unintende whitespace changes
jkowalleck Aug 11, 2025
9270cd1
Extend crypto definitions
bhess Aug 14, 2025
f0499a9
Extend crypto definitions (#672)
stevespringett Aug 14, 2025
3db7d68
Update schema/cryptography-defs.schema.json
jkowalleck Aug 14, 2025
31042b8
PB: fixes and reverts
jkowalleck Aug 14, 2025
2155fb0
Removing JOSE from protocol - as it technically doesn't fit the defin…
stevespringett Aug 21, 2025
1ce2c8f
Removing JOSE from protocol - as it technically doesn't fit the defin…
stevespringett Aug 21, 2025
1a6ae86
Added back in broken ikev2 behavior for XML and JSON
stevespringett Aug 28, 2025
14136a6
test data
jkowalleck Sep 1, 2025
b9423d7
docs
jkowalleck Sep 2, 2025
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
220 changes: 207 additions & 13 deletions schema/bom-1.7.proto

Large diffs are not rendered by default.

527 changes: 505 additions & 22 deletions schema/bom-1.7.schema.json

Large diffs are not rendered by default.

618 changes: 613 additions & 5 deletions schema/bom-1.7.xsd

Large diffs are not rendered by default.

3,313 changes: 3,313 additions & 0 deletions schema/cryptography-defs.json

Large diffs are not rendered by default.

546 changes: 546 additions & 0 deletions schema/cryptography-defs.schema.json

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions tools/src/main/python/algorithmFamilyGeneration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import json
from datetime import datetime
from pathlib import Path
from typing import Dict, List, Any

# Step 1: Load JSON data safely using context managers
SCHEMA_DIR = Path(__file__).parent.parent / "../../../schema"
DEFS_FILE = SCHEMA_DIR / "cryptography-defs.json"
SCHEMA_FILE = SCHEMA_DIR / "cryptography-defs.schema.json"

with DEFS_FILE.open("r", encoding="utf-8") as defs_file:
defs_data: Dict[str, List[Dict[str, Any]]] = json.load(defs_file)

with SCHEMA_FILE.open("r", encoding="utf-8") as schema_file:
schema_data: Dict[str, Any] = json.load(schema_file)

# Step 2: Extract unique algorithm families and sort them
families: List[str] = sorted({algo['family'] for algo in defs_data.get('algorithms', [])})

# Step 3: Update the schema with the extracted families
try:
schema_properties = schema_data['properties']
except KeyError as e:
raise KeyError(f"Required schema property 'properties' missing: {e}")

schema_data['$comment'] = datetime.now().isoformat()

schema_data['definitions']['algorithmFamiliesEnum'] = {
"type": "string",
"title": "Algorithm Families",
"description": "An enum for the algorithm families.",
"enum": families,
}

# Step 4: Write the updated schema back to the file
with SCHEMA_FILE.open("w", encoding="utf-8") as update_file:
json.dump(schema_data, update_file, indent=2, ensure_ascii=False)

print("Schema updated successfully.")
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class JsonSchemaVerificationTest extends BaseSchemaVerificationTest {

private static final String JSF_NAMESPACE = "http://cyclonedx.org/schema/jsf-0.82.schema.json";
private static final String SPDX_NAMESPACE = "http://cyclonedx.org/schema/spdx.schema.json";
private static final String CRYPTO_DEF_NAMESPACE = "http://cyclonedx.org/schema/cryptography-defs.schema.json";

private static final JsonSchema VERSION_12;
private static final JsonSchema VERSION_13;
Expand All @@ -69,8 +70,9 @@ public JsonMetaSchema getMetaSchema(
.metaSchemaFactory(metaSchemaFactory)
.schemaLoaders(b -> b.add(new ClasspathSchemaLoader()).add(DisallowSchemaLoader.getInstance()))
.schemaMappers(b -> b.mapPrefix(SPDX_NAMESPACE, "classpath:spdx.schema.json")
.mapPrefix(JSF_NAMESPACE, "classpath:jsf-0.82.schema.json"))
.build();
.mapPrefix(JSF_NAMESPACE, "classpath:jsf-0.82.schema.json")
.mapPrefix(CRYPTO_DEF_NAMESPACE, "classpath:cryptography-defs.schema.json")
).build();
VERSION_12 = factory.getSchema(SchemaLocation.of("classpath:bom-1.2-strict.schema.json"));
VERSION_13 = factory.getSchema(SchemaLocation.of("classpath:bom-1.3-strict.schema.json"));
VERSION_14 = factory.getSchema(SchemaLocation.of("classpath:bom-1.4.schema.json"));
Expand Down
8 changes: 5 additions & 3 deletions tools/src/test/js/json-schema-functional-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ console.debug('DEBUG | testdataDir = ', testdataDir);

// region validator

const [spdxSchema, jsfSchema, bomSchema] = await Promise.all([
const [spdxSchema, jsfSchema, cryptoDefsSchema, bomSchema] = await Promise.all([
readFile(join(schemaDir, 'spdx.schema.json'), 'utf-8').then(JSON.parse),
readFile(join(schemaDir, 'jsf-0.82.schema.json'), 'utf-8').then(JSON.parse),
readFile(join(schemaDir, 'cryptography-defs.schema.json'), 'utf-8').then(JSON.parse),
readFile(schemaFile, 'utf-8').then(JSON.parse)
])

Expand All @@ -57,7 +58,8 @@ const ajv = new Ajv({
addUsedSchema: false,
schemas: {
'http://cyclonedx.org/schema/spdx.schema.json': spdxSchema,
'http://cyclonedx.org/schema/jsf-0.82.schema.json': jsfSchema
'http://cyclonedx.org/schema/jsf-0.82.schema.json': jsfSchema,
'http://cyclonedx.org/schema/cryptography-defs.schema.json': cryptoDefsSchema,
}
});
addFormats(ajv)
Expand Down Expand Up @@ -113,4 +115,4 @@ for (const file of globSync(join(testdataDir, 'invalid-*.json'))) {

// Exit statuses should be in the range 0 to 254.
// The status 0 is used to terminate the program successfully.
process.exitCode = Math.min(errCnt, 254)
process.exitCode = Math.min(errCnt, 254)
8 changes: 5 additions & 3 deletions tools/src/test/js/json-schema-lint-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ const schemaDir = join(dirname(fileURLToPath(import.meta.url)), '..', '..', '..'

// endregion config

const [spdxSchema, jsfSchema, bomSchemas] = await Promise.all([
const [spdxSchema, jsfSchema, cryptoDefsSchema, bomSchemas] = await Promise.all([
readFile(join(schemaDir, 'spdx.schema.json'), 'utf-8').then(JSON.parse),
readFile(join(schemaDir, 'jsf-0.82.schema.json'), 'utf-8').then(JSON.parse),
readFile(join(schemaDir, 'cryptography-defs.schema.json'), 'utf-8').then(JSON.parse),
glob(join(schemaDir, bomSchemasGlob)).then(l => l.sort())
])
assert.notStrictEqual(bomSchemas.length, 0)
Expand Down Expand Up @@ -53,7 +54,8 @@ function getAjv(strict) {
keywords: ["meta:enum"],
schemas: {
'http://cyclonedx.org/schema/spdx.schema.json': spdxSchema,
'http://cyclonedx.org/schema/jsf-0.82.schema.json': jsfSchema
'http://cyclonedx.org/schema/jsf-0.82.schema.json': jsfSchema,
'http://cyclonedx.org/schema/cryptography-defs.schema.json': cryptoDefsSchema,
}
});
addFormats(ajv)
Expand Down Expand Up @@ -112,4 +114,4 @@ for (const bomSchemaFile of bomSchemas) {

// Exit statuses should be in the range 0 to 254.
// The status 0 is used to terminate the program successfully.
process.exitCode = Math.min(errCnt, 254)
process.exitCode = Math.min(errCnt, 254)
11 changes: 10 additions & 1 deletion tools/src/test/resources/1.6/valid-cryptography-full-1.6.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,16 @@
"0xC0"
]
}
]
],
"ikev2TransformTypes": {
"encr": ["bom-ref-to-encr"],
"prf": ["bom-ref-to-prf"],
"integ": ["bom-ref-to-integ"],
"ke": ["bom-ref-to-ke"],
"esn": true,
"auth": ["bom-ref-to-auth"]
},
"cryptoRefArray": ["asset-4"]
},
"oid": "oid:1.2.3.4.5.6.7.8.9"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ components: [
curve: "brainpoolP160r1"
executionEnvironment: CRYPTO_EXECUTION_ENVIRONMENT_SOFTWARE_PLAIN_RAM
implementationPlatform: CRYPTO_IMPLEMENTATION_PLATFORM_X86_64
certificationLevel: [ "fips140-1-l4" ]
certificationLevel: ["fips140-1-l4"]
mode: CRYPTO_ALGORITHM_MODE_GCM
padding: CRYPTO_ALGORITHM_PADDING_PKCS5
cryptoFunctions: [
Expand Down Expand Up @@ -54,7 +54,7 @@ components: [
certificateFormat: "X.509"
certificateExtension: "crt"
}
oid: "oid:1.2.3.4.5.6.7.8.9"
oid: "oid:1.2.3.4.5.6.7.8.9"
}
},
{
Expand All @@ -77,6 +77,15 @@ components: [
]
}
]
ikev2TransformTypes: {
encr: "bom-ref-to-encr"
prf: "bom-ref-to-prf"
integ: "bom-ref-to-integ"
ke: "bom-ref-to-ke"
esn: true
auth: "bom-ref-to-auth"
}
cryptoRef: "asset-4"
}
oid: "oid:1.2.3.4.5.6.7.8.9"
}
Expand Down
24 changes: 24 additions & 0 deletions tools/src/test/resources/1.6/valid-cryptography-full-1.6.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,30 @@
<certificateFormat>X.509</certificateFormat>
<certificateExtension>crt</certificateExtension>
</certificateProperties>
<protocolProperties>
<type>tls</type>
<version>1.3</version>
<cipherSuites>
<cipherSuite>
<name>TLS_DHE_RSA_WITH_AES_128_CCM</name>
<algorithms>
<algorithm>bom-ref-to-algorithm</algorithm>
</algorithms>
<identifiers>
<identifier>0xC0</identifier>
</identifiers>
</cipherSuite>
</cipherSuites>
<ikev2TransformTypes>
<encr>bom-ref-to-encr</encr>
<prf>bom-ref-to-prf</prf>
<integ>bom-ref-to-integ</integ>
<ke>bom-ref-to-ke</ke>
<esn>true</esn>
<auth>bom-ref-to-auth</auth>
</ikev2TransformTypes>
<cryptoRef>asset-4</cryptoRef>
</protocolProperties>
<oid>oid:1.2.3.4.5.6.7.8.9</oid>
</cryptoProperties>
</component>
Expand Down
172 changes: 172 additions & 0 deletions tools/src/test/resources/1.7/valid-cryptography-certificate-1.7.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
{
"$schema": "http://cyclonedx.org/schema/bom-1.7.schema.json",
"bomFormat": "CycloneDX",
"specVersion": "1.7",
"serialNumber": "urn:uuid:e8c355aa-2142-4084-a8c7-6d42c8610ba2",
"version": 1,
"metadata": {
"timestamp": "2024-01-09T12:00:00Z",
"component": {
"type": "application",
"name": "my application",
"version": "1.0"
}
},
"components": [
{
"name": "google.com",
"type": "cryptographic-asset",
"bom-ref": "c9c7ac91-2115-45e8-ae13-7d0e1dec74be",
"cryptoProperties": {
"assetType": "certificate",
"certificateProperties": {
"serialNumber": "1234567890ABCDEF",
"subjectName": "CN = www.google.com",
"issuerName": "C = US, O = Google Trust Services LLC, CN = GTS CA 1C3",
"notValidBefore": "2016-11-21T08:00:00Z",
"notValidAfter": "2017-11-22T07:59:59Z",
"certificateFormat": "X.509",
"certificateFileExtension": "crt",
"fingerprint": {
"alg": "SHA-256",
"content": "1e15e0fbd3ce95bde5945633ae96add551341b11e5bae7bba12e98ad84a5beb4"
},
"certificateState": [
{
"state": "active",
"reason": "Certificate is currently valid and in use"
}
],
"creationDate": "2016-11-21T07:30:00Z",
"activationDate": "2016-11-21T08:00:00Z",
"relatedCryptographicAssets": [
{
"type": "algorithm",
"ref": "6b00f384-6c39-420f-91eb-94de0f7be569RR"
},
{
"type": "publicKey",
"ref": "ceb37320-8239-40e8-ab77-8798dbd98773"
}
]
},
"oid": "2.5.4.3"
}
},
{
"name": "SHA512withRSA",
"type": "cryptographic-asset",
"bom-ref": "6b00f384-6c39-420f-91eb-94de0f7be569",
"cryptoProperties": {
"assetType": "algorithm",
"algorithmProperties": {
"primitive": "signature",
"executionEnvironment": "software-plain-ram",
"implementationPlatform": "x86_64",
"certificationLevel": [
"none"
],
"padding": "pkcs1v15",
"cryptoFunctions": [
"sign",
"verify"
]
},
"oid": "1.2.840.113549.1.1.13"
}
},
{
"name": "RSA-2048",
"type": "cryptographic-asset",
"bom-ref": "ceb37320-8239-40e8-ab77-8798dbd98773",
"cryptoProperties": {
"assetType": "related-crypto-material",
"relatedCryptoMaterialProperties": {
"type": "public-key",
"id": "2e9ef09e-dfac-4526-96b4-d02f31af1b22",
"state": "active",
"size": 2048,
"format": "PEM",
"value": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...\n-----END PUBLIC KEY-----",
"creationDate": "2016-11-21T08:00:00Z",
"activationDate": "2016-11-21T08:20:00Z",
"updateDate": "2016-11-21T08:00:00Z",
"expirationDate": "2017-11-22T07:59:59Z",
"securedBy": {
"mechanism": "None"
},
"fingerprint": {
"alg": "SHA-256",
"content": "a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456"
},
"relatedCryptographicAssets": [
{
"type": "algorithm",
"ref": "a154af0a-0dca-4ed5-b611-2405a3a6ae47"
}
]
},
"oid": "1.2.840.113549.1.1.1"
}
},
{
"name": "RSA-2048",
"type": "cryptographic-asset",
"bom-ref": "a154af0a-0dca-4ed5-b611-2405a3a6ae47",
"cryptoProperties": {
"assetType": "algorithm",
"algorithmProperties": {
"primitive": "pke",
"algorithmFamily": "RSAES-OAEP",
"parameterSetIdentifier": "2048",
"executionEnvironment": "software-plain-ram",
"implementationPlatform": "x86_64",
"certificationLevel": [
"none"
],
"padding": "oaep",
"cryptoFunctions": [
"encrypt",
"decrypt"
]
},
"oid": "1.2.840.113549.1.1.1"
}
},
{
"name": "TLS 1.3 Protocol",
"type": "cryptographic-asset",
"bom-ref": "a3553dc1-f376-43d1-89dc-87bb71981c0c",
"cryptoProperties": {
"assetType": "protocol",
"protocolProperties": {
"type": "tls",
"version": "1.3",
"cipherSuites": [
{
"name": "TLS_AES_256_GCM_SHA384",
"algorithms": [
"1977d71b-8981-4292-b40d-842a019c2229",
"422fa336-b401-42b7-89b8-8966aa30bca0"
],
"identifiers": [
"0x13,0x02"
]
},
{
"name": "TLS_CHACHA20_POLY1305_SHA256",
"algorithms": [
"1af4fc08-5d0d-436e-8058-eeef921983d0",
"6af3066b-ab66-4593-975f-d9ba2c623a89"
],
"identifiers": [
"0x13,0x03"
]
}
]
},
"oid": "1.3.6.1.5.5.7.3.1"
}
}
]
}
Loading
Loading