Design note: deriving a Stacks wallet from a passkey (WebAuthn PRF → HKDF → BIP-39)

We made a design decision in stacks-passkey-wallet that’s worth putting in front of this forum: the wallet is derived from the passkey rather than stored anywhere.

The path: WebAuthn PRF output → HKDF → BIP-39 entropy → Stacks and Bitcoin keys. A pure function, so the same passkey always yields the same keys, and they’re re-derived each time they’re needed. The seed phrase is still fully available to the user: they can reveal it, write it down, and restore in any standard Stacks wallet.

The honest limit: a key derived on demand in a browser session is hot-wallet-class security, and we treat it that way.

The library is MIT, open source, with two separate kinds of evidence: 81/81 on its internal suite, and 43/43 plus 5 negative controls on an independent vector verifier that imports nothing from the library.

Full write-up: We Re-Derive It. We Never Keep It. — DeOrganized
Design questions are argued in the open in the repo’s GitHub Discussions: DeOrganized/stacks-passkey-wallet · Discussions · GitHub

Happy to go deep on the derivation choices here.