Nothing to steal. Nothing to replay.

No user passwords or shared partner keys on our servers. A one-time challenge, a Token check, and scoped access you can revoke.

How sign-in works

The wallet proves it controls the address by signing a payment that never happens. That proof is BIP-322, Bitcoin's standard for signing a message without moving funds.

  1. Challenge

    The site issues a one-time message with a random nonce, bound to the site's origin. Single use; it expires in 10 minutes by default.

  2. Wallet signs

    A virtual to_spend transaction commits to the message and pays the address. The wallet signs a to_sign transaction that spends it. Never broadcast; no funds move.

  3. Bitcoin's rules

    The verifier rebuilds that spend and checks the signature with the same rules Bitcoin nodes use (BIP-143 SegWit, BIP-341 Taproot). No custom crypto, and no full script engine.

  4. Token check

    The address must hold the access Token, plus the organization's approval where required.

  5. Access

    Scoped to routes, methods and environments. Revocable per key. Every decision logged.

On the hosted service, each challenge is single use and expires in 10 minutes. In self-verify, the default is also 10 minutes, and you can set the lifetime from 60 seconds to 30 minutes. Legacy addresses that start with 1 sign with the classic "sign message" format instead of BIP-322. We accept both, so wallets without BIP-322 can still sign in.

Why it's secure

No secret to steal

The private key never leaves the wallet. We never see it, and nothing reusable is stored on our servers. Each site still has its own TOKENLOCK site secret, used to talk to the API, not a password your users share.

Replay-proof

Each challenge is single use, bound to one site, and expires. A captured signature cannot be used again.

One method, many address types

Taproot (Schnorr) and SegWit (ECDSA) via BIP-322, for bc1q, 3... and single-key bc1p addresses. Classic sign-message for legacy 1... addresses. Multisig is not supported yet.

Compared with shared secrets

Passwords / API keys SSO / OAuth TOKENLOCK
User secret on server Yes At the IdP None: key stays in wallet
Phishable or leakable Yes Partly No reusable sign-in secret
Revocation Manual rotation IdP admin Per key, next request (hosted)
Who you trust Your database The IdP Public Token check + org approval

Hosted revocation in the table is strict mode, the default, with registered keys: the change is visible on the next request. In self-verify, it takes effect on the next successful policy refresh, every 60 seconds by default.

What is signed, and how

  • Sign-in. BIP-322 simple, or classic sign-message for legacy addresses. The verifier rebuilds the signing hash and checks it with Bitcoin's own rules for that address type. It does not run a full script engine.
  • Policy bundles. The access rules are signed with Schnorr (BIP-340) and verified offline by the SDK, so your server can enforce them without calling us on every request.
  • Local passes. After sign-in, a self-verify pass is an HMAC-SHA256 over the pass body, keyed by your own secret. It is not Schnorr-signed.

The underlying keys are secp256k1, at about 128-bit security, the same strength class as the P-256 keys used in TLS. The same curve and signatures secure over $1 trillion of Bitcoin: an open bounty no one has claimed.

After sign-in

A pass proves the visitor controlled a wallet holding the Token when they signed. It does not prove legal identity. Later requests present that short-lived pass; they are not signed one by one.

  • Holdings and, where you require it, organization approval are checked before access is granted.
  • Each key is limited to the routes, methods and environments you set. A request with no matching policy is denied.
  • You can revoke a key at any time. On hosted verification in strict mode, that takes effect on the next request. In self-verify, on the next successful policy refresh (every 60 seconds by default).
  • Every decision is logged, and can be streamed to your own log destination.

What we want you to know

  • Wallet custody. Like any key-based system, security depends on how the wallet is kept. A stolen seed phrase means stolen access until you revoke the key, the same as a stolen hardware key.
  • BIP-322 is a completed Bitcoin standard, implemented by major wallets and libraries. Classic sign-message is accepted for wallets without it. Only single-key addresses are supported; multisig is not supported yet, and hardware-wallet support varies.
  • Quantum risk is industry-wide. A large enough quantum computer would break every elliptic-curve scheme in use today, including Schnorr, ECDSA and today's TLS. That is not a TOKENLOCK-specific problem.
  • Implementation is the practical risk. The math is strong; bugs in code are what we watch for. Independent audit scope is available on request.

Questions

Email hello@tokenlock.ai. For a closer look at the integration, see the docs or try the demo.