Skip to content

[1.7] - Updates from CBOM working group #657

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 41 commits into
base: 1.7-dev
Choose a base branch
from

Conversation

stevespringett
Copy link
Member

@stevespringett stevespringett commented Jul 1, 2025

The cryptography working group has received feedback from real-world usage and have made some minor enhancements to the CBOM specificaiton.

Closes #569


RFC notice sent 2025-07-26
This RFC will be open for 4 weeks. At the end of the RFC period the CycloneDX community will vote, by lazy consensus, to accept or reject the proposal.
RFC period end: 2025-08-23


TODO/DONE

  • add examples for XML
  • add examples for JSON
  • add examples for ProtoBuf
  • implement for XML
  • implement for JSON
  • implement for ProtoBuf

stevespringett and others added 21 commits March 21, 2025 22:07
- Adds a few more algorithm
- Converts urls to standards to doi links, where available.
- Checks if urls work

Signed-off-by: Basil Hess <[email protected]>
- Adds a few more algorithm
- Converts urls to standards to doi links, where available.
- Checks if urls work

----

TODO / progress
- [x] JSON schema
- [ ] XML schema
- [ ] ProtoBugf schema

<!-- 
Thank you for taking the time to develop and contribute a core
enhancement or fix for a defect!

We kindly request that you create pull requests only for things that
have been discussed in a ticket first; exceptions may be made for
spelling or grammar fixes.
Read more about the process here:
https://cyclonedx.org/participate/standardization-process/#working-model

Please have the related ticket/issue ID ready. 
If there is none, feel free to create a new ticket:
https://github.com/CycloneDX/specification/issues/new/choose

-->

<!-- 

Please provide a brief description of what this pull request intends to
do and which ticket it fixes/closes.
Example: 
> As discussed in ticket #485, this PR adds Streebog to the hash
algorithm enum.
>
> fixes #485 

In case this is for a spelling or grammar improvement, please provide a
brief description.
Example:
> Fixe typo: color(AE) -> colour(BE)

-->
Signed-off-by: Basil Hess <[email protected]>
- Changes schma for crypto-defs to allow different variant patterns corresponding to different primitives
- Adds "key-wrap" as a new primitive

Signed-off-by: Basil Hess <[email protected]>
- Extends cryptography-defs.json list with algorithms from PKCS11
- Changes schma for crypto-defs to allow different variant patterns
corresponding to different primitives
- Adds "key-wrap" as a new primitive
{placeholder} -> required parameter with placeholder
(option1|option2) -> required parameter with fixed alternatives
[parameter] -> optional parameter
[-{placeholder}] -> optional paremeter with literal separator

Signed-off-by: Basil Hess <[email protected]>
Signed-off-by: Basil Hess <[email protected]>
This PR will add a python script that can be used to generate an
enum-object for the cyclonedx json schema that reflects algorithm
families defined in `cryptography-defs.json`.
The following rules apply for the patterns:

{placeholder} -> required parameter with placeholder
(option1|option2) -> required parameter with fixed alternatives 
[parameter] -> optional parameter
[-{placeholder}] -> optional parameter with literal separator

<!-- 
Thank you for taking the time to develop and contribute a core
enhancement or fix for a defect!

We kindly request that you create pull requests only for things that
have been discussed in a ticket first; exceptions may be made for
spelling or grammar fixes.
Read more about the process here:
https://cyclonedx.org/participate/standardization-process/#working-model

Please have the related ticket/issue ID ready. 
If there is none, feel free to create a new ticket:
https://github.com/CycloneDX/specification/issues/new/choose

-->

<!-- 

Please provide a brief description of what this pull request intends to
do and which ticket it fixes/closes.
Example: 
> As discussed in ticket #485, this PR adds Streebog to the hash
algorithm enum.
>
> fixes #485 

In case this is for a spelling or grammar improvement, please provide a
brief description.
Example:
> Fixe typo: color(AE) -> colour(BE)

-->
@stevespringett stevespringett added this to the 1.7 milestone Jul 1, 2025
stevespringett and others added 6 commits June 30, 2025 20:46
It looks like we missed some key changes from the `1.7-dev-cryptography`
branch. This PR will put them back in. Thanks @JoeyLupo for pointing
that out!
@jkowalleck jkowalleck changed the title Updates from CBOM working group [1.7] - Updates from CBOM working group Jul 3, 2025
Signed-off-by: steve.springett <[email protected]>
bhess and others added 11 commits July 17, 2025 10:43
- Schema fix: Define items in ikeV2 arrays
- Schema extension: in protocolProperties/cipherSuites, adds explicit tlsGroups and tlsSignatureSchemes properties
- Updates valid-cryptography-full-1.7 and valid-cryptography-implementation.1.7 test cases

Signed-off-by: Basil Hess <[email protected]>
Signed-off-by: Basil Hess <[email protected]>
Signed-off-by: Basil Hess <[email protected]>
Signed-off-by: Basil Hess <[email protected]>
Signed-off-by: Basil Hess <[email protected]>
Update schema test cases and fix validation issues for 1.7 CBOM.

This PR addresses two schema validation issues discovered while running
ajv on the test cases:
- ikev2TransformTypes: The array items were missing type definitions.
This has been corrected.
- certificateExtensions: The oneOf clause defined two objects
(commonExtensions and customExtensions) with overlapping property names,
which caused validation errors. The property names have been made unique
within each object to resolve this.

Additionally, two new properties have been added to
cryptoProperties.cipherSuites to support more precise TLS
configurations: tlsGroups and tlsSignatureSchemes.

<!-- 
Thank you for taking the time to develop and contribute a core
enhancement or fix for a defect!

