Skip to content

Commit 54b6e3b

Browse files
committed
- Creates "cryptographicFunction" definition, used by algorithm/cryptoFunctions and relatedCryptoMaterial/keyUsage
- Makes sure meta:enum descriptions are added for new definitions in the PR - Adds riscv64/riscv32 to implementation platforms Signed-off-by: Basil Hess <bhe@zurich.ibm.com>
1 parent daa4052 commit 54b6e3b

1 file changed

Lines changed: 88 additions & 49 deletions

File tree

schema/2.0/model/cyclonedx-cryptography-2.0.schema.json

Lines changed: 88 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,29 @@
140140
"s390x",
141141
"ppc64",
142142
"ppc64le",
143+
"riscv32",
144+
"riscv64",
143145
"other",
144146
"unknown"
145-
]
147+
],
148+
"meta:enum": {
149+
"generic": "Platform-independent implementation.",
150+
"x86_32": "Intel/AMD 32-bit x86 architecture.",
151+
"x86_64": "Intel/AMD 64-bit x86-64 architecture.",
152+
"armv7-a": "ARM 32-bit application profile (Cortex-A).",
153+
"armv7-m": "ARM 32-bit microcontroller profile (Cortex-M).",
154+
"armv8-a": "ARM 64-bit application profile (AArch64).",
155+
"armv8-m": "ARM 32-bit microcontroller with TrustZone.",
156+
"armv9-a": "ARM 64-bit with enhanced security features.",
157+
"armv9-m": "ARM microcontroller with advanced security.",
158+
"s390x": "IBM Z series mainframe 64-bit.",
159+
"ppc64": "IBM PowerPC 64-bit big-endian.",
160+
"ppc64le": "IBM PowerPC 64-bit little-endian.",
161+
"riscv32": "RISC-V 32-bit open standard architecture.",
162+
"riscv64": "RISC-V 64-bit open standard architecture.",
163+
"other": "Another platform.",
164+
"unknown": "The platform is not known."
165+
}
146166
}
147167
},
148168
"certificationLevel": {
@@ -239,15 +259,23 @@
239259
"unknown"
240260
],
241261
"meta:enum": {
242-
"cbc": "Cipher block chaining",
243-
"ecb": "Electronic codebook",
244-
"ccm": "Counter with cipher block chaining message authentication code",
245-
"gcm": "Galois/counter",
246-
"cfb": "Cipher feedback",
247-
"ofb": "Output feedback",
248-
"ctr": "Counter",
249-
"other": "Another mode of operation",
250-
"unknown": "The mode of operation is not known"
262+
"cbc": "Cipher Block Chaining mode.",
263+
"ecb": "Electronic Codebook mode.",
264+
"ccm": "Counter with CBC-MAC (AEAD).",
265+
"gcm": "Galois/Counter Mode (AEAD).",
266+
"cfb": "Cipher Feedback mode.",
267+
"ofb": "Output Feedback mode.",
268+
"ctr": "Counter mode.",
269+
"siv": "Synthetic Initialization Vector mode.",
270+
"gcm-siv": "GCM with Synthetic IV (nonce-misuse resistant).",
271+
"ocb": "Offset Codebook Mode (AEAD).",
272+
"eax": "Encrypt-then-Authenticate-then-Translate mode.",
273+
"kw": "AES Key Wrap (RFC 3394).",
274+
"kwp": "AES Key Wrap with Padding (RFC 5649).",
275+
"cts": "Ciphertext Stealing mode.",
276+
"xts": "XEX Tweaked-codebook with Stealing (disk encryption).",
277+
"other": "Another mode of operation.",
278+
"unknown": "The mode is not known."
251279
}
252280
},
253281
"padding": {
@@ -265,37 +293,22 @@
265293
"unknown"
266294
],
267295
"meta:enum": {
268-
"pkcs5": "Public Key Cryptography Standard: Password-Based Cryptography",
269-
"pkcs7": "Public Key Cryptography Standard: Cryptographic Message Syntax",
270-
"pkcs1v15": "Public Key Cryptography Standard: RSA Cryptography v1.5",
271-
"oaep": "Optimal asymmetric encryption padding",
272-
"raw": "Raw",
273-
"other": "Another padding scheme",
274-
"unknown": "The padding scheme is not known"
296+
"pkcs5": "PKCS#5 padding for password-based cryptography.",
297+
"pkcs7": "PKCS#7 padding with length-indicating bytes.",
298+
"pkcs1v15": "PKCS#1 v1.5 padding for RSA.",
299+
"oaep": "Optimal Asymmetric Encryption Padding for RSA.",
300+
"raw": "No padding applied.",
301+
"pss": "Probabilistic Signature Scheme for RSA signatures.",
302+
"other": "Another padding scheme.",
303+
"unknown": "The padding scheme is not known."
275304
}
276305
},
277306
"cryptoFunctions": {
278307
"type": "array",
279308
"title": "Cryptographic functions",
280309
"description": "The cryptographic functions implemented by the cryptographic algorithm.",
281310
"items": {
282-
"type": "string",
283-
"enum": [
284-
"generate",
285-
"keygen",
286-
"encrypt",
287-
"decrypt",
288-
"digest",
289-
"tag",
290-
"keyderive",
291-
"sign",
292-
"verify",
293-
"encapsulate",
294-
"decapsulate",
295-
"keyagree",
296-
"other",
297-
"unknown"
298-
]
311+
"$ref": "#/$defs/cryptographicFunction"
299312
}
300313
},
301314
"classicalSecurityLevel": {
@@ -703,22 +716,9 @@
703716
"title": "Key Usage",
704717
"description": "Defines the permitted cryptographic usage for the asset.",
705718
"items": {
706-
"type": "string",
719+
"$ref": "#/$defs/cryptographicFunction",
707720
"title": "Usage",
708-
"description": "A permitted cryptographic usage.",
709-
"examples": [
710-
"CIPHER",
711-
"DECIPHER",
712-
"DERIVE",
713-
"GENERATE",
714-
"SIGN",
715-
"VERIFY",
716-
"WRAP",
717-
"UNWRAP",
718-
"ENCRYPT",
719-
"DECRYPT",
720-
"MAC"
721-
]
721+
"description": "A permitted cryptographic usage."
722722
}
723723
}
724724
}
@@ -1027,6 +1027,45 @@
10271027
}
10281028
}
10291029
},
1030+
"cryptographicFunction": {
1031+
"type": "string",
1032+
"title": "Cryptographic Function",
1033+
"description": "A cryptographic function or usage.",
1034+
"enum": [
1035+
"generate",
1036+
"keygen",
1037+
"encrypt",
1038+
"decrypt",
1039+
"digest",
1040+
"tag",
1041+
"keyderive",
1042+
"sign",
1043+
"verify",
1044+
"encapsulate",
1045+
"decapsulate",
1046+
"keyagree",
1047+
"wrap",
1048+
"other",
1049+
"unknown"
1050+
],
1051+
"meta:enum": {
1052+
"generate": "Generates random data, IVs, or nonces.",
1053+
"keygen": "Generates cryptographic keys.",
1054+
"encrypt": "Transforms plaintext into ciphertext.",
1055+
"decrypt": "Transforms ciphertext into plaintext.",
1056+
"digest": "Computes a hash value from input data.",
1057+
"tag": "Generates an authentication tag for data integrity.",
1058+
"keyderive": "Derives keys from another key or shared secret.",
1059+
"sign": "Creates a digital signature using a private key.",
1060+
"verify": "Verifies a digital signature using a public key.",
1061+
"encapsulate": "Encapsulates a secret using a public key (KEM).",
1062+
"decapsulate": "Decapsulates a secret using a private key (KEM).",
1063+
"keyagree": "Derives a shared secret between parties.",
1064+
"wrap": "Encrypts a key for secure storage or transport.",
1065+
"other": "Another cryptographic function.",
1066+
"unknown": "The cryptographic function is not known."
1067+
}
1068+
},
10301069
"relatedCryptographicAssets": {
10311070
"type": "array",
10321071
"title": "Related Cryptographic Assets",

0 commit comments

Comments
 (0)