Skip to content

Security ​

What Inodra can and cannot do ​

  • Inodra never holds a user key. The ephemeral key is made in your app and stays there.
  • Inodra cannot sign for a user. A signature needs the ephemeral private key, which we never see.
  • Inodra sees the JWT of each login. It uses the JWT to derive the salt and to make the proof.

How salts work ​

Inodra derives salts from a master seed and the verified JWT. It does not store them.

  • The same user and client ID always give the same salt, so the same address.
  • Each Inodra organization has its own key space. The same Google user gets a different address under each organization.
  • The network is not an input. A user has the same address on mainnet, testnet, and devnet.
  • seedVersion in the address response names the version of the derivation. The current version is 1.

Salt best practices ​

  • Store the salt with the user record when a user first logs in. It is your record of that user's address.
  • Treat the salt as private user data. Do not log it, and do not put it in a URL.
  • Keep one OAuth client ID per app across web, iOS, and Android. A different client ID is a different address.
  • Do not compute salts yourself. Send the JWT to /zklogin/address and use the salt and address it returns.

What the salt protects ​

  • The salt hides the link between the OAuth identity and the Sui address.
  • A leaked salt links one identity to one address. This is a privacy loss.
  • A leaked salt does not allow spending. Spending needs a JWT that is bound to the session nonce, plus the ephemeral private key.

The ephemeral key ​

  • The ephemeral private key plus the proof can sign for the user until maxEpoch passes.
  • Keep the key in sessionStorage or in memory. Do not send it to a server. Do not write it to a log.
  • Delete the key and the proof when the user logs out.

Session length ​

  • maxEpoch bounds how long an ephemeral key works. An epoch is about 24 hours.
  • A shorter session is safer. A stolen ephemeral key stops working when the epoch passes maxEpoch.
  • The default, epochs: 2, is right for web apps. Browser storage is the weak point.
  • A native app with a hardware-backed, non-extractable ephemeral key can use 7 to 14.
  • The maximum is the current epoch + 30.
  • The proof plus the ephemeral key is a bearer credential until maxEpoch. zkLogin has no revocation. A logout from the OAuth provider does not revoke it.

API keys in a browser ​

The two endpoints are safe to call from a browser when the key is restricted:

  • Give the key only the zkLogin scope.
  • Set allowed origins.
  • Set a per-IP rate limit. Proofs above the allowance cost 50 credits, so the limit bounds your cost.
  • The client ID list is a second gate. A JWT for another app's client ID gets 403 AUDIENCE_NOT_ALLOWED.

See API Key Security.

The client ID rule ​

The address depends on the OAuth client ID. Use one shared client ID on web, iOS, and Android, and do not rotate it. See The client ID rule.

The full-stack Sui data layer.