Skip to content

feat: verify blake2b-hashed payload signatures (Ledger)#14

Merged
0xKheops merged 1 commit into
mainfrom
fix/ledger-hashed-signatures
Jul 6, 2026
Merged

feat: verify blake2b-hashed payload signatures (Ledger)#14
0xKheops merged 1 commit into
mainfrom
fix/ledger-hashed-signatures

Conversation

@0xKheops

@0xKheops 0xKheops commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Ledger Polkadot Generic app signs blake2b-256(<Bytes>message</Bytes>) for payloads over 256 bytes (Substrate convention) instead of the raw bytes, so SIWS verification always failed for Ledger accounts.

verifySignature now also tries the blake2b-256 hash of the message and its <Bytes>-toggled variant when the payload exceeds 256 bytes. Includes a signature captured from a real device as test vector.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 6, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
siws-demo 1f5ea2a Jul 06 2026, 08:16 AM

@0xKheops
0xKheops force-pushed the fix/ledger-hashed-signatures branch from 3c13e90 to 5cb61a8 Compare July 6, 2026 08:11
@0xKheops 0xKheops changed the title fix: verify blake2b-hashed payload signatures (Ledger) feat: verify blake2b-hashed payload signatures (Ledger) Jul 6, 2026
@0xKheops
0xKheops force-pushed the fix/ledger-hashed-signatures branch from 5cb61a8 to d7c0244 Compare July 6, 2026 08:14
@0xKheops
0xKheops force-pushed the fix/ledger-hashed-signatures branch from d7c0244 to 1f5ea2a Compare July 6, 2026 08:15
@0xKheops
0xKheops merged commit 70d8c6e into main Jul 6, 2026
2 checks passed
@0xKheops
0xKheops deleted the fix/ledger-hashed-signatures branch July 6, 2026 08:19
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant