Skip to content

Reject non-canonical badge encodings in Verify#25

Open
TeoSlayer wants to merge 1 commit into
mainfrom
fix/badgeverify-canonical
Open

Reject non-canonical badge encodings in Verify#25
TeoSlayer wants to merge 1 commit into
mainfrom
fix/badgeverify-canonical

Conversation

@TeoSlayer

Copy link
Copy Markdown
Contributor

Scrub hardening (info-level, defense-in-depth). Verify now re-encodes the parsed badge via Canonical and rejects any input that doesn't round-trip (leading zeros, '+' signs, etc.) before checking the signature — foreclosing byte-string-vs-parsed-fields malleability for downstream consumers. The issuer always signs the canonical form, so production badges are unaffected (golden vectors still pass). Test added.

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