Skip to content

Commit 6ed75da

Browse files
committed
test resources
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 1a6ae86 commit 6ed75da

7 files changed

+393
-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: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,14 @@
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+
},
75+
"cryptoRefArray": ["asset-4"]
6976
},
7077
"oid": "oid:1.2.3.4.5.6.7.8.9"
7178
}

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

Lines changed: 9 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,13 @@ 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+
}
86+
cryptoRef: "asset-4"
8087
}
8188
oid: "oid:1.2.3.4.5.6.7.8.9"
8289
}

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,28 @@
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+
</ikev2TransformTypes>
63+
<cryptoRef>asset-4</cryptoRef>
64+
</protocolProperties>
4365
<oid>oid:1.2.3.4.5.6.7.8.9</oid>
4466
</cryptoProperties>
4567
</component>
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
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+
},
75+
"cryptoRefArray": ["asset-4"]
76+
},
77+
"oid": "oid:1.2.3.4.5.6.7.8.9"
78+
}
79+
},
80+
{
81+
"type": "cryptographic-asset",
82+
"bom-ref": "asset-4",
83+
"name": "Name here",
84+
"cryptoProperties": {
85+
"assetType": "related-crypto-material",
86+
"relatedCryptoMaterialProperties": {
87+
"type": "private-key",
88+
"id": "12345",
89+
"state": "active",
90+
"algorithmRef": "bom-ref-to-algorithm",
91+
"creationDate": "2024-01-01T00:00:00.000Z",
92+
"activationDate": "2024-01-02T00:00:00.000Z",
93+
"updateDate": "2024-01-03T00:00:00.000Z",
94+
"expirationDate": "2024-01-04T00:00:00.000Z",
95+
"value": "Value here",
96+
"size": 1024,
97+
"format": "PEM",
98+
"securedBy": {
99+
"mechanism": "HSM",
100+
"algorithmRef": "bom-ref-to-algorithm"
101+
}
102+
},
103+
"oid": "oid:1.2.3.4.5.6.7.8.9"
104+
}
105+
}
106+
]
107+
}
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
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+
}
86+
cryptoRef: "asset-4"
87+
}
88+
oid: "oid:1.2.3.4.5.6.7.8.9"
89+
}
90+
},
91+
{
92+
type: CLASSIFICATION_CRYPTOGRAPHIC_ASSET
93+
bom_ref: "asset-4"
94+
name: "Name here"
95+
cryptoProperties: {
96+
assetType: CRYPTO_ASSET_TYPE_RELATED_CRYPTO_MATERIAL
97+
relatedCryptoMaterialProperties: {
98+
type: CRYPTO_RELATED_TYPE_PRIVATE_KEY
99+
id: "12345"
100+
state: CRYPTO_RELATED_STATE_ACTIVE
101+
algorithmRef: "bom-ref-to-algorithm"
102+
creationDate {
103+
seconds: 1704067200
104+
nanos: 0
105+
}
106+
activationDate {
107+
seconds: 1704153600
108+
nanos: 0
109+
}
110+
updateDate {
111+
seconds: 1704240000
112+
nanos: 0
113+
}
114+
expirationDate {
115+
seconds: 1704326400
116+
nanos: 0
117+
}
118+
value: "Value here"
119+
size: 1024
120+
format: "PEM"
121+
securedBy: {
122+
mechanism: "HSM"
123+
algorithmRef: "bom-ref-to-algorithm"
124+
}
125+
}
126+
oid: "oid:1.2.3.4.5.6.7.8.9"
127+
}
128+
}
129+
]

0 commit comments

Comments
 (0)