全部经验 · Wallets and signing · 从这里开始 · 术语表
JoyID sub key membership is checked through the CoTA aggregator进阶由所有者核对
由所有者核对 · 核对结果:正确 · 核对于 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.
为什么重要: 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.
代码模式
method: 'generate_subkey_unlock_smt', params: { alg_index: 1, pubkey_hash: ccc.hashCkb(pubkey).slice(0, 42), lock_script: ccc.hexFrom(lock.toBytes()) }摘自提交,已缩短。
- 概念
- Witnesses and signatures, Login and authorization
- 证据
- 由所有者核对: 由其来源项目的所有者核对,该所有者同时也是这些经验的发布者
- 首次出现
- 2026-10-12
- 最近改动
- 2026-10-12
- 最近核对
- 2026-11-19
- 对照提交的核对结果
- 正确:这条经验出自该提交,并且在今天的代码中仍然成立
来源(1)
- 2026-10-12 · LusoCryptoLabs/poi-onchain · 这个项目的更多经验
更多关于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
核对人: @LusoCryptoLabs (项目所有者), 2026-11-19.
引用这条经验
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.