Skip to content

Commit 3883f08

Browse files
committed
feat(crypto): support standardized algorithm identifiers
CycloneDX 1.7 distinguishes schema-defined families and curves while older consumers still depend on free-form curve metadata. Derive the accepted cases from the bundled schema and gate standardized serialization to the new view. Preserve the legacy value through comparison and rendering, then exercise strict schema output and downgrade behavior.
1 parent cf392e0 commit 3883f08

10 files changed

Lines changed: 8688 additions & 13 deletions

cyclonedx/model/crypto.py

Lines changed: 390 additions & 12 deletions
Large diffs are not rendered by default.

tests/_data/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@
7171
from cyclonedx.model.crypto import (
7272
AlgorithmProperties,
7373
CertificateProperties,
74+
CryptoAlgorithmFamily,
7475
CryptoAssetType,
7576
CryptoCertificationLevel,
77+
CryptoEllipticCurve,
7678
CryptoExecutionEnvironment,
7779
CryptoFunction,
7880
CryptoImplementationPlatform,
@@ -171,8 +173,10 @@ def get_crypto_properties_algorithm() -> CryptoProperties:
171173
asset_type=CryptoAssetType.ALGORITHM,
172174
algorithm_properties=AlgorithmProperties(
173175
primitive=CryptoPrimitive.KEM,
176+
algorithm_family=CryptoAlgorithmFamily.ML_KEM,
174177
parameter_set_identifier='a-parameter-set-id',
175178
curve='9n8y2oxty3ao83n8qc2g2x3qcw4jt4wj',
179+
elliptic_curve=CryptoEllipticCurve.NIST_P_256,
176180
execution_environment=CryptoExecutionEnvironment.SOFTWARE_PLAIN_RAM,
177181
implementation_platform=CryptoImplementationPlatform.GENERIC,
178182
certification_levels=[

0 commit comments

Comments
 (0)