zkLogin
Date:
You can find the slides in this link.
- Introduction: Web3’s Onboarding Problem
- Web3 adoption is limited due to complex onboarding processes, such as managing mnemonics and private keys.
- There are around 100 million active crypto wallets compared to billions of Web2 accounts.
- The key to mass adoption is simplifying accessibility, making Web3 onboarding as easy as signing in with Google or Facebook.
- zkLogin: The Solution
- Combines OAuth with Zero-Knowledge Proofs (ZKPs) for:
- Non-custodial access.
- User-friendly authentication.
- Privacy-preserving identity management.
- Uses OpenID Connect (OAuth 2.0 extension) and JWT (JSON Web Tokens) as alternatives to private keys.
- Combines OAuth with Zero-Knowledge Proofs (ZKPs) for:
- Technical Details
- JWT Structure:
aud
: Wallet IDsub
: User ID- Includes a nonce with an ephemeral public key and expiration.
- Circuit implemented in Circom with ~1M R1CS constraints.
- Key Operations:
- SHA-2 (66%)
- RSA signature verification (14%)
- JSON parsing, Poseidon hashing, Base64 decoding (20%)
- Prover based on RapidSNARK for efficient proof generation.
- JWT Structure:
- Challenges and Solutions
- Challenge 1: Authorizing transactions with JWTs.
- Solution: Inject a fresh public key into the JWT for transaction-specific authorization.
- Challenge 2: Identifying users without linking identities.
- Solution: Add a persistent randomizer (salt) to ensure unlinkability across sessions.
- Challenge 3: Hiding the JWT from third parties.
- Solution: Use SNARKs to prove JWT validity without revealing its contents.
- Challenge 4: Achieving proof generation and round-trip time (RTT) under 3 seconds.
- Solution: Optimize the circuit and delegate proving to a ZKP service for faster processing.
- Challenge 1: Authorizing transactions with JWTs.
- Benefits of zkLogin
- Embedded wallets for seamless integration into mobile apps and websites without pop-ups.
- Supports 2FA using multiple OAuth providers (e.g., Google, Facebook, Apple).
- ID-based wallets that can be linked to email or phone numbers, offering partial or full identity disclosure.
- Efficient and cost-effective, with gas costs comparable to standard signature verification.
- Conclusion: zkLogin provides a scalable, privacy-preserving, and user-friendly solution for onboarding the next billion users to Web3.