ethoryx
Official Python client for the Ethoryx prime-generation API — structurally-guided primes for RSA, FHE, zk-SNARKs, and NTT, backed by the Ethoryx C/GMP core. Fewer Miller–Rabin tests, fewer candidates, same cryptographic strength.
Install
pip install ethoryx
Quick start
import ethoryx
client = ethoryx.Client(api_key="tg_your_key") # or set ETHORYX_API_KEY
# Generate primes
prime = client.generate(bits=2048)
rsa = client.generate_rsa(bits=2048)
pair = client.generate_rsa_pair(bits=2048) # matched (p, q)
ntt = client.generate_ntt(bits=256)
fhe = client.generate_fhe(bits=2048) # Starter tier or above
# Public endpoints — no API key required
ethoryx.verify(999983) # {"is_prime": true, ...}
ethoryx.optimize_next(last_prime=999983, last_gap=6) # -> predicted_next, confidence
ethoryx.status() # version, benchmarks
Get a free key (100 calls/month) at https://ethoryx.io/register.
Authentication
Pass your key to the client, or set it once in the environment:
export ETHORYX_API_KEY="tg_your_key"
client = ethoryx.Client() # picks up ETHORYX_API_KEY
The public endpoints (verify, optimize_next, predict_gap, status) work without a
key. Everything under generate* and account* requires one.
API
| Method | Endpoint | Auth |
|---|---|---|
client.generate(bits=, method=) |
GET /v1/generate |
🔑 |
client.generate_rsa(bits=) |
GET /v1/generate/rsa |
🔑 |
client.generate_rsa_pair(bits=) |
GET /v1/generate/rsa-pair |
🔑 |
client.generate_ntt(bits=) |
GET /v1/generate/ntt |
🔑 |
client.generate_fhe(bits=) |
GET /v1/generate/fhe |
🔑 Starter+ |
client.generate_ecc(bits=) |
GET /v1/generate/ecc |
🔑 |
client.verify(n) |
GET /v1/verify |
public |
client.optimize_next(last_prime=, last_gap=) |
GET /v1/optimize/next |
public |
client.predict_gap(...) |
GET /v1/predict/gap |
public |
client.account() |
GET /v1/account |
🔑 |
client.usage_history() |
GET /v1/usage/history |
🔑 |
client.status() |
GET /v1/status |
public |
Every method returns the parsed JSON response as a dict.
Errors
from ethoryx import EthoryxError, AuthError, RateLimitError, APIError
try:
client.generate(bits=2048)
except AuthError:
... # missing/invalid key, or tier too low (401/403)
except RateLimitError:
... # 429 — back off and retry
except APIError as e:
print(e.status, e.response)
except EthoryxError:
... # network/other
License
MIT © Ethoryx Research
Metadata
Release files for ethoryx 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ethoryx-0.1.1.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ethoryx-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.5 kB
Release files / ethoryx-0.1.1.tar.gz
| Download URL | ethoryx-0.1.1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e93ab3a49b9396e25000588f5201c29adc3935dbb47c5031572bc7d38b8c3b6
|
|
BLAKE2b-256 checksum How to use checksums |
57eeafcc81dd8ec35b9c4493b64971c1609268955584dfcedb6bf5d6ad9e4819
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / ethoryx-0.1.1-py3-none-any.whl
| Download URL | ethoryx-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8fec5bbf490e366a51f0133208dfa045cc7d2fa7d7e067a72dcf358f0c5f1ec
|
|
BLAKE2b-256 checksum How to use checksums |
b596283cfb95b0fb2e9ae6d3e1b22f61d2fc7afda8a53a3cac2df3d303562655
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|