Skip to content

Commit 20e189c

Browse files
committed
tests: streamline test data
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
1 parent d60ff1d commit 20e189c

File tree

2 files changed

+106
-55
lines changed

2 files changed

+106
-55
lines changed
Lines changed: 103 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,120 @@
11
# proto-file: schema/bom-1.7.proto
22
# proto-message: Bom
33

4-
# proto-file: schema/bom-1.7.proto
5-
# proto-message:
6-
74
spec_version: "1.7"
85
version: 1
96
serial_number: "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79"
10-
metadata: {
11-
component: {
7+
8+
metadata {
9+
component{
1210
type: CLASSIFICATION_APPLICATION
1311
bom_ref: "acme-application"
1412
name: "Acme Application"
1513
version: "1.0"
1614
}
1715
}
18-
components: [
19-
{
20-
type: CLASSIFICATION_CRYPTOGRAPHIC_ASSET
21-
bom_ref: "aes128gcm"
22-
name: "AES"
23-
cryptoProperties: {
24-
assetType: CRYPTO_ASSET_TYPE_ALGORITHM
25-
algorithmProperties: {
26-
primitive: CRYPTO_PRIMITIVE_AE
27-
parameterSetIdentifier: "128"
28-
executionEnvironment: CRYPTO_EXECUTION_ENVIRONMENT_SOFTWARE_PLAIN_RAM
29-
implementationPlatform: CRYPTO_IMPLEMENTATION_PLATFORM_X86_64
30-
certificationLevel: [ "none" ],
31-
mode: CRYPTO_ALGORITHM_MODE_GCM
32-
cryptoFunctions: [
33-
CRYPTO_ALGORITHM_FUNCTION_KEYGEN,
34-
CRYPTO_ALGORITHM_FUNCTION_ENCRYPT,
35-
CRYPTO_ALGORITHM_FUNCTION_DECRYPT,
36-
CRYPTO_ALGORITHM_FUNCTION_TAG
37-
]
38-
classicalSecurityLevel: 128
39-
nistQuantumSecurityLevel: 1
40-
},
41-
oid: "oid:2.16.840.1.101.3.4.1.7"
16+
17+
components {
18+
type: CLASSIFICATION_CRYPTOGRAPHIC_ASSET
19+
name: "AES-128-GCM-128-12"
20+
cryptoProperties{
21+
assetType: CRYPTO_ASSET_TYPE_ALGORITHM
22+
algorithmProperties{
23+
algorithmFamily: "AES"
24+
primitive: CRYPTO_PRIMITIVE_AE
25+
parameterSetIdentifier: "128"
26+
mode: CRYPTO_ALGORITHM_MODE_GCM
27+
executionEnvironment: CRYPTO_EXECUTION_ENVIRONMENT_SOFTWARE_PLAIN_RAM
28+
implementationPlatform: CRYPTO_IMPLEMENTATION_PLATFORM_X86_64
29+
certificationLevel: "none"
30+
cryptoFunctions: CRYPTO_ALGORITHM_FUNCTION_KEYGEN
31+
cryptoFunctions: CRYPTO_ALGORITHM_FUNCTION_ENCRYPT
32+
cryptoFunctions: CRYPTO_ALGORITHM_FUNCTION_DECRYPT
33+
cryptoFunctions: CRYPTO_ALGORITHM_FUNCTION_TAG
34+
classicalSecurityLevel: 128
35+
nistQuantumSecurityLevel: 1
36+
}
37+
oid: "2.16.840.1.101.3.4.1.6"
38+
}
39+
}
40+
components {
41+
name: "RSA-PKCS1-1.5-SHA512-2048"
42+
type: CLASSIFICATION_CRYPTOGRAPHIC_ASSET
43+
cryptoProperties{
44+
assetType: CRYPTO_ASSET_TYPE_ALGORITHM
45+
algorithmProperties{
46+
algorithmFamily: "RSASSA-PKCS1"
47+
primitive: CRYPTO_PRIMITIVE_SIGNATURE
48+
parameterSetIdentifier: "512"
49+
executionEnvironment: CRYPTO_EXECUTION_ENVIRONMENT_SOFTWARE_PLAIN_RAM
50+
implementationPlatform: CRYPTO_IMPLEMENTATION_PLATFORM_X86_64
51+
certificationLevel: "none"
52+
cryptoFunctions: CRYPTO_ALGORITHM_FUNCTION_SIGN
53+
cryptoFunctions: CRYPTO_ALGORITHM_FUNCTION_VERIFY
54+
nistQuantumSecurityLevel: 0
55+
}
56+
oid: "1.2.840.113549.1.1.13"
57+
}
58+
}
59+
components {
60+
name: "ECDH-secp521r1"
61+
bom_ref: "ecdhsecp521r1"
62+
type: CLASSIFICATION_CRYPTOGRAPHIC_ASSET
63+
cryptoProperties{
64+
assetType: CRYPTO_ASSET_TYPE_ALGORITHM
65+
algorithmProperties{
66+
algorithmFamily: "ECDH"
67+
ellipticCurve: "secg/secp521r1"
68+
primitive: CRYPTO_PRIMITIVE_KEY_AGREE
69+
executionEnvironment: CRYPTO_EXECUTION_ENVIRONMENT_SOFTWARE_PLAIN_RAM
70+
implementationPlatform: CRYPTO_IMPLEMENTATION_PLATFORM_X86_64
71+
certificationLevel: "none"
72+
cryptoFunctions: CRYPTO_ALGORITHM_FUNCTION_KEYGEN
73+
cryptoFunctions: CRYPTO_ALGORITHM_FUNCTION_KEYDERIVE
74+
nistQuantumSecurityLevel: 0
4275
}
43-
},
44-
{
45-
type: CLASSIFICATION_LIBRARY
46-
bom_ref: "crypto-library"
47-
name: "Crypto library"
48-
version: "1.0.0"
49-
},
50-
{
51-
type: CLASSIFICATION_LIBRARY
52-
bom_ref: "some-library"
53-
name: "Some library"
54-
version: "1.0.0"
76+
oid: "1.3.132.0.35"
5577
}
56-
],
57-
dependencies: [
58-
{
59-
ref: "acme-application"
60-
dependencies {
61-
ref: "crypto-library"
78+
}
79+
components {
80+
name: "ML-KEM-1024"
81+
bom_ref: "mlkem1024"
82+
type: "cryptographic-asset"
83+
cryptoProperties{
84+
assetType: "algorithm"
85+
algorithmProperties{
86+
algorithmFamily: "ML-KEM"
87+
primitive: "kem"
88+
executionEnvironment: "software-plain-ram"
89+
implementationPlatform: "x86_64"
90+
certificationLevel: ["none"]
91+
cryptoFunctions: ["keygen", "keyderive"]
92+
nistQuantumSecurityLevel: 5
6293
}
63-
},
64-
{
65-
ref: "crypto-library"
66-
provides: [ "aes128gcm" ]
67-
dependencies {
68-
ref: "some-library"
94+
oid: "2.16.840.1.101.3.4.1.48"
95+
}
96+
}
97+
components {
98+
name: "draft-ietf-tls-hybrid-design-13"
99+
bom_ref: "draftietftlshybriddesign13"
100+
type: CLASSIFICATION_CRYPTOGRAPHIC_ASSET
101+
cryptoProperties{
102+
assetType: CRYPTO_ASSET_TYPE_ALGORITHM
103+
algorithmProperties{
104+
primitive: CRYPTO_PRIMITIVE_COMBINER
105+
executionEnvironment: CRYPTO_EXECUTION_ENVIRONMENT_SOFTWARE_PLAIN_RAM
106+
implementationPlatform: CRYPTO_IMPLEMENTATION_PLATFORM_X86_64
107+
certificationLevel: "none"
108+
cryptoFunctions: CRYPTO_ALGORITHM_FUNCTION_KEYGEN
109+
cryptoFunctions: CRYPTO_ALGORITHM_FUNCTION_KEYDERIVE
110+
nistQuantumSecurityLevel: 0
69111
}
112+
oid: "1.3.101.110"
70113
}
71-
]
114+
}
115+
116+
dependencies {
117+
ref: "draftietftlshybriddesign13"
118+
dependencies { ref: "mlkem1024" }
119+
dependencies { ref: "ecdhsecp521r1" }
120+
}

tools/src/test/resources/1.7/valid-cryptography-implementation-1.7.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0"?>
2-
<bom serialNumber="urn:uuid:e8c355aa-2142-4084-a8c7-6d42c8610ba2" version="1" xmlns="http://cyclonedx.org/schema/bom/1.7">
2+
<bom serialNumber="urn:uuid:e8c355aa-2142-4084-a8c7-6d42c8610ba2" version="1"
3+
xmlns="http://cyclonedx.org/schema/bom/1.7"
4+
>
35
<metadata>
46
<component type="application" bom-ref="acme-application">
57
<name>Acme Application</name>

0 commit comments

Comments
 (0)