A Boston Agile Labs project · working prototype

Bellpair

A working lab for arithmetic work puzzles.

Use a complete solver, verifier and receipt workflow to test an arithmetic construction without first building the surrounding protocol. Change the base and difficulty, inspect the proof bytes, and measure search and verification separately.

The prototype builds that receipt from two primes with complementary arithmetic fingerprints. A separate verifier checks the result without repeating the search.

The arithmetic contribution

A finite address for a growing count.

Divide the nonzero residues of an integer into digit bins. Multiply each residue by the number base and reduce it back into range. Count the residues that remain in their original bin: that is a digit collision.

The count appears to require visiting every position. The finite determination theorem gives it directly as a known scale term plus a table entry. For any integer coprime to the base, its final two digits select that entry.

The ending 0F selects the table entry +14.

A small coprime integer

10F

Written in base 16

Residues in the full count
270
Known scale term
16
Table fingerprint
+14
Collision count
30

A prime from the recorded receipt

F85A32126989C20F

Written in base 16

Residues in the full count
17,895,671,123,971,523,086
Known scale term
1,118,479,445,248,220,192
Table fingerprint
+14
Collision count
1,118,479,445,248,220,206

Collision count = known scale term + table fingerprint

The counts are exact evaluations of the finite determination theorem; the browser does not enumerate the residues. Count values are shown in decimal. Inspect this prime’s receipt.

The table stays fixed as the integer grows. Reading a larger integer and checking primality still cost work; the theorem removes enumeration from the collision calculation.

Reflection gives each fingerprint a counterpart.

In base b, an ending a is paired with b² − a. Their raw table entries add to −1. Doubling each entry and adding one gives equal and opposite integer weights.

FIRST ENDINGREFLECTED ENDING0FF1+29−29CENTERED WEIGHTS0
Base 16. The roles are assigned before the search; reflection fixes their balance.

Bellpair assigns those two roles before the search starts. Each role needs a SHA-256-derived prime with its prescribed ending. Once both contributions pass their checks, the centered balance is zero by construction.

This is a classical arithmetic relationship. The hash target and prime search provide the work; the reflection law supplies the matching rule.

A receipt tied to one challenge.

  1. Issue the challenge. Bind a fresh identifier, message hash, base, reflection pair, difficulty and expiry into the work.
  2. Find both contributions. Each nonce must yield a qualifying hash and a 64-bit prime with the assigned ending.
  3. Check the witness. Recompute both hashes and candidates, prove primality in the specified range, and check the endings and fingerprints.
  4. Consume the receipt. Accept the issued challenge once. A changed proof or a second redemption is rejected.

The local C/GMP implementation runs the full exchange, including cancellation and an independent verifier. The public demonstration retains a real receipt for every base from 2 to 36.

Challenge bytes and verification rules

The protocol uses a canonical, domain-separated hash input. The paper specifies every field and byte convention, the deterministic 64-bit primality test, and the distinction between arithmetic validity and permission to redeem a receipt.

Full specification · PDF

The cost of the construction.

The original reference run adds one filter at a time at the same hash difficulty. It uses one worker, twelve pairs per method, and the decimal 09/91 pair at 6, 8 and 10 bits.

C/GMP reference run · 36 pair trials
Required workMean attemptsMean time
Hash difficulty only6511.155 ms
Hash and prescribed endings59,98778.630 ms
Hash, endings and two primes956,5181269.027 ms

Repeated arithmetic verification averaged 0.031 ms over 1,000 repetitions. These timings exclude process startup and HTTP overhead.

These results isolate the cost of each added constraint at the same hash difficulty. Use them as a starting point for comparisons at matched total solving cost.

Ten bases · 1,920 native trials

Base choice changes the work.

More eligible endings spread the prime search across more roles. At the same hash threshold, a prescribed pair usually takes more work to find.

Four leading zero hash bits in every base. All rows require two primes.
BasePairsMean attemptsMean search
211,4882.1 ms
334,2235.8 ms
446,2378.5 ms
51015,96719.2 ms
669,59011.3 ms
81624,31128.0 ms
102029,58534.4 ms
122430,89235.7 ms
1664102,956118.0 ms
30120167,341191.1 ms

96 receipts per base per policy · one worker · C/GMP · Intel Core i9-13900H. These experiments use a separate audit hash domain and adjustable thresholds. They establish a cost tradeoff; they do not establish a fastest base or a security advantage. All trials and metadata

Put the lab to work.

Bellpair gives you a complete local experiment and reusable native components. Start with the lab, then adapt the challenge-and-receipt workflow to a question you want to test.

Work-backed forms and submissions
Prototype a small computation requirement for contact forms, sign-ups or public submissions. Bind each receipt to its submission and test the cost of sending them in bulk.
Agent and API workflows
Explore per-action work requirements for automated tool calls and job queues. An agent can solve a challenge and return a receipt that another program checks automatically.
Protocol design and benchmarking
Compare number bases, difficulty and the two search roles. Measure how design choices change completion time and verification cost, using the C/GMP implementation as a starting point.
Security teaching and testing
Follow a proof from challenge to acceptance. Change its bytes, let it expire or submit it twice, and inspect what the verifier and issuer do. The code makes each step visible.

The repository includes the protocol specification, C/GMP solver and verifier, tampering and replay checks, and recorded benchmarks. MIT licensing lets you modify the implementation and build on it.

From one pair to richer arithmetic rules.

The collision invariant extends beyond one digit shift. Longer shifts have their own finite residue addresses and reflection laws. They supply a concrete direction for exploring receipts with several related arithmetic requirements.

The lab provides a way to study those choices in practice: match expected worker cost, vary the arithmetic rules, and measure completion time, verification and behavior when clients abandon challenges.