Wiztchta.Challenges.ProofOfWork (wiztchta v0.1.0)

Copy Markdown View Source

Invisible proof-of-work challenge (the default).

The browser must find a nonce such that SHA-256(salt <> nonce) starts with difficulty zero bits. Legitimate users wait about a second; bots pay that CPU cost on every submission. The server verifies with one hash.

Requires the wiztchta JS (see the README) and a secure context (HTTPS or localhost), since it uses crypto.subtle.

Options

  • :difficulty - leading zero bits required. Each +1 doubles the average work. Defaults to the :pow_difficulty config, or 16.