fix: canonicalize Ed25519 algorithm casing#24
Merged
GsCommand merged 1 commit intoMay 18, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Ed25519so runtime does not need to normalize before verification.Description
SIGNATURE_ALG = "Ed25519"insrc/crypto.tsand make signing functions emitmetadata.proof.signature.algvia that constant.src/compat.tsandsrc/receipt.tsto treatEd25519as canonical while temporarily accepting legacy lowercaseed25519by normalizing it internally before comparison.Ed25519and the temporary acceptance rule.README.mdto reference the canonicalEd25519, and add/update tests intest/compat.test.tsandtest/receipt.test.tsto assert canonical emission, verification without caller normalization, legacy lowercase acceptance, and rejection of unsupported algorithms; files changed:README.md,src/crypto.ts,src/compat.ts,src/receipt.ts,test/compat.test.ts,test/receipt.test.ts; finalSIGNATURE_ALGvalue is"Ed25519"; commit02561debf528b4b38b6804cc9e65d6b68f0a42cc.Testing
npm install,npm run build,npm test, andnpm run typecheck, and all commands completed successfully withnpm testreporting 72 tests passed and 0 failures.signature.alg === "Ed25519", thatverifyCommandLayerReceipt()andverifyReceipt()accept canonicalEd25519without caller-side normalization, that legacy lowercaseed25519remains accepted for compatibility, and that unsupported signature algorithms fail as expected, and all these tests passed.Codex Task