Why the QR code changes every 30 seconds
· 3 min read
A printed QR code or a photo of one can be copied by anyone who sees it. If it opens a door once, it opens it again.
What the phone shows instead
Qravix’s code is a small message: who it is for, the time, and a random number. The phone signs it with a key that was made on the phone and never leaves it. Thirty seconds later it signs a new one.
What the server checks
The reader sends the message to Qravix. Qravix checks the signature against the public key it stored when the phone connected, checks the time is inside the window, and checks the random number was not used before. Only then does it say allow.
What that buys you
A screenshot is useless within seconds. A replay is refused. And because the private key is not on the server, stealing the database does not let anyone make a valid code.
The window is yours to choose, from 15 to 60 seconds. A shorter window is stricter, a longer one forgives a phone whose clock is a little off.