Skip to content

fix: compute DSSE PAE from raw bytes - #1333

Merged
aaronlew02 merged 1 commit into
mainfrom
fix-pae
Nov 3, 2026
Merged

aaronlew02 merged 1 commit into
mainfrom
fix-pae

Conversation

@aaronlew02

Copy link
Copy Markdown
Collaborator

Summary

This change updates the computation of the Pre-Authentication Encoding (PAE) for DSSE envelopes to correctly use raw bytes.

The DSSE Protocol requires each length in the PAE to be a byte count, and the body to be the raw payload bytes. Previously, we used UTF-16 code unit counts for the lengths, and we decoded the payload from UTF-8 and then re-encoded it.

Now, we correctly verify bundles with non-ASCII DSSE payloads, and other clients following the DSSE protocol can verify bundles that we sign. Bundles with non-ASCII payloads signed using sigstore-java v2.0.0 to v2.4.0 do not follow the DSSE protocol, and they will no longer verify. Bundles with ASCII-only payloads are not affected.

Signed-off-by: Aaron Lew <64337293+aaronlew02@users.noreply.github.com>
@loosebazooka

Copy link
Copy Markdown
Member

Oh weird. Is there a conformance test for this?

@aaronlew02

Copy link
Copy Markdown
Collaborator Author

@loosebazooka No, test_sign_verify_dsse uses statement.json, which is ASCII-only.

@aaronlew02
aaronlew02 marked this pull request as ready for review November 2, 2026 23:44
@aaronlew02
aaronlew02 merged commit b33129a into main Nov 3, 2026
22 checks passed
@aaronlew02
aaronlew02 deleted the fix-pae branch November 3, 2026 16:42
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.

2 participants