๐Ÿ” Passkeys Cryptography

Interactive Visual Guide to ECDSA Signing

Phase 1: Initial Setup (Registration)

๐Ÿ“
Generator G
Fixed point on curve
โ†’
๐Ÿ”‘
Private Key d
Random secret number
โ†’
๐Ÿ”“
Public Key Q
Q = d ร— G
โ†’
๐Ÿ–ฅ๏ธ
Server
Stores Q only
1 Generate Private Key
Your device creates a random large number called the private key d. This is your permanent secret, stored securely in your device's secure enclave.
d = random_large_number()
2 Compute Public Key
Using elliptic curve math, multiply the generator point G by your private key d to get your public key Q.
Q = d ร— G
Key insight: Computing Q from d is easy, but computing d from Q is virtually impossible!
3 Share Public Key
Your device sends Q to the server during registration. The private key d never leaves your device.
๐Ÿ”‘ Variable Reference
G Generator: Fixed point on the elliptic curve (everyone knows this)
d Private Key: Your permanent secret number (never leaves your device)
Q Public Key: Derived from d, shared with server (Q = d ร— G)
H Challenge: Random data from server (changes each time)
k Nonce: Temporary random number for this signature only
R Curve Point: Temporary point computed as k ร— G
r First part of signature: x-coordinate of R
s Second part of signature: Computed using d, H, r, and k
n Curve Order: Fixed parameter of the elliptic curve