Source-available Rust GUI and CLI for MAX Prime Challenge: structured distributed probable-prime search with reproducible local verification and result exports.
0
stars
2
commits
Rust
primary language
Aug 28, 2026
updated
Rust GUI + CLI for distributed probable-prime search, Miller-Rabin primality testing and reproducible computational number theory experiments
MAX Prime Challenge is a public distributed-computing project for finding large probable primes generated by a structured mathematical family.
It combines deterministic work units, Miller-Rabin probable-prime testing, distributed computation and reproducible local verification.
It is not a random search.
The Challenge comes from the MAX Prime Theory research line: affine-related quadratic polynomials, index pre-sieves, CRT-based modular partitions and constant modular signatures.
Public research background:
https://www.max-russo.com/papers.php
MAX Prime Challenge turns a mathematical research idea into a public computation challenge.
Participants run a Rust client on their own computer.
The client receives small work units, computes them locally, and submits the result to the official MAX Prime server.
The goal is twofold:
This measured effect is called enrichment.
A random prime search simply samples numbers and tests them.
MAX Prime Challenge instead uses deterministic work units generated from a structured formula.
Each official work unit is reproducible.
The same work unit can be recomputed and checked by an independent verifier.
The conceptual flow is:
Campaign -> Work Units -> Run -> Verify -> Report
This structure makes the project suitable for:
This repository contains the public Rust participant client.
It includes:
The GUI is the recommended way to participate.
The CLI is available for technical users who prefer the terminal.
MAX Prime Challenge is distributed as source code first.
This repository is meant to let technical users inspect the Rust code, verify the formula, build the client locally, run local experiments, and reproduce exported hit data without trusting a black-box executable.
Prebuilt binaries are not included in this repository.
This is intentional. The source code is the reference implementation. Future convenience packages may be provided separately through GitHub Releases, but the public source remains the primary trust layer.
MAX Prime Challenge includes both a command-line client and a graphical interface.
The CLI is the best starting point for technical users who want to inspect the project, run local experiments, script executions, or reproduce exported hit data.
The GUI is intended for a cleaner user experience, especially for official participation workflows and exporting official winning hit data.
For normal GUI use and official participation, use the full build:
cargo build --release
This builds both:
target/release/max_prime_public_gui
target/release/max_prime_public_client
The GUI uses max_prime_public_client internally for some official participation functions, including MAX Login. For that reason, compiling only the GUI binary is not sufficient for the complete official GUI workflow.
CLI-only build, for terminal-only use:
cargo build --release --bin max_prime_public_client
GUI-only build, for development or limited GUI testing:
cargo build --release --bin max_prime_public_gui
If you want to use MAX Login or participate officially through the GUI, use the full build instead.
The first GUI build can take several minutes because Rust has to compile native GUI dependencies.
This is normal and does not mean that the MAX Prime computation is slow. It is the one-time cost of compiling the graphical interface and its native dependencies.
The CLI build is lighter and can be useful for technical users who want a faster first check from the terminal.
Official participation requires MAX Login authorization.
Authorization connects this client installation to a public MAX identity, so the official server can assign work, receive results, prevent duplicate or fake submissions, and credit valid hits.
The registration flow uses MAX Login and is confirmed through the MAX App.
The client does NOT require:
The public identity used by the Challenge is the MAX ID.
Local demo mode does not require registration.
The goal is to keep the mathematical challenge separated from unnecessary personal data.
For detailed explanations of MAX ID, MAX Login, MAX App and MX², see the official MAX website:
MAX Login is the authentication flow used to connect this Rust client to a public MAX identity.
The MAX App is used to confirm the registration securely.
The underlying portable identity material is based on an MX² code, which can be represented as text or as a QR Code.
Open MX² repository:
https://github.com/max-russo-com/mx2
In practice:
The public Rust client does not contain the private MAX App code or the private server-side login system. It only connects to the official public endpoints needed for participation.
Not necessarily.
The MAX App is currently the practical way to confirm MAX Login registration.
However, the important identity material is the MX² code.
A participant who does not own an iPhone is not automatically excluded. The MAX App may be used temporarily on another iPhone to import the MX² code, confirm the computer registration, and then remove the imported identity from that device.
The participant should still keep the MX² code private and under personal control.
If you're temporarily using someone else's iPhone just to confirm MAX access, remove the imported MAX identity from that device when you're finished using it by simply clicking the "Clear All Session Data" button.
Official information for downloading and configuring the MAX App is available on the official MAX website:
Local mode runs only on your computer.
It is useful for:
Local mode does not submit official results.
Local mode does not require registration.
Official mode participates in the public MAX Prime Challenge.
It can:
Official mode requires MAX Login registration.
The GUI provides three clear participation controls:
Stop after current package does not interrupt a calculation halfway through. It lets the active package finish and then stops before requesting another one.
The GUI keeps separate and clearly labelled counters:
The local session counter increases only after the server confirms Accepted: true. It does not increase for interrupted calculations, expired assignments or rejected submissions. Closing and reopening the GUI resets only this local session counter; accepted results remain permanently stored by the official server.
Every official work-unit assignment uses a renewable server lease.
While a package is being computed, the client sends periodic heartbeat messages. Each valid heartbeat moves the assignment expiration time forward, so long calculations can continue safely even when they take more than the initial lease period.
If the GUI is closed, the computer is switched off, the connection is lost or the client stops unexpectedly, heartbeat messages stop. After the lease expires, the abandoned assignment can be marked expired and the same work unit can be assigned again as a new attempt.
The server rejects results belonging to assignments that are expired, inactive or superseded by a newer attempt. This prevents abandoned or late submissions from being counted twice.
For each iteration:
n_raw = n0 + i * step
If no CRT filter is active:
n_effective = n_raw
If a CRT filter is active:
n_effective = R + M * n_raw
Then:
x = 25 + 5*n_effective*(n_effective+1)
raw_N = 6*x + 5
raw_d = x
g = gcd(raw_N, raw_d)
N = raw_N / g
d = raw_d / g
The public client currently focuses mainly on N candidates, because they showed the strongest enrichment signal in local experiments.
Clone the repository:
git clone https://github.com/max-russo-com/max-prime-challenge.git
cd max-prime-challenge
Build the complete project:
cargo build --release
Run the GUI:
./target/release/max_prime_public_gui
The full build is recommended for GUI use because the GUI invokes the CLI client internally for functions such as MAX Login.
Run the CLI directly, if preferred:
./target/release/max_prime_public_client
These commands are optional and mainly useful for technical users who want to inspect the client from the terminal.
./target/release/max_prime_public_client welcome
./target/release/max_prime_public_client modes
./target/release/max_prime_public_client privacy
./target/release/max_prime_public_client local-demo
./target/release/max_prime_public_client official-explain
When an official probable-prime hit is found, the GUI can export the winning hit data as JSON.
The exported file is designed for public inspection and local reproducibility. It includes:
i;n_raw;n_effective;Operational identifiers and local tokens are redacted from the public export because they are not required for mathematical reproducibility.
A reviewer can use the exported data to recompute the candidate locally and check that the SHA-256 hash matches the published result.
The current client uses Miller-Rabin probable-prime testing.
That means discovered hits are probable primes.
A probable prime is not the same thing as a final public mathematical certificate unless it is later certified by a stronger verification process.
The official challenge does not trust the local client blindly.
Official validity depends on:
A modified local client cannot make an unofficial result official by itself.
More technical notes are available in:
SECURITY.md;LICENSE_AUDIT_NOTES.md;THIRD_PARTY_LICENSES.md.src/bin/max_prime_public_gui.rs GUI client
src/bin/max_prime_public_client.rs CLI client
src/bin/max_prime_public_runner_gui.rs Runner GUI helper
examples/ Public example configs
Cargo.toml Rust package definition
Cargo.lock Locked dependency versions
SECURITY.md Security notes
THIRD_PARTY_LICENSES.md Third-party crate license list
LICENSE_AUDIT_NOTES.md License audit notes
LICENSE Repository license
The public client uses the Rust dependencies listed in Cargo.toml and locked in Cargo.lock.
Third-party license notes are available in:
THIRD_PARTY_LICENSES.md
LICENSE_AUDIT_NOTES.md
The Rust client is intended to be portable across:
Platform-specific build requirements may depend on Rust, Cargo and native GUI dependencies.
MAX Prime Challenge is part of the broader MAX ecosystem.
The MAX App is used for privacy-preserving participant identity and registration confirmation.
MX² provides a portable identity/secret container layer.
The public Rust client is open for inspection so participants and technical reviewers can verify how work units are computed locally.
Private server-side systems, MAX App internals and administrative tools are not part of this repository.
See LICENSE.
Massimo Russo
2 commits
Rust
100.0%
Source-available Rust GUI and CLI for MAX Prime Challenge: structured distributed probable-prime search with reproducible local verification and result exports.
0
stars
2
commits
Rust
primary language
Aug 28, 2026
updated
Rust GUI + CLI for distributed probable-prime search, Miller-Rabin primality testing and reproducible computational number theory experiments
MAX Prime Challenge is a public distributed-computing project for finding large probable primes generated by a structured mathematical family.
It combines deterministic work units, Miller-Rabin probable-prime testing, distributed computation and reproducible local verification.
It is not a random search.
The Challenge comes from the MAX Prime Theory research line: affine-related quadratic polynomials, index pre-sieves, CRT-based modular partitions and constant modular signatures.
Public research background:
https://www.max-russo.com/papers.php
MAX Prime Challenge turns a mathematical research idea into a public computation challenge.
Participants run a Rust client on their own computer.
The client receives small work units, computes them locally, and submits the result to the official MAX Prime server.
The goal is twofold:
This measured effect is called enrichment.
A random prime search simply samples numbers and tests them.
MAX Prime Challenge instead uses deterministic work units generated from a structured formula.
Each official work unit is reproducible.
The same work unit can be recomputed and checked by an independent verifier.
The conceptual flow is:
Campaign -> Work Units -> Run -> Verify -> Report
This structure makes the project suitable for:
This repository contains the public Rust participant client.
It includes:
The GUI is the recommended way to participate.
The CLI is available for technical users who prefer the terminal.
MAX Prime Challenge is distributed as source code first.
This repository is meant to let technical users inspect the Rust code, verify the formula, build the client locally, run local experiments, and reproduce exported hit data without trusting a black-box executable.
Prebuilt binaries are not included in this repository.
This is intentional. The source code is the reference implementation. Future convenience packages may be provided separately through GitHub Releases, but the public source remains the primary trust layer.
MAX Prime Challenge includes both a command-line client and a graphical interface.
The CLI is the best starting point for technical users who want to inspect the project, run local experiments, script executions, or reproduce exported hit data.
The GUI is intended for a cleaner user experience, especially for official participation workflows and exporting official winning hit data.
For normal GUI use and official participation, use the full build:
cargo build --release
This builds both:
target/release/max_prime_public_gui
target/release/max_prime_public_client
The GUI uses max_prime_public_client internally for some official participation functions, including MAX Login. For that reason, compiling only the GUI binary is not sufficient for the complete official GUI workflow.
CLI-only build, for terminal-only use:
cargo build --release --bin max_prime_public_client
GUI-only build, for development or limited GUI testing:
cargo build --release --bin max_prime_public_gui
If you want to use MAX Login or participate officially through the GUI, use the full build instead.
The first GUI build can take several minutes because Rust has to compile native GUI dependencies.
This is normal and does not mean that the MAX Prime computation is slow. It is the one-time cost of compiling the graphical interface and its native dependencies.
The CLI build is lighter and can be useful for technical users who want a faster first check from the terminal.
Official participation requires MAX Login authorization.
Authorization connects this client installation to a public MAX identity, so the official server can assign work, receive results, prevent duplicate or fake submissions, and credit valid hits.
The registration flow uses MAX Login and is confirmed through the MAX App.
The client does NOT require:
The public identity used by the Challenge is the MAX ID.
Local demo mode does not require registration.
The goal is to keep the mathematical challenge separated from unnecessary personal data.
For detailed explanations of MAX ID, MAX Login, MAX App and MX², see the official MAX website:
MAX Login is the authentication flow used to connect this Rust client to a public MAX identity.
The MAX App is used to confirm the registration securely.
The underlying portable identity material is based on an MX² code, which can be represented as text or as a QR Code.
Open MX² repository:
https://github.com/max-russo-com/mx2
In practice:
The public Rust client does not contain the private MAX App code or the private server-side login system. It only connects to the official public endpoints needed for participation.
Not necessarily.
The MAX App is currently the practical way to confirm MAX Login registration.
However, the important identity material is the MX² code.
A participant who does not own an iPhone is not automatically excluded. The MAX App may be used temporarily on another iPhone to import the MX² code, confirm the computer registration, and then remove the imported identity from that device.
The participant should still keep the MX² code private and under personal control.
If you're temporarily using someone else's iPhone just to confirm MAX access, remove the imported MAX identity from that device when you're finished using it by simply clicking the "Clear All Session Data" button.
Official information for downloading and configuring the MAX App is available on the official MAX website:
Local mode runs only on your computer.
It is useful for:
Local mode does not submit official results.
Local mode does not require registration.
Official mode participates in the public MAX Prime Challenge.
It can:
Official mode requires MAX Login registration.
The GUI provides three clear participation controls:
Stop after current package does not interrupt a calculation halfway through. It lets the active package finish and then stops before requesting another one.
The GUI keeps separate and clearly labelled counters:
The local session counter increases only after the server confirms Accepted: true. It does not increase for interrupted calculations, expired assignments or rejected submissions. Closing and reopening the GUI resets only this local session counter; accepted results remain permanently stored by the official server.
Every official work-unit assignment uses a renewable server lease.
While a package is being computed, the client sends periodic heartbeat messages. Each valid heartbeat moves the assignment expiration time forward, so long calculations can continue safely even when they take more than the initial lease period.
If the GUI is closed, the computer is switched off, the connection is lost or the client stops unexpectedly, heartbeat messages stop. After the lease expires, the abandoned assignment can be marked expired and the same work unit can be assigned again as a new attempt.
The server rejects results belonging to assignments that are expired, inactive or superseded by a newer attempt. This prevents abandoned or late submissions from being counted twice.
For each iteration:
n_raw = n0 + i * step
If no CRT filter is active:
n_effective = n_raw
If a CRT filter is active:
n_effective = R + M * n_raw
Then:
x = 25 + 5*n_effective*(n_effective+1)
raw_N = 6*x + 5
raw_d = x
g = gcd(raw_N, raw_d)
N = raw_N / g
d = raw_d / g
The public client currently focuses mainly on N candidates, because they showed the strongest enrichment signal in local experiments.
Clone the repository:
git clone https://github.com/max-russo-com/max-prime-challenge.git
cd max-prime-challenge
Build the complete project:
cargo build --release
Run the GUI:
./target/release/max_prime_public_gui
The full build is recommended for GUI use because the GUI invokes the CLI client internally for functions such as MAX Login.
Run the CLI directly, if preferred:
./target/release/max_prime_public_client
These commands are optional and mainly useful for technical users who want to inspect the client from the terminal.
./target/release/max_prime_public_client welcome
./target/release/max_prime_public_client modes
./target/release/max_prime_public_client privacy
./target/release/max_prime_public_client local-demo
./target/release/max_prime_public_client official-explain
When an official probable-prime hit is found, the GUI can export the winning hit data as JSON.
The exported file is designed for public inspection and local reproducibility. It includes:
i;n_raw;n_effective;Operational identifiers and local tokens are redacted from the public export because they are not required for mathematical reproducibility.
A reviewer can use the exported data to recompute the candidate locally and check that the SHA-256 hash matches the published result.
The current client uses Miller-Rabin probable-prime testing.
That means discovered hits are probable primes.
A probable prime is not the same thing as a final public mathematical certificate unless it is later certified by a stronger verification process.
The official challenge does not trust the local client blindly.
Official validity depends on:
A modified local client cannot make an unofficial result official by itself.
More technical notes are available in:
SECURITY.md;LICENSE_AUDIT_NOTES.md;THIRD_PARTY_LICENSES.md.src/bin/max_prime_public_gui.rs GUI client
src/bin/max_prime_public_client.rs CLI client
src/bin/max_prime_public_runner_gui.rs Runner GUI helper
examples/ Public example configs
Cargo.toml Rust package definition
Cargo.lock Locked dependency versions
SECURITY.md Security notes
THIRD_PARTY_LICENSES.md Third-party crate license list
LICENSE_AUDIT_NOTES.md License audit notes
LICENSE Repository license
The public client uses the Rust dependencies listed in Cargo.toml and locked in Cargo.lock.
Third-party license notes are available in:
THIRD_PARTY_LICENSES.md
LICENSE_AUDIT_NOTES.md
The Rust client is intended to be portable across:
Platform-specific build requirements may depend on Rust, Cargo and native GUI dependencies.
MAX Prime Challenge is part of the broader MAX ecosystem.
The MAX App is used for privacy-preserving participant identity and registration confirmation.
MX² provides a portable identity/secret container layer.
The public Rust client is open for inspection so participants and technical reviewers can verify how work units are computed locally.
Private server-side systems, MAX App internals and administrative tools are not part of this repository.
See LICENSE.
Massimo Russo
2 commits
Rust
100.0%