From 061895354b8af96fae443d3a2a7405a4b6ee1ae6 Mon Sep 17 00:00:00 2001 From: Joachim Vandersmissen Date: Fri, 27 Mar 2026 08:35:30 -0700 Subject: [PATCH] Add hash property to schema Many algorithms rely on hash functions. This commit adds an enum property and a list of commonly used hash or extendable output functions. Signed-off-by: Joachim Vandersmissen --- .../cyclonedx-cryptography-2.0.schema.json | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/schema/2.0/model/cyclonedx-cryptography-2.0.schema.json b/schema/2.0/model/cyclonedx-cryptography-2.0.schema.json index 4792c4ed..66b259d2 100644 --- a/schema/2.0/model/cyclonedx-cryptography-2.0.schema.json +++ b/schema/2.0/model/cyclonedx-cryptography-2.0.schema.json @@ -317,6 +317,47 @@ "unknown": "The padding scheme is not known." } }, + "hash": { + "type": "string", + "title": "Hash", + "description": "The hash or extendable output function that is used for the cryptographic algorithm.", + "enum": [ + "md5", + "sha-1", + "sha-224", + "sha-256", + "sha-384", + "sha-512", + "sha-512/224", + "sha-512/256", + "sha3-224", + "sha3-256", + "sha3-384", + "sha3-512", + "shake128", + "shake256", + "other", + "unknown" + ], + "meta:enum": { + "md5": "MD5 hash algorithm.", + "sha-1": "SHA-1 hash algorithm.", + "sha-224": "SHA-224 hash algorithm.", + "sha-256": "SHA-256 hash algorithm.", + "sha-384": "SHA-384 hash algorithm.", + "sha-512": "SHA-512 hash algorithm.", + "sha-512/224": "SHA-512/224 hash algorithm.", + "sha-512/256": "SHA-512/256 hash algorithm.", + "sha3-224": "SHA3-224 hash algorithm.", + "sha3-256": "SHA3-256 hash algorithm.", + "sha3-384": "SHA3-384 hash algorithm.", + "sha3-512": "SHA3-512 hash algorithm.", + "shake128": "SHAKE128 extendable output function.", + "shake256": "SHAKE256 extendable output function.", + "other": "Another hash or extendable output function.", + "unknown": "The hash or extendable output function is not known." + } + }, "cryptoFunctions": { "type": "array", "title": "Cryptographic functions",