Paper 2026/3160
Loki: Updatable Anonymous Credentials from Dynamic zkSNARKs
Abstract
Anonymous credentials enable privacy-preserving authentication by allowing users to prove possession of valid credentials without revealing their sensitive attributes. This area has attracted growing interest in recent years, with schemes building on existing identity infrastructure such as OpenID Connect (OIDC). For example, Aptos Keyless and Sui’s zkLogin use zkSNARKs to prove that JSON Web Tokens (JWTs) are valid and satisfy authentication predicates, enabling blockchain transaction authorization without revealing users’ identities. However, in most existing schemes, updating a JWT or modifying an authorization policy requires regenerating the zkSNARK proof from scratch, imposing substantial computational overhead on users. To address this issue, in this paper we introduce Loki, a scheme for efficiently updating anonymous credential proofs using dynamic zkSNARKs, which support sublinear update time for small witness changes. Our construction makes two technical contributions. First, we design a randomness-free JWT parsing scheme based on finite automata that preserves most witness values for unchanged or slightly modified payloads. This replaces randomized substring tests in existing schemes, whose Fiat–Shamir challenges cause widespread witness changes. Second, we accelerate the update algorithm of Dynark, a dynamic zkSNARK built on Groth16, by exploiting fixed update positions and the fact that most updates change witness values by 1. We have fully implemented Loki and evaluated it in two application scenarios. For a fixed JWT, updating the proof for a new authentication policy takes only 0.8--1.3 ms, achieving a 1,273--2,041x speedup over proof generation from scratch. For a JWT reissuance with unchanged user attributes but updated issuance and expiration times and a new digital signature, updating the proof takes 205 ms. This yields a 8.2x speedup over proof generation from scratch and a 239x speedup over proof updates using Dynark's reference implementation.
Discussion