Skip to content

Encode Rekor v2 DSSE envelopes as hashedrekord#627

Merged
Hayden-IO merged 3 commits into
sigstore:mainfrom
codysoyland:rekor-v2-dsse-as-hashedrekord
Jun 2, 2026
Merged

Encode Rekor v2 DSSE envelopes as hashedrekord#627
Hayden-IO merged 3 commits into
sigstore:mainfrom
codysoyland:rekor-v2-dsse-as-hashedrekord

Conversation

@codysoyland

@codysoyland codysoyland commented May 14, 2026

Copy link
Copy Markdown
Member

Summary

Implements the encoding proposed in sigstore/architecture-docs#63 (rekor-v2-spec §6.1.4): on Rekor v2, DSSE envelopes are uploaded as a hashedrekord whose digest covers Hash(PAE(payloadType, payload)), where Hash is derived from the signing algorithm (ECDSA P-256 → SHA-256, P-384 → SHA-384, etc.; ed25519 must use ed25519ph).

On the verification side, the canonicalized Rekor entry body is now reconstructed from the bundle contents rather than relying on the body in the bundle.

Rekor v1 behavior is unchanged.

@codysoyland codysoyland force-pushed the rekor-v2-dsse-as-hashedrekord branch from 771403b to 659cd48 Compare May 14, 2026 19:05
Comment thread pkg/verify/tlog.go Outdated
@codysoyland codysoyland force-pushed the rekor-v2-dsse-as-hashedrekord branch 7 times, most recently from 251d323 to ba0a097 Compare May 27, 2026 15:10
Comment thread pkg/root/trusted_root_create.go Outdated
Comment on lines -214 to -217
case crypto.SHA3_256:
return protocommon.HashAlgorithm_SHA3_256, nil
case crypto.SHA3_384:
return protocommon.HashAlgorithm_SHA3_384, nil

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed as these were marked deprecated in protobuf-specs/protos/sigstore_common.proto

@codysoyland codysoyland marked this pull request as ready for review May 27, 2026 18:09
@codysoyland codysoyland requested a review from a team as a code owner May 27, 2026 18:09
@codysoyland codysoyland requested review from Hayden-IO and steiza May 27, 2026 18:53
Comment thread .github/workflows/conformance.yml Outdated
- run: go build -o conformance test/conformance/main.go

- uses: sigstore/sigstore-conformance@4d66ba3cb0c9c95f705c757c0f5e226d3f4d5151 # v0.0.27
- uses: sigstore/sigstore-conformance@7fc09c1747fbbc49996ef2f43bb740ca60ec944f # non-release commit that includes hashedrekord dsse test bundles

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.

Can we get a new release of sigstore-conformance out before this is merged?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

sigstore-conformance PR is ready: sigstore/sigstore-conformance#371
I do not have permission to merge or release there btw.

Comment thread go.mod Outdated
Comment thread pkg/verify/tlog.go
Comment thread pkg/sign/transparency.go Outdated
DSSE envelope bundles are now represented as hashedrekord Rekor entries
instead of the dsse entry type. The entry digest is computed over the
DSSE PAE encoding using the signing algorithm's externalized hash
function. Verification reconstructs the entry hash from bundle contents
and verifies inclusion against it. Includes ed25519ph support and test
coverage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Cody Soyland <cody.soyland@chainguard.dev>
@codysoyland codysoyland force-pushed the rekor-v2-dsse-as-hashedrekord branch from ba0a097 to 17e1bd3 Compare June 1, 2026 18:59
@codysoyland codysoyland requested a review from Hayden-IO June 1, 2026 19:34
Hayden-IO
Hayden-IO previously approved these changes Jun 1, 2026

@Hayden-IO Hayden-IO left a comment

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.

Thanks for getting this done! LGTM, just a non-blocking comment.

Comment thread pkg/sign/transparency.go
// always uploaded as a hashedrekord whose digest covers the envelope's
// PAE. The hash function matches the signing algorithm (e.g.
// ECDSA P-256 → SHA-256, P-384 → SHA-384).
if len(dsseEnvelope.Signatures) == 0 {

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.

@loosebazooka Where did you land on whether or not to enforce one signature in the DSSE?

Comment thread pkg/testing/ca/ca.go Outdated
if err != nil {
return nil, fmt.Errorf("marshaling rekor v2 entry: %w", err)
}
// Mirror the server-side pipeline (rekor-tiles internal/server/service.go):

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.

nit, some of these comments here are a little verbose

@Hayden-IO Hayden-IO requested a review from kommendorkapten June 1, 2026 22:59
kommendorkapten
kommendorkapten previously approved these changes Jun 2, 2026

@kommendorkapten kommendorkapten left a comment

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.

Thanks!

codysoyland and others added 2 commits June 2, 2026 10:03
Signed-off-by: Cody Soyland <cody.soyland@chainguard.dev>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Cody Soyland <cody.soyland@chainguard.dev>
Signed-off-by: Cody Soyland <cody.soyland@chainguard.dev>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Cody Soyland <cody.soyland@chainguard.dev>
@codysoyland codysoyland dismissed stale reviews from kommendorkapten and Hayden-IO via 6f6afb5 June 2, 2026 14:07
@Hayden-IO Hayden-IO merged commit ef6e924 into sigstore:main Jun 2, 2026
12 checks passed
@codysoyland codysoyland deleted the rekor-v2-dsse-as-hashedrekord branch June 2, 2026 14:24
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.

3 participants