Skip to content

Commit 14136a6

Browse files
committed
test data
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 1a6ae86 commit 14136a6

7 files changed

+405
-4
lines changed

schema/bom-1.7.schema.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5910,7 +5910,7 @@
59105910
"deprecated": true,
59115911
"$ref": "#/definitions/cryptoRefArray",
59125912
"title": "Cryptographic References",
5913-
"description": "[DEPRECATED] Use `r`elatedCryptographicAssets` instead. A list of protocol-related cryptographic assets"
5913+
"description": "[DEPRECATED] Use `relatedCryptographicAssets` instead. A list of protocol-related cryptographic assets"
59145914
},
59155915
"relatedCryptographicAssets": {
59165916
"$ref": "#/definitions/relatedCryptographicAssets",

tools/src/test/resources/1.6/valid-cryptography-full-1.6.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,16 @@
6565
"0xC0"
6666
]
6767
}
68-
]
68+
],
69+
"ikev2TransformTypes": {
70+
"encr": ["bom-ref-to-encr"],
71+
"prf": ["bom-ref-to-prf"],
72+
"integ": ["bom-ref-to-integ"],
73+
"ke": ["bom-ref-to-ke"],
74+
"esn": true,
75+
"auth": ["bom-ref-to-auth"]
76+
},
77+
"cryptoRefArray": ["asset-4"]
6978
},
7079
"oid": "oid:1.2.3.4.5.6.7.8.9"
7180
}

tools/src/test/resources/1.6/valid-cryptography-full-1.6.textproto

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ components: [
1717
curve: "brainpoolP160r1"
1818
executionEnvironment: CRYPTO_EXECUTION_ENVIRONMENT_SOFTWARE_PLAIN_RAM
1919
implementationPlatform: CRYPTO_IMPLEMENTATION_PLATFORM_X86_64
20-
certificationLevel: [ "fips140-1-l4" ]
20+
certificationLevel: ["fips140-1-l4"]
2121
mode: CRYPTO_ALGORITHM_MODE_GCM
2222
padding: CRYPTO_ALGORITHM_PADDING_PKCS5
2323
cryptoFunctions: [
@@ -54,7 +54,7 @@ components: [
5454
certificateFormat: "X.509"
5555
certificateExtension: "crt"
5656
}
57-
oid: "oid:1.2.3.4.5.6.7.8.9"
57+
oid: "oid:1.2.3.4.5.6.7.8.9"
5858
}
5959
},
6060
{
@@ -77,6 +77,15 @@ components: [
7777
]
7878
}
7979
]
80+
ikev2TransformTypes: {
81+
encr: "bom-ref-to-encr"
82+
prf: "bom-ref-to-prf"
83+
integ: "bom-ref-to-integ"
84+
ke: "bom-ref-to-ke"
85+
esn: true
86+
auth: "bom-ref-to-auth"
87+
}
88+
cryptoRef: "asset-4"
8089
}
8190
oid: "oid:1.2.3.4.5.6.7.8.9"
8291
}

