All lessons · Wallets and signing · Start here · Glossary
Omnilock owner signing needs an 85 byte zeroed witness lock placeholderWorkingFrom one fix
From one fix · Check: right · Checked 2026-11-19
For an Omnilock cell spent in owner (secp256k1) mode, the WitnessArgs.lock is an 85 byte OmniLockWitnessLock (a 20 byte molecule header 0x5500000010000000550000005500000041000000 plus the 65 byte signature), so the sighash digest must be computed with an 85 byte zeroed placeholder (e.g. CCC prepareSighashAllWitness(lock, 85, client)). A digest taken over the usual 65 byte secp256k1 placeholder does not verify, which the test confirms against a real testnet spend.
Why it matters: A sighash digest computed over a 65 byte placeholder differs from the one Omnilock verifies against the 85 byte OmniLockWitnessLock, so the signature does not verify and the spend fails.
Pattern
const digest = await digestOf(onChain, lock, 85, client);Taken from the commit, shortened.
A test changed in the same commit
It sits next to the fix. We did not run it.
- officialcmg/ckb-keyway:
tests/omnilock-recovery.test.ts - officialcmg/ckb-keyway:
tests/user-wallet.test.ts
- Concepts
- Witnesses and signatures, Data encoding (molecule, hex, bigints)
- Evidence
- From one fix: from one project, checked against its commit
- First seen
- 2026-10-23
- Last changed
- 2026-10-23
- Last checked
- 2026-11-19
- Check against the commit
- right: the lesson follows from its commit and still holds in the code today
Sources (2)
- 2026-10-23 · officialcmg/ckb-keyway · more from this project
- 2026-10-23 · officialcmg/ckb-keyway · more from this project
More about Wallets and signing
- Do not detect DER signatures by a leading 0x30 byte
- Verifying Neuron style signed messages against a secp256k1_blake160 lock
- JoyID sub key membership is checked through the CoTA aggregator
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "Omnilock owner signing needs an 85 byte zeroed witness lock placeholder", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/omnilock-owner-signing-needs-an-85-byte-zeroed-witness-lock, CC BY 4.0, last changed 2026-10-23.