Turnstile worked fine on my forms. I removed it anyway, because on a site that advertises CryptNote it didn’t fit. In its place there’s now a small proof-of-work widget of my own. This post explains how it works and where its limits are.
Turnstile is Cloudflare’s answer to reCAPTCHA. It bothers visitors less than Google’s version and works well, which is why I had added it.
But this site sells CryptNote, a service for encrypted, self-destructing messages that is meant to involve as few third parties as possible. Turnstile does the opposite: it sets a cookie from a domain I don’t own, loads an external script I don’t audit, and connects every visitor who opens a form to an outside vendor.
It’s a small contradiction, but anyone who looks at the site’s network requests sees it right away.
A proof-of-work captcha is a cheap spam filter. It makes automated form submission unattractive for naive bots. A few hundred milliseconds of compute per request doesn’t matter to a human, but at a million spam posts an hour it adds up fast.
What it is not:
It’s meant for the most common nuisance on a contact form: cheap scripts that submit it automatically.
The flow is the classic one. It lives in a single Rust crate that both the browser (compiled to WASM) and the worker import, so client and server check the rules with the same code.
No third party is involved in any of these steps. Because the challenge is signed, the client can’t lower the difficulty or extend the expiry without the server secret.
The same widget also runs on CryptNote, before a message is created or read.
The first version was a silent spinner with “Solving challenge…”. It worked, but the UX was bad. An unexplained spinner makes people suspicious, especially right before they submit a form that creates an encrypted message.
The second version is a checkbox. You click it, the widget starts solving in the background, and once the solution is in, the checkbox turns active. Unlike the spinner, a checkbox needs no explanation.
Bots click checkboxes too, so the widget looks at the click itself. A click from a naive bot often fails simple checks: the event isn’t marked isTrusted, it arrives within a few hundred milliseconds of the widget appearing, or it reports a pointer type but sits at coordinates (0, 0). If a click looks off, the widget rejects it and shakes briefly. A person who clicks too early sees that the click didn’t count and can click again. None of this needs a round trip to the server.
The second video shows both: a human click activates the checkbox, a synthetic one triggers the shake.
The site no longer sets a cookie from someone else’s domain or loads a script I haven’t reviewed. The anti-bot code is part of my own repository, its dependencies are pinned in the lockfile, and I review it along with the rest of the code.