tools/src/test/resources/1.6/valid-cryptography-full-1.6.xml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,30 @@
4040
<certificateFormat>X.509</certificateFormat>
4141
<certificateExtension>crt</certificateExtension>
4242
</certificateProperties>
43+
<protocolProperties>
44+
<type>tls</type>
45+
<version>1.3</version>
46+
<cipherSuites>
47+
<cipherSuite>
48+
<name>TLS_DHE_RSA_WITH_AES_128_CCM</name>
49+
<algorithms>
50+
<algorithm>bom-ref-to-algorithm</algorithm>
51+
</algorithms>
52+
<identifiers>
53+
<identifier>0xC0</identifier>
54+
</identifiers>
55+
</cipherSuite>
56+
</cipherSuites>
57+
<ikev2TransformTypes>
58+
<encr>bom-ref-to-encr</encr>
59+
<prf>bom-ref-to-prf</prf>
60+
<integ>bom-ref-to-integ</integ>
61+
<ke>bom-ref-to-ke</ke>
62+
<esn>true</esn>
63+
<auth>bom-ref-to-auth</auth>
64+
</ikev2TransformTypes>
65+
<cryptoRef>asset-4</cryptoRef>
66+
</protocolProperties>
4367
<oid>oid:1.2.3.4.5.6.7.8.9</oid>
4468
</cryptoProperties>
4569
</component>
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"$schema": "http://cyclonedx.org/schema/bom-1.7.schema.json",
3+
"bomFormat": "CycloneDX",
4+
"specVersion": "1.7",
5+
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
6+
"version": 1,
7+
"components": [
8+
{
9+
"type": "cryptographic-asset",
10+
"bom-ref": "asset-1",
11+
"name": "Name here",
12+
"cryptoProperties": {
13+
"assetType": "algorithm",
14+
"algorithmProperties": {
15+
"primitive": "ae",
16+
"parameterSetIdentifier": "128",
17+
"curve": "brainpoolP160r1",
18+
"executionEnvironment": "software-plain-ram",
19+
"implementationPlatform": "x86_64",
20+
"certificationLevel": [ "fips140-1-l4" ],
21+
"mode": "gcm",
22+
"padding": "pkcs5",
23+
"cryptoFunctions": ["keygen", "encrypt", "decrypt", "tag"],
24+
"classicalSecurityLevel": 128,
25+
"nistQuantumSecurityLevel": 1
26+
},
27+
"oid": "oid:1.2.3.4.5.6.7.8.9"
28+
}
29+
},
30+
{
31+
"type": "cryptographic-asset",
32+
"bom-ref": "asset-2",
33+
"name": "Name here",
34+
"cryptoProperties": {
35+
"assetType": "certificate",
36+
"certificateProperties": {
37+
"subjectName": "Subject name here",
38+
"issuerName": "Issuer name here",
39+
"notValidBefore": "2022-01-01T00:00:00.000Z",
40+
"notValidAfter": "2024-01-01T00:00:00.000Z",
41+
"signatureAlgorithmRef": "bom-ref-to-algorithm",
42+
"subjectPublicKeyRef": "bom-ref-to-public-key",
43+
"certificateFormat": "X.509",
44+
"certificateExtension": "crt"
45+
},
46+
"oid": "oid:1.2.3.4.5.6.7.8.9"
47+
}
48+
},
49+
{
50+
"type": "cryptographic-asset",
51+
"bom-ref": "asset-3",
52+
"name": "Name here",
53+
"cryptoProperties": {
54+
"assetType": "protocol",
55+
"protocolProperties": {
56+
"type": "tls",
57+
"version": "1.3",
58+
"cipherSuites": [
59+
{
60+
"name": "TLS_DHE_RSA_WITH_AES_128_CCM",
61+
"algorithms": [
62+
"bom-ref-to-algorithm"
63+
],
64+
"identifiers": [
65+
"0xC0"
66+
]
67+
}
68+
],
69+
"ikev2TransformTypes": {
70+
"encr": ["bom-ref-to-encr"],
71+
"prf": ["bom-ref-to-prf"],
72+
"integ": ["bom-ref-to-integ"],
73+
"ke": ["bom-ref-to-ke"],
74+
"esn": true,
75+
"auth": ["bom-ref-to-auth"]
76+
},
77+
"cryptoRefArray": ["asset-4"]
78+
},
79+
"oid": "oid:1.2.3.4.5.6.7.8.9"
80+
}
81+
},
82+
{
83+
"type": "cryptographic-asset",
84+
"bom-ref": "asset-4",
85+
"name": "Name here",
86+
"cryptoProperties": {
87+
"assetType": "related-crypto-material",
88+
"relatedCryptoMaterialProperties": {
89+
"type": "private-key",
90+
"id": "12345",
91+
"state": "active",
92+
"algorithmRef": "bom-ref-to-algorithm",
93+
"creationDate": "2024-01-01T00:00:00.000Z",
94+
"activationDate": "2024-01-02T00:00:00.000Z",
95+
"updateDate": "2024-01-03T00:00:00.000Z",
96+
"expirationDate": "2024-01-04T00:00:00.000Z",
97+
"value": "Value here",
98+
"size": 1024,
99+
"format": "PEM",
100+
"securedBy": {
101+
"mechanism": "HSM",
102+
"algorithmRef": "bom-ref-to-algorithm"
103+
}
104+
},
105+
"oid": "oid:1.2.3.4.5.6.7.8.9"
106+
}
107+
}
108+
]
109+
}
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# proto-file: schema/bom-1.7.proto
2+
# proto-message: Bom
3+
4+
spec_version: "1.6"
5+
version: 1
6+
serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"
7+
components: [
8+
{
9+
type: CLASSIFICATION_CRYPTOGRAPHIC_ASSET
10+
bom_ref: "asset-1"
11+
name: "Name here"
12+
cryptoProperties: {
13+
assetType: CRYPTO_ASSET_TYPE_ALGORITHM
14+
algorithmProperties: {
15+
primitive: CRYPTO_PRIMITIVE_AE
16+
parameterSetIdentifier: "128"
17+
curve: "brainpoolP160r1"
18+
executionEnvironment: CRYPTO_EXECUTION_ENVIRONMENT_SOFTWARE_PLAIN_RAM
19+
implementationPlatform: CRYPTO_IMPLEMENTATION_PLATFORM_X86_64
20+
certificationLevel: ["fips140-1-l4"]
21+
mode: CRYPTO_ALGORITHM_MODE_GCM
22+
padding: CRYPTO_ALGORITHM_PADDING_PKCS5
23+
cryptoFunctions: [
24+
CRYPTO_ALGORITHM_FUNCTION_KEYGEN,
25+
CRYPTO_ALGORITHM_FUNCTION_ENCRYPT,
26+
CRYPTO_ALGORITHM_FUNCTION_DECRYPT,
27+
CRYPTO_ALGORITHM_FUNCTION_TAG
28+
]
29+
classicalSecurityLevel: 128
30+
nistQuantumSecurityLevel: 1
31+
},
32+
oid: "oid:1.2.3.4.5.6.7.8.9"
33+
}
34+
},
35+
{
36+
type: CLASSIFICATION_CRYPTOGRAPHIC_ASSET
37+
bom_ref: "asset-2"
38+
name: "Name here"
39+
cryptoProperties: {
40+
assetType: CRYPTO_ASSET_TYPE_CERTIFICATE
41+
certificateProperties: {
42+
subjectName: "Subject name here"
43+
issuerName: "Issuer name here"
44+
notValidBefore {
45+
seconds: 1640995200
46+
nanos: 0
47+
}
48+
notValidAfter {
49+
seconds: 1704067200
50+
nanos: 0
51+
}
52+
signatureAlgorithmRef: "bom-ref-to-algorithm"
53+
subjectPublicKeyRef: "bom-ref-to-public-key"
54+
certificateFormat: "X.509"
55+
certificateExtension: "crt"
56+
}
57+
oid: "oid:1.2.3.4.5.6.7.8.9"
58+
}
59+
},
60+
{
61+
type: CLASSIFICATION_CRYPTOGRAPHIC_ASSET
62+
bom_ref: "asset-3"
63+
name: "Name here"
64+
cryptoProperties: {
65+
assetType: CRYPTO_ASSET_TYPE_PROTOCOL
66+
protocolProperties: {
67+
type: CRYPTO_PROTOCOL_TYPE_TLS
68+
version: "1.3"
69+
cipherSuites: [
70+
{
71+
name: "TLS_DHE_RSA_WITH_AES_128_CCM"
72+
algorithms: [
73+
"bom-ref-to-algorithm"
74+
]
75+
identifiers: [
76+
"0xC0"
77+
]
78+
}
79+
]
80+
ikev2TransformTypes: {
81+
encr: "bom-ref-to-encr"
82+
prf: "bom-ref-to-prf"
83+
integ: "bom-ref-to-integ"
84+
ke: "bom-ref-to-ke"
85+
esn: true
86+
auth: "bom-ref-to-auth"
87+
}
88+
cryptoRef: "asset-4"
89+
}
90+
oid: "oid:1.2.3.4.5.6.7.8.9"
91+
}
92+
},
93+
{
94+
type: CLASSIFICATION_CRYPTOGRAPHIC_ASSET
95+
bom_ref: "asset-4"
96+
name: "Name here"
97+
cryptoProperties: {
98+
assetType: CRYPTO_ASSET_TYPE_RELATED_CRYPTO_MATERIAL
99+
relatedCryptoMaterialProperties: {
100+
type: CRYPTO_RELATED_TYPE_PRIVATE_KEY
101+
id: "12345"
102+
state: CRYPTO_RELATED_STATE_ACTIVE
103+
algorithmRef: "bom-ref-to-algorithm"
104+
creationDate {
105+
seconds: 1704067200
106+
nanos: 0
107+
}
108+
activationDate {
109+
seconds: 1704153600
110+
nanos: 0
111+
}
112+
updateDate {
113+
seconds: 1704240000
114+
nanos: 0
115+
}
116+
expirationDate {
117+
seconds: 1704326400
118+
nanos: 0
119+
}
120+
value: "Value here"
121+
size: 1024
122+
format: "PEM"
123+
securedBy: {
124+
mechanism: "HSM"
125+
algorithmRef: "bom-ref-to-algorithm"
126+
}
127+
}
128+
oid: "oid:1.2.3.4.5.6.7.8.9"
129+
}
130+
}
131+
]

0 commit comments

Comments
 (0)