Cryptography
OMXUS uses standard, battle-tested cryptographic primitives. No novel cryptography.
Key Generation
Algorithm: Ed25519
import hashlib
import secrets
# Generate 256-bit seed
seed = secrets.token_bytes(32)
# Derive keypair (simplified)
private_key = seed
public_key = ed25519_derive_public(seed)Ed25519 was chosen because:
- Fast signing and verification
- Small keys (32 bytes)
- Immune to timing attacks
- Used by SSH, Signal, Tor
Vouch Signatures
Algorithm: Ed25519 over structured message
message = f"OMXUS_VOUCH:v1:{recipient_pubkey}:{timestamp}"
signature = ed25519_sign(voucher_private_key, message.encode())Token Hash
Algorithm: SHA-256 over concatenated vouches
# Collect signed vouches
vouches = [vouch1, vouch2, vouch3]
vouches.sort() # Deterministic ordering
# Hash
combined = b''.join(vouches)
token_hash = hashlib.sha256(combined).hexdigest()The token hash is your OMXUS identifier:
⊙Ey6jzzLCbxuirX2MPTYFJKZZQUsi5MntRMeUwkUYU5hWWeight Calculation
Algorithm: Recursive averaging with decay
def calculate_weight(token, visited=None):
if visited is None:
visited = set()
if token in visited: # Cycle detection
return 0
visited.add(token)
if is_genesis(token):
return 1.0
voucher_weights = [
calculate_weight(v, visited.copy())
for v in get_vouchers(token)
]
return sum(voucher_weights) / len(voucher_weights) * 0.9Zero-Knowledge Proofs (Future)
For privacy-preserving verification, ZK proofs will allow:
- Prove you have a valid token without revealing which one
- Prove your weight exceeds threshold without revealing exact weight
- Prove you belong to a set without revealing membership
Coming in v2 with Groth16 or PLONK circuits.