Skip to content

Add missing key length to CMAC pattern - #1234

Open
jay23606 wants to merge 1 commit into
CycloneDX:masterfrom
jay23606:pr-go-simple/866
Open

jay23606 wants to merge 1 commit into
CycloneDX:masterfrom
jay23606:pr-go-simple/866

Conversation

@jay23606

@jay23606 jay23606 commented Nov 20, 2026 •

Copy link
Copy Markdown

The CMAC variant pattern in schema/cryptography-defs.json was CMAC[-{cipherAlgorithm}][-{length}], which gave no way to express the key length (128, 192, or 256). This adds a [-{keyLength}] segment before the existing {length} segment, matching the convention used by CTR_DRBG and the other key-sized families. The existing {length} segment is kept unchanged, so the change is additive.

Tests: I checked that the file still parses as JSON and that the CMAC pattern reads as CMAC[-{cipherAlgorithm}][-{keyLength}][-{length}]. I did not run the Java or JS schema test suites locally because I did not install dependencies; CI runs them. No existing test covers the CMAC pattern string, so I did not add a regression test.

🤖 Generated with Claude Code

Tests not run here: Java schema tests (tools/src/test/java/org/cyclonedx/schema/JsonSchemaVerificationTest.java): not run; would need Maven/Gradle dependencies, which I was told not to install. CI runs them., JS functional tests (tools/src/test/js/json-schema-functional-tests.js): not run; needs npm dependencies, which I was told not to install. CI runs them.

Fixes #866

🤖 Generated with Claude Code

@jkowalleck jkowalleck added defect cap: cryptography-registry Capability: Cryptography Registry labels Nov 20, 2026
@jkowalleck
jkowalleck requested a review from bhess November 20, 2026 10:05
@bhess

bhess commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Thanks for the PR. In my understanding the key length would be determined by cipherAlgorithm though (e.g., AES-256) which already encodes the key length.

Signed-off-by: jay23606 <4602056+jay23606@users.noreply.github.com>
@jay23606
jay23606 marked this pull request as ready for review November 20, 2026 11:28
@jay23606
jay23606 requested a review from a team as a code owner November 20, 2026 11:28

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cap: cryptography-registry Capability: Cryptography Registry defect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Defect]: CMAC missing key length

3 participants