All lessons · Wallets and signing · Start here · Glossary
JoyID sub key membership is checked through the CoTA aggregatorAdvancedChecked by the owner
Checked by the owner · Check: right · Checked 2026-11-19
A JoyID passkey from a second device is a sub key, so deriving the JoyID lock from the signer's public key does not find the account. Given the account's address, call JoyID's CoTA aggregator method generate_subkey_unlock_smt with alg_index 1 (the passkey algorithm), pubkey_hash set to the first 20 bytes of ckbHash(pubkey) for the same pubkey bytes JoyID signs with, and lock_script set to the serialized lock; a non-empty result.unlock_entry means the key belongs to that account. The aggregator is trusted and its SMT proof is not checked against the chain, and the positive case was not run against a real sub key here.
Why it matters: A login check that only derives the JoyID lock from the signer's public key fails to recognise anyone signing with a sub key from a second device, so legitimate account holders are rejected.
Pattern
method: 'generate_subkey_unlock_smt', params: { alg_index: 1, pubkey_hash: ccc.hashCkb(pubkey).slice(0, 42), lock_script: ccc.hexFrom(lock.toBytes()) }Taken from the commit, shortened.
- Concepts
- Witnesses and signatures, Login and authorization
- Evidence
- Checked by the owner: checked by the owner of the project it came from, who is also the publisher of these lessons
- First seen
- 2026-10-12
- Last changed
- 2026-10-12
- Last checked
- 2026-11-19
- Check against the commit
- right: the lesson follows from its commit and still holds in the code today
Sources (1)
- 2026-10-12 · LusoCryptoLabs/poi-onchain · more from this project
More about Wallets and signing
- EVM owners may hold Omnilock lock args with auth flag 0x12, not only 0x01
- Binding an off-chain lock proof to the live cell deps it ran with
- JoyID sub key signatures depend on the live CoTA cell dep holding the sub key root
Checked by @LusoCryptoLabs (owner of the project), 2026-11-19.
Do you maintain a project this lesson came from? Confirm or correct it
Cite this lesson
LusoCryptoLabs, "JoyID sub key membership is checked through the CoTA aggregator", CKB lessons, https://pulse.lusocryptolabs.com/learned/wallets/joyid-sub-key-membership-is-checked-through-the-cota-aggrega, CC BY 4.0, last changed 2026-10-12.