Docs
Contents

Session keys and passkeys

A ZOL player is an Ed25519 session key: one per app. The ledger knows the player only by this key; there is no account, email or Solana wallet behind it.

What the key signs

WhereWhat
Zcash depositThe deposit memo (the session key, payout address, vault, network, expiry, flags): the operators credit only a memo the key signed
Solanabuy_in (into a pot, with the app), request_exit, leave_pot
RollupApp actions such as flip, bet, commit_bid, reveal_bid: free, the key is its own fee payer there

It never needs SOL: on Solana an app service pays the fees and co-signs.

What a stolen key can and cannot do

Where to keep it

WebAuthn's PRF extension gives a secret that is fixed for a passkey and a salt. ZOL derives the session seed from it, so the same passkey gives the same key on every device it syncs to, and there is nothing to write down.

salt = SHA-256("zol/session/v1/" ‖ app)
seed = SHA-256("ZOL passkey session v1" ‖ app ‖ PRF(passkey, salt))

A saved session key

A random 32-byte seed kept in the browser (localStorage key zol:session:<app>). The player must save a copy:

zolsess1:<app program>:<seed hex>:<checksum>

The checksum is the first 4 bytes of SHA-256 over everything before it, so a mistyped or truncated copy is caught. exportSession / restoreSession in ../web/src/session.ts. The testnet pages refuse a deposit until the key has been shown once.

A file (scripts, services)

The quickstart keeps the seed in a JSON file (mode 600). A service such as the house keeps its seed the same way, outside the repository.

Privacy