We kindly request that you create pull requests only for things that
have been discussed in a ticket first; exceptions may be made for
spelling or grammar fixes.
Read more about the process here:
https://cyclonedx.org/participate/standardization-process/#working-model

Please have the related ticket/issue ID ready. 
If there is none, feel free to create a new ticket:
https://github.com/CycloneDX/specification/issues/new/choose

-->

<!-- 

Please provide a brief description of what this pull request intends to
do and which ticket it fixes/closes.
Example: 
> As discussed in ticket #485, this PR adds Streebog to the hash
algorithm enum.
>
> fixes #485 

In case this is for a spelling or grammar improvement, please provide a
brief description.
Example:
> Fixe typo: color(AE) -> colour(BE)

-->
Signed-off-by: Steve Springett <[email protected]>
Signed-off-by: Steve Springett <[email protected]>
Signed-off-by: Steve Springett <[email protected]>
Signed-off-by: Steve Springett <[email protected]>
@stevespringett
Copy link
Member Author

This is ready for review.

  1. A new schema was introduced which the Java tool does not currently support. This is causing the build to fail.
  2. The ikev2TransformTypes implemented in v1.6 was defective and could not be used as is. This has since been corrected in all three serialization formats. However, the protobuf check is failing because of this. Technically, it is a breaking change, but it was impossible to use the feature in v1.6, so it needed to be resolved.

@stevespringett stevespringett marked this pull request as ready for review July 25, 2025 21:22
@stevespringett stevespringett requested a review from a team as a code owner July 25, 2025 21:22
@stevespringett
Copy link
Member Author

This PR introduces the following:

  • A new schema and corresponding JSON datafile which provides an authoritative source for algorithm families and all known elliptic curves. These schemas may additionally be used outside of CycloneDX, such as in static code analysis.

    • Algorithm families defines the the algorithm along with all the variants that are supported. It leverages the data available from the standard that defines the algorithm.
    • This subschema will only be available in JSON and may be updated independent of the core CycloneDX specification, much like the spdx subschema.
  • Certificates:

    • Added support for certificate extensions, both common and custom extensions are supported.
    • Added support for certificate fingerprints.
    • Added support for certificate lifecycle management, via certificateState and introduced additional timestamps such as:
      • creationDate
      • activationDate
      • deactivationDate
      • revocationDate
      • destructionDate
  • Added additional protocols requested by ATIS so that cryptographic assets could be represented across the mobile telecommunications industry.

  • Corrected ikev2TransformTypes which was introduced in v1.6 in a way that could not be used. This has been resolved in v1.7.

  • Several simplifications have been made resulting in the deprecation of multiple properties. These will be removed in CycloneDX v2.0

@stevespringett stevespringett added request for comment RFC notice sent A public RFC notice was distributed to the CycloneDX mailing list for consideration labels Jul 25, 2025
"variant": {
"type": "array",
"title": "Variants",
"description": "Defines algorithm variants by a naming pattern and the corrsponding cryptographic primitive.",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo corrsponding

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"description": "Defines algorithm variants by a naming pattern and the corrsponding cryptographic primitive.",
"description": "Defines algorithm variants by a naming pattern and the corresponding cryptographic primitive.",

"title": "Standard Name",
"description": "Defines the pattern used to construct the complete algorithm name. Placeholders are defined by {} for algorithm-specific properties."
},
"primitive": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this attribute be made an enum?

"additionalProperties": false,
"properties": {
"category": {
"type": "string",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this become an enum as well? Some of the values could be "nist", "secg", "x963", and "other".

"title": "OID",
"description": "The Object Identifier (OID) of the elliptic curve."
},
"form": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My knowledge on this is quite limited. It appears like we are capturing the form of the equation but not the field type. Based on the below document, an enum called fieldType could be added with the values prime and binary. This would help with categorization.

https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-186.pdf

"Montgomery"
]
},
"aliases": {
Copy link
Contributor

@prabhu prabhu Jul 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to aliases, it will be nice to have a much simpler way to compare the forms like 128 bits, 256 bits etc (computational effort to break). Often these values are approximate but could be still useful. The attribute could be an integer with the name securityBits or keyLength.

"title": "Last Updated",
"description": "The date and time (timestamp) when the data was last updated."
},
"algorithms": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We capture the algorithms, but do not communicate the production status.

An explicit attribute status with enum values such as legacy, active, evaluation, deprecated would help.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the same line of thought, it will be nice to communicate some known risks associated with an algorithm. Examples:

timing-attack
replay-attack
side-channel attack

It could be argued that often such risks are due to the implementations. In such cases, an example of a CBOM with components and dependencies.provides to illustrate implementation risks would be perfect.

],
"variant": [
{
"pattern": "RSA-PKCS1-1.5[-{digestAlgorithm}][-{keyLength}]",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is new to me. We're using placeholders in the pattern string for the first time? To keep the specification consistent, can we define the list of allowed placeholders to help implementation tools? ChatGPT is suggesting an attribute as below:

{
  "pattern": {
    "type": "string",
    "title": "Pattern",
    "description": "Defines the pattern used to construct the complete algorithm name. Placeholders are defined by {} for standardized algorithm-specific properties.",
    // This regex enforces that any placeholder {} contains only one of the predefined standard names.
    // Note: This is a simplified example and might need adjustment for edge cases like escaping or nested brackets.
    "pattern": "^([^{}]|\\{((keyLength)|(mode)|(digestAlgorithm)|(hashFunction)|(saltLength)|(ellipticCurve)|(securityLevel)|(function)|(padding)|(tagLength)|(ivLength)|(primitive))\\})*$"
  }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CDX 1.7 related to release v1.7 proposed core enhancement request for comment RFC notice sent A public RFC notice was distributed to the CycloneDX mailing list for consideration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants