Skip to content

Clarify that non-cryptographic digests may use custom value encoding#517

Merged
marcelamelara merged 2 commits intoin-toto:mainfrom
marcelamelara:clarify-non-crypto-digest-format
Mar 11, 2026
Merged

Clarify that non-cryptographic digests may use custom value encoding#517
marcelamelara merged 2 commits intoin-toto:mainfrom
marcelamelara:clarify-non-crypto-digest-format

Conversation

@marcelamelara
Copy link
Copy Markdown
Contributor

This PR adds a short clarification in the DigestSet spec stating that non-cryptographic digests may use custom value encoding.

Fixes #499

@marcelamelara marcelamelara requested a review from a team as a code owner December 22, 2025 19:33
Comment thread spec/v1/digest_set.md Outdated
- `{"sha256": "abcd", "sha512": "1234"}` matches `{"sha256": "abcd"}`
- `{"sha256": "abcd"}` does not match `{"sha256": "fedb", "sha512": "abcd"}`
- `{"somecoolhash": "abcd"}` uses a non-predefined algorithm
- `{"arn": "arn:aws:ec2:region:123:image/ami-123abcd"}` for a non-cryptographic VM image digest using an Amazon Resource Name (ARN)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In this specific case, shouldn't the arn go into the uri field? (since arns are urns which are uris).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In ordinary ResourceDescriptors yes, but because the RD of the Subject field has some extra restrictions that require a digest to be set, that's the case we're covering here. I can add a note explaining this here, if you think that would help.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Also note that "Each element MUST have digest set." and "IMPORTANT: Subject artifacts are matched purely by digest, regardless of content type. If this matters to you, please comment on #28" link

And this reference in the SLSA source spec that shows using a URI in the field: https://slsa.dev/spec/v1.2/source-requirements#source-verification-summary-attestation:~:text=For%20example%3A%20svn_revision_id%3A%20svn%2Bhttps%3A//svn.myproject.org/svn/MyProject/trunk%402019

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sounds good. I was looking at it from the point of view of something trying to locate attestations applicable to the arn. If I was starting with the arn, I would locate statements based on the arn in the uri, and then match the artifacts based on the contents of the digests.

Signed-off-by: Marcela Melara <marcela.melara@intel.com>
@marcelamelara marcelamelara force-pushed the clarify-non-crypto-digest-format branch from 828c682 to f032e7a Compare January 27, 2026 23:49
Signed-off-by: Marcela Melara <marcela.melara@intel.com>
@marcelamelara marcelamelara merged commit ad76f68 into in-toto:main Mar 11, 2026
3 checks passed
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.

Referencing cloud provider VM images

3 participants