CKB Pulse

Todas as lições · Wallets and signing · Começa aqui · Glossário

JoyID sub key membership is checked through the CoTA aggregatorAvançadoVerificada pelo dono

Verificada pelo dono · Verificação: certa · Verificada em 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.

Porque importa: 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.

Padrão

Preferir
method: 'generate_subkey_unlock_smt', params: { alg_index: 1, pubkey_hash: ccc.hashCkb(pubkey).slice(0, 42), lock_script: ccc.hexFrom(lock.toBytes()) }

Tirado do commit, encurtado.

Conceitos
Witnesses and signatures, Login and authorization
Evidência
Verificada pelo dono: verificada pelo dono do projeto de onde veio, que também publica estas lições
Vista pela primeira vez
2026-10-12
Última mudança
2026-10-12
Última verificação
2026-11-19
Verificação contra o commit
certa: a lição sai do commit e continua a valer no código de hoje

Fontes (1)

Mais sobre Wallets and signing

Ver as 23 deste tema

Verificada por @LusoCryptoLabs (dono do projeto), 2026-11-19.

Manténs um projeto de onde esta lição veio? Confirma ou corrige

Citar esta lição
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.

Tiradas de commits públicos e verificadas contra o commit de onde cada uma veio e o código de hoje do projeto. Lê a fonte antes de confiar numa. Texto sob CC BY 4.0: dá crédito à LusoCryptoLabs, CKB lessons, com uma ligação para a lição. Queres que uma lição seja mudada ou retirada? Abre um issue.