Sign in with a key your browser can't hand over

bam.js makes a key in this browser that no script can export, registers it with this site, gets a token and signs a call. The site checks each signature against the key you registered.

Demo You're a visitor for 15 minutes, kept in memory only. Nothing is written to disk, and a restart forgets everyone.

  1. 1. Make a key

    An ECC P-256 key, kept in this browser's IndexedDB and marked as not exportable.

  2. 2. Register

    Sends the public half under a name made for this visit.

  3. 3. Get a token

    Signs a short-lived token with the key; the site answers with its own token, bound to your key's fingerprint.

  4. 4. Make a signed call

    Signs the method, path, time, a one-time nonce, the body and the name of this site, and posts it. The site says what it checked.

  5. 5. Try it at another host

    Signs one call for this site, sends it to the other site first, then here. The same server answers both names, but the signature names this one, so the other refuses it and this one accepts it.

  6. 6. Try to cheat

    Sends that exact call again, then sends it with one byte of the body changed. The site should refuse both.

  7. 7. Forget

    Drops your key set on the site and deletes the key from this browser. A call after that is refused.

About this demo

The browser side is bam.js at commit 4d821f3, served from this site. The server side is bam.protocol's actor authentication. It signs version 2 request proofs, which name the site they are for.