HASH / 04

SHA-256 in the browser

This page explains the hashing itself: what goes into each round, how the browser runs it, and when a result counts.

Input

Each round packs three values in a fixed order so the contract can rebuild exactly the same bytes.

input = key (32 bytes) + wallet (20 bytes) + nonce (32 bytes)

Hash loop

With WebGPU, many nonces are hashed in parallel on the graphics card. With CPU, the browser hashes one batch at a time in the background so the page stays responsive. Each batch covers 256 nonces.

Candidate

The result is read as a 256-bit number. If it is at or below the target, the nonce becomes a candidate and appears in the terminal log.

valid = uint256(SHA256(input)) <= target

Verification

Before asking the wallet to sign, the desk calls isValidProof on the contract to double-check the candidate, so you never pay gas for a proof that would fail.