EchoPrime Encryption ๐Ÿ” Now in Public Beta

EchoPrime Encryption

Deterministic Safe Prime Oracle
The first auditable, entropy-free safe prime oracle for Web3 infrastructure and encryption

Try it Now SDK Docs Cloud API Docs

Why EchoPrime?

Generate, verify, and look up safe primes with a single API call. No randomness. No trust assumptions.

๐Ÿ”’

Deterministic

Same index always produces the same safe prime. No PRNG, no entropy โ€” pure mathematics.

Learn more โ†’

๐Ÿ”

Auditable

Every prime is independently verifiable. Open-source engine with Miller-Rabin proofs.

Learn more โ†’

โšก

Fast

Sub-100ms response times with built-in caching. Pre-compute and look up in O(1).

Learn more โ†’

โ›“๏ธ

On-chain Ready

Designed for smart contracts, zero-knowledge proofs, and decentralised key generation.

Learn more โ†’

Try it Now

Enter a prime index and get a verified safe prime back instantly.

๐Ÿงช Live API Demo

โ† Enter an index and click "Find Prime"

Quick Start

Integrate EchoPrime into your project in seconds.

cURL
Python
JavaScript
# Find a safe prime at index 100
curl https://echoprime.xyz/echoprime/api/v1/find/100

# Verify a safe prime
curl https://echoprime.xyz/echoprime/api/v1/verify/23

# With API key (higher rate limits)
curl -H "x-api-key: ep_your_key_here" \
  https://echoprime.xyz/echoprime/api/v1/find/500

# Batch verify
curl -X POST https://echoprime.xyz/echoprime/api/v1/batch-verify \
  -H "Content-Type: application/json" \
  -d '{"candidates": [23, 47, 59, 83, 100]}'
import requests

BASE = "https://echoprime.xyz/echoprime/api/v1"

# Find a safe prime
r = requests.get(f"{BASE}/find/100")
prime = r.json()["data"]
print(f"Safe prime: {prime['p']}")
print(f"Sophie Germain: {prime['q']}")

# Verify a candidate
r = requests.get(f"{BASE}/verify/23")
print(r.json()["data"]["verified"])  # True

# Batch verify
r = requests.post(f"{BASE}/batch-verify", json={
    "candidates": [23, 47, 59, 83, 100]
})
for result in r.json()["data"]["results"]:
    print(f"{result['p']}: {result['verified']}")
const BASE = "https://echoprime.xyz/echoprime/api/v1";

// Find a safe prime
const res = await fetch(`${BASE}/find/100`);
const { data } = await res.json();
console.log(`Safe prime: ${data.p}`);
console.log(`Sophie Germain: ${data.q}`);

// Verify a candidate
const v = await fetch(`${BASE}/verify/23`);
const { data: vData } = await v.json();
console.log(vData.verified); // true

// Batch verify
const batch = await fetch(`${BASE}/batch-verify`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ candidates: [23, 47, 59, 83, 100] })
});
const { data: bData } = await batch.json();
bData.results.forEach(r =>
  console.log(`${r.p}: ${r.verified}`)
);

Pricing

Start for free. Scale when you need to.

Free

$0

For exploration & prototyping

  • 100 requests/day
  • All endpoints
  • Community support
  • Rate limited by IP
Get Started

Starter

$99/mo

For indie developers & startups

  • 10,000 requests/month
  • API key authentication
  • Email support
  • Usage dashboard
Contact Us

Enterprise

$499/mo

For protocols & institutions

  • Unlimited requests
  • Dedicated infrastructure
  • On-prem deployment option
  • Custom SLA
  • 24/7 support
Contact Sales

Use Cases โ€” How Companies Integrate EchoPrime

Two integration paths. One deterministic oracle. Every safe prime verified.

๐Ÿ“ฆ

SDK

pip install echoprime

Self-hosted. Run your own prime generation. Full control.

โ˜๏ธ

Cloud API

api.echoprime.xyz

Managed service. Instant lookups. No infrastructure.

๐Ÿ–ฅ๏ธ Your App
โ†’
โ—ˆ EchoPrime
SDK or Cloud API
โ†’
โœ… Verified
Safe Primes
โ†’
๐Ÿ” Your Crypto
System
โ›“๏ธ

Blockchain & DeFi

DEXs, lending protocols, and bridges need verifiable prime parameters for on-chain cryptographic operations.

Learn more โ†’

๐Ÿ—„๏ธ

Hash Tables & Databases

Prime-sized hash tables dramatically reduce collision rates. Safe primes ensure optimal distribution.

Learn more โ†’

๐ŸŽฒ

Pseudorandom Number Generators

Blum Blum Shub and LCG generators need safe prime moduli. Deterministic primes = reproducible sequences.

Learn more โ†’

๐Ÿ“ก

Error Correction & Coding Theory

Reed-Solomon and BCH codes operate over prime fields. Safe primes provide optimal field sizes.

Learn more โ†’

๐Ÿ”ฌ

Scientific Computing & Simulations

Monte Carlo simulations, molecular dynamics, and climate models need reproducible prime-based sequences.

Learn more โ†’

๐ŸŒ

Distributed Systems & Consensus

DKG, threshold signatures, and Shamir's Secret Sharing need agreed-upon prime parameters across all nodes.

Learn more โ†’

๐Ÿ“ฑ

IoT & Embedded Devices

Constrained devices can't compute large primes. API lookup in <5ms vs minutes of local computation.

Learn more โ†’

๐ŸŽฎ

Gaming & Procedural Generation

Prime-based algorithms for terrain and world generation. Same index = same world, every time.

Learn more โ†’

๐Ÿชช

Digital Identity & Credentials

Anonymous credentials (Idemix/AnonCreds) and group signatures rely on safe prime groups.

Learn more โ†’

โš›๏ธ

Quantum-Readiness

Post-quantum transition needs infrastructure now. EchoPrime as the bridge between classical and PQ cryptography.

Learn more โ†’

Verified On-Chain

Every verified safe prime is permanently recorded on Ethereum. Tamper-proof. Publicly queryable. No trust required.

โ›“๏ธ

EchoPrimeOracle โ€” Live on Ethereum Sepolia

Deployed and verified. Every safe prime submission is an immutable, auditable record.

0x17221f97F05e0Ed46F9Cb284004f65992FcF174A
View on Etherscan โ†— โœ… Verified Source Code โ†— View on GitHub โ†—

๐Ÿ“Š 1,000 Verified Safe Primes On-Chain

Indices 1โ€“1,000 submitted across 48 batch transactions on Ethereum Sepolia. First 10 shown below.

Index Safe Prime (p) Sophie Germain (q) Verified Block TX
152โœ…10227342 0x8930...d651 โ†—
273โœ…10227344 0x40df...7cc8 โ†—
3115โœ…10227345 0xcec1...b781 โ†—
42311โœ…10227346 0x79ea...b8b6 โ†—
54723โœ…10227347 0x7a1d...3d26 โ†—
65929โœ…10227349 0xd6f4...0849 โ†—
78341โœ…10227350 0xe59e...e650 โ†—
810753โœ…10227352 0x73c9...8eb0 โ†—
916783โœ…10227353 0x4ee8...79be โ†—
1016783โœ…10227354 0x2ebd...5644 โ†—

Each transaction is independently verifiable on Etherscan. Click any TX hash to view the full on-chain record.

๐Ÿ” How to Read an On-Chain Record

Let's walk through Index 5 as an example:

Safe Prime p = 47
Sophie Germain Prime q = 23
Relationship: q ร— 2 + 1 = 23 ร— 2 + 1 = 47 = p โœ“
Collapse Score (p): 1.000000000000000000 (1e18)
Collapse Score (q): 1.000000000000000000 (1e18)
Verified: true โ€” both p and q passed Miller-Rabin primality testing
Block: 10,227,347 โ€” permanently included in the Ethereum blockchain

What does this prove?

๐Ÿ“Œ 47 is a safe prime โ€” it equals 2 ร— 23 + 1, where both 47 and 23 are prime. This is the foundation of Diffie-Hellman key exchange, RSA key generation, and zero-knowledge proof ceremonies.

๐Ÿ“Œ Collapse scores = 1.0 โ€” EchoPrime's verification algorithm (based on Lucas' primality theorem, 1878) confirmed both values with maximum confidence. Scores are stored as fixed-point integers scaled by 10ยนโธ for on-chain precision.

๐Ÿ“Œ On-chain = permanent โ€” once a prime is recorded in a block, it cannot be altered, deleted, or disputed. The Ethereum network (thousands of nodes worldwide) maintains this record indefinitely.

๐Ÿ“Œ Anyone can verify โ€” call getPrime(5) on the contract from any Ethereum client. No API key. No account. No trust required.

๐ŸŒ Why does this matter?

Traditional prime generation is a black box โ€” you trust the software that generated them. With EchoPrime, every prime has a public, auditable trail: the index it was projected from, its collapse scores, the verification result, who submitted it, and when. It's cryptographic transparency at the infrastructure level.

Think of it like a public notary for prime numbers. Instead of trusting one server, you trust the entire Ethereum network.

๐Ÿ“œ

Smart Contract Registry

EchoPrimeOracle.sol โ€” a public, permissionless registry of verified safe primes on Ethereum. Every submission includes index, prime value, collapse scores, and primality proof.

Learn more โ†’

๐Ÿ“ก

Event Traces

Every submission emits a PrimeVerified event, enabling off-chain indexers, ZK rollup coordinators, and ceremony tooling to monitor and consume verified primes in real time.

Learn more โ†’

โšก

Batch Submissions

Submit up to 100 verified primes in a single transaction. Gas-optimised for high-throughput oracle operations. EIP-1559 support with automatic gas price management.

Learn more โ†’

๐Ÿค–

Oracle Bot

Automated 24/7 pipeline: generate โ†’ verify โ†’ queue โ†’ submit โ†’ monitor. Persistent retry queue, wallet management, and health monitoring built in.

Learn more โ†’

How It Works

The EchoPrime oracle stores verified safe primes on-chain with full trace metadata.

๐Ÿ“ฆ PrimeRecord Struct

uint256 p โ€” Safe prime
uint256 q โ€” Sophie Germain prime (pโˆ’1)/2
uint256 scoreP โ€” Collapse score for p (ร—10ยนโธ)
uint256 scoreQ โ€” Collapse score for q (ร—10ยนโธ)
bool verified โ€” Primality confirmed
address submitter โ€” Who submitted
uint256 timestamp โ€” Block timestamp

โš™๏ธ Contract Functions

submitVerification(index, p, scoreP, scoreQ, verified)
โ†’ Submit a single verified safe prime
batchSubmit(indices[], primes[], scoresP[], scoresQ[], verifieds[])
โ†’ Submit up to 100 primes in one tx
getPrime(index) โ†’ PrimeRecord
โ†’ Query any published prime by index
isPrimeSubmitted(index) โ†’ bool
โ†’ Check if an index exists
totalSubmissions โ†’ uint256
โ†’ Total primes in the registry

๐Ÿ“ก Event: PrimeVerified

Emitted on every submission. Off-chain indexers, ZK coordinators, and ceremony tooling can subscribe to this event.

event PrimeVerified(
    uint256 indexed index,    // Deterministic projection index
    uint256 p,                // Safe prime
    uint256 q,                // Sophie Germain prime
    uint256 scoreP,           // Collapse score for p (ร—10ยนโธ)
    uint256 scoreQ,           // Collapse score for q (ร—10ยนโธ)
    bool verified,            // Primality confirmed
    address indexed submitter // Oracle bot address
);

๐Ÿ” Access Control

The contract uses a simple owner + authorized submitters model. The deployer (owner) can add or remove oracle bots. Only authorized addresses can submit primes โ€” but anyone can query the registry. Reads are free. The registry is a public good.

addSubmitter(address) โ€” Authorize an oracle bot (owner only)
removeSubmitter(address) โ€” Revoke access (owner only)
transferOwnership(address) โ€” Transfer contract ownership

EchoPrimeOracle.sol โ€” Full Source

Loading contract...
โฌ‡ Download .sol View on GitHub โ†’

About EchoPrime

EchoPrime is the layer before encryption. It generates the safe primes that cryptographic systems are built on.

Encryption is a lock. EchoPrime makes the metal the lock is built from.

๐Ÿ”ข What are safe primes?

A safe prime is a prime number p where (p โˆ’ 1) / 2 is also prime. That second prime is called a Sophie Germain prime (named after the French mathematician Marie-Sophie Germain, 1776โ€“1831, one of the first women in mathematics).

They always come in pairs. For example: p = 23 is a safe prime because q = 11 is also prime, and 23 = 2 ร— 11 + 1.

Only about 7โ€“10% of all prime numbers are safe primes. They're rare, and they're essential for secure cryptography.

๐Ÿ” Why safe primes matter for cryptography

Every major cryptographic protocol depends on safe primes:

  • Diffie-Hellman key exchange โ€” needs safe primes to create a cyclic group where the discrete logarithm problem is hard. Without safe primes, the Pohlig-Hellman attack can break the key exchange.
  • RSA encryption โ€” uses large primes for key generation. Safe primes make the factorisation problem harder, strengthening the keys.
  • DSA / ElGamal signatures โ€” need safe prime parameters for the underlying group structure.
  • Zero-knowledge proofs โ€” ZK-SNARKs and ZK-STARKs need prime-order groups for secure construction. Safe primes guarantee the right group properties.
  • Trusted setups & ceremonies โ€” protocols like Zcash's Powers of Tau ceremony require auditable prime parameters that all participants can verify independently.
  • MPC (Multi-Party Computation) โ€” distributed key generation protocols need agreed-upon safe primes across all participants.

Put simply: if the prime is weak, the encryption is weak. Every HTTPS connection, every encrypted message, every blockchain transaction ultimately depends on the quality of the primes underneath.

โš ๏ธ The problem with how primes are generated today

Currently, the industry generates safe primes using random number generators. The process:

  1. Generate a random number (e.g. 2,048 bits / 600+ digits)
  2. Test if it's prime using Miller-Rabin โ€” this takes seconds per test
  3. If prime, check if (pโˆ’1)/2 is also prime
  4. If not โ†’ throw it away, go back to step 1
  5. Repeat hundreds of times until you find one

This is slow, wasteful, and non-reproducible. Two parties generating primes independently will get different results every time. There's no way to audit where a prime came from or verify it wasn't tampered with.

For small primes this doesn't matter. For cryptographic-scale primes (2,048โ€“4,096 bits), finding a single safe prime can take minutes to hours. And you just have to trust the generator was honest.

โœ… How EchoPrime solves this

EchoPrime replaces random generation with a deterministic, auditable pipeline:

  • Deterministic estimator โ€” Uses the formula pโ‚โ‚™โ‚Ž โ‰ˆ ฮฑ ยท n ยท (ln n)ยฒ (derived from the Bateman-Horn conjecture) to predict where safe primes are, skipping dead zones.
  • 33โ€“42ร— more efficient โ€” Instead of random guessing, it searches in prime-rich regions. Hit rate of 7.6โ€“9.7% vs ~0.2% for random search at scale.
  • Mathematically verified โ€” Every prime gets a collapse score using Lucas' theorem (binomial coefficient divisibility). Primes score 1.0, composites score below 1.0. Plus Miller-Rabin confirmation. 100% accuracy across 1,000+ independent verifications.
  • Reproducible โ€” Give two people the same index, they get the same prime. Always. No coordination needed. This is critical for key ceremonies and distributed protocols.
  • On-chain audit trail โ€” Every verified prime is published to the EchoPrimeOracle smart contract on Ethereum. Anyone can query it. The proof is permanent and immutable.
  • Instant lookup โ€” Pre-computed primes cached in the registry. API response in under 5ms. No computation needed at query time.

Think of it like Google Maps for safe primes. Anyone can calculate a route manually โ€” but nobody does. They use the API. EchoPrime does the same thing: it computes, verifies, stores, and serves safe primes so your application doesn't have to.

๐ŸŒ Beyond cryptography โ€” other use cases

Safe primes and deterministic prime generation aren't just for encryption. They're fundamental to many areas of computing and science:

  • Blockchain & DeFi โ€” Decentralised exchanges, lending protocols, and bridges need verifiable prime parameters. On-chain primes mean smart contracts can reference trusted cryptographic primitives without off-chain trust assumptions.
  • Hash tables & databases โ€” Prime-sized hash tables dramatically reduce collision rates. Safe primes are ideal because (pโˆ’1)/2 being prime ensures better distribution. Used in high-performance databases, caches, and distributed hash tables (DHTs).
  • Pseudorandom number generators (PRNGs) โ€” Linear congruential generators and Blum Blum Shub PRNGs require safe prime moduli. The quality of the PRNG depends directly on the quality of the prime. Deterministic primes mean reproducible random sequences โ€” essential for simulations and testing.
  • Error correction & coding theory โ€” Reed-Solomon codes, BCH codes, and other error-correcting codes operate over prime fields. Safe primes provide the right field sizes for optimal error correction in telecommunications, storage, and satellite communications.
  • Scientific computing & Monte Carlo simulations โ€” Large-scale simulations (physics, climate, molecular dynamics) need high-quality primes for quasi-random sequences. Deterministic primes ensure simulations are exactly reproducible across different machines and teams.
  • Distributed systems & consensus โ€” Distributed key generation (DKG), threshold signatures, and secret sharing schemes (Shamir's) all need agreed-upon prime parameters. EchoPrime gives all nodes the same prime from the same index โ€” no negotiation needed.
  • IoT & embedded devices โ€” Resource-constrained devices can't afford to generate large primes locally. With EchoPrime, they look up a pre-computed prime by index in milliseconds instead of spending minutes computing one.
  • Gaming & procedural generation โ€” Prime-based algorithms power procedural terrain, dungeon generation, and deterministic world-building. Same seed (index) = same world, every time. Safe primes provide better mathematical properties than arbitrary primes.
  • Digital identity & credentials โ€” Anonymous credential systems (like Idemix) and group signatures rely on safe prime groups. Auditable primes mean the credential system itself can be independently verified.
  • Quantum-readiness โ€” Post-quantum cryptographic schemes are being developed alongside classical systems. Having a verifiable, deterministic prime oracle means the transition infrastructure is already in place โ€” any new protocol that needs safe primes can plug into EchoPrime.

Anywhere you need a prime number that's provably correct, instantly available, and reproducible โ€” that's where EchoPrime fits.

๐Ÿงช The technology

Estimator

Analytic projection using pโ‚โ‚™โ‚Ž โ‰ˆ 2.8913 ยท n ยท (ln n)ยฒ, derived from the Bateman-Horn heuristic for the density of safe primes. Targets prime-rich regions instead of searching blindly.

Collapse Verifier

Uses Lucas' theorem: for a prime p, the binomial coefficient C(p,k) โ‰ก 0 mod p for all k in [1,T]. Primes always score 1.0. Composites always score below 1.0. Zero false positives in 1,000+ tests.

Oracle Pipeline

Automated 24/7: estimate โ†’ find โ†’ verify โ†’ hash โ†’ submit to Ethereum. EIP-1559 gas management, persistent retry queue, wallet nonce tracking, health monitoring.

Smart Contract

EchoPrimeOracle.sol โ€” public registry on Ethereum. Every record includes: index, safe prime (p), Sophie Germain prime (q), collapse scores, verification status, submitter address, and timestamp.

EchoPrime is built by Mikoshi Ltd โ€” a UK-based fintech and cryptographic infrastructure company. Built by the Mikoshi research team.

GitHub (Apache 2.0) PyPI โ€” pip install echoprime Read the Whitepaper mikoshi.co.uk

๐Ÿ“„ Citation

Edwards, D. (2026). EchoPrime: A Verifiable Oracle for Deterministic Safe Prime Generation with On-Chain Audit Trails. Zenodo.
https://doi.org/10.5281/zenodo.18529723

Get in Touch

Questions about the API, SDK, smart contracts, or enterprise integration? We're here to help.

๐Ÿ“ง

Email

Technical & sales enquiries

mikoshiuk@gmail.com
๐Ÿ’ป

GitHub

Open-source SDK & issues

DarrenEdwards111/EchoPrime
๐Ÿข

Company

Registered in England & Wales

Mikoshi Ltd ยท Swansea

For enterprise licensing, custom integration, or research collaboration:

โœ‰๏ธ Send us an email