Skip to content

[issue-915] use hex digit counts for BLAKE3 and MD6 checksums - #917

Open
itulo wants to merge 1 commit into
spdx:mainfrom
itulo:fix/issue-915-checksum-lengths
Open

itulo wants to merge 1 commit into
spdx:mainfrom
itulo:fix/issue-915-checksum-lengths

Conversation

@itulo

@itulo itulo commented Nov 30, 2026

Copy link
Copy Markdown

checksum_validator.py used bit counts as hex-digit quantifiers for BLAKE3 ("256,") and MD6 ("0,512"). A standard 256-bit BLAKE3 digest (64 hex digits) was rejected, and an empty MD6 value was accepted.

BLAKE3 now needs at least 64 hex digits (256 bits, the default output, which can be extended), and MD6 1 to 128 hex digits (at most 512 bits). The validation messages say the same.

Updated the two existing expected messages and added cases for a 64-digit BLAKE3, a 128-digit MD6, an empty MD6 and a 129-digit MD6. The full test suite passes, and isort/black/flake8 are clean.

Fixes #915

The validator used bit counts as hex digit quantifiers for BLAKE3
("256,") and MD6 ("0,512"). A standard 256-bit BLAKE3 digest
(64 hex digits) was rejected and an empty MD6 value was accepted.

BLAKE3 now needs at least 64 hex digits (256 bits) and MD6 between
1 and 128 hex digits (at most 512 bits).

Fixes spdx#915

Signed-off-by: Italo Armenti <italo.armenti@gmail.com>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

checksum_validator uses bit counts instead of hex lengths for BLAKE3 and MD6

1 participant