Skip to content

kotlin-sdk: Identity discovery attaches identities without signable keys (auth-window dependent) #4053

Closed

Description

@bfoss765

identityRegistration.discoverIdentities verifies and attaches on-chain identities, and the
persistence bridge (PlatformWalletPersistenceHandler) tries to derive+store each private key —
but storage uses the auth-gated Keystore alias (setUserAuthenticationRequired(true), ~30s
post-unlock validity) and silently skips on failure. A discovery pass running >30s after
device unlock attaches the identity with zero signable keys; subsequent wallet-bound writes fail
with issue #2's error. Requests:

  • expose a repair op that (re)derives and stores keys with public-key byte-verification
    (the app now implements this client-side via deriveIdentityKeyPair + WalletStorage);
  • make the key-alias auth policy configurable (app-supplied auth gate or non-gated alias),
    since host apps like the Dash wallet have their own auth model (PIN via SecurityGuard) that
    does not open the Android Keystore auth window. Live-verified.

cc @QuantumExplorer for review.

Context: found during the Android wallet dashj→Kotlin-SDK migration (dashpay/dash-wallet#1507); live-verified items were reproduced on testnet (Galaxy S22).

🤖 Filed with Claude Code

Activity

  1. added 4 commits that reference this issue on Jul 16, 2026
    9172fa8
    8aa0233
    8be0599
    a2c3b9a
  2. HashEngineering commented on Nov 9, 2026

    @HashEngineering
    Collaborator

    Fixed by #4183. Key storage now distinguishes AUTH_GATED from DEVICE_BOUND, and PlatformWalletManager.repairIdentityKey re-derives the key, checks it against the identity's public key, then stores it, so discovered identities end up with signable keys. Closing.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions