Cryptography

ed25519, SHA-256, blake2b PoW. Cross-implementation compatibility (Go ↔ JS).


XE uses standard cryptographic primitives with cross-implementation compatibility between Go and JavaScript (tweetnacl/blakejs).

Key Generation

Ed25519 via crypto/rand or deterministic from 32-byte seed.

Signing Contexts

  • Block hashing — SHA-256 of canonical bytes
  • Block signinged25519.Sign(privateKey, hash)
  • Vote signing — ed25519 over canonical vote encoding
  • Attestation signing — ed25519 over SHA-256(leaseHash || timestamp)
  • Chat signing — ed25519 detached signature over message envelope
  • Directory signing — ed25519 over account + timestamp

Proof of Work

Anti-spam only, not consensus.

result = blake2b_8(nonce_LE || blockHash)
valid  = result >= difficulty
  • DefaultDifficulty: 0xfffff80000000000 (~2M attempts, ~1s)
  • TestDifficulty: 0x0000000000000002 (instant)
  • Nonce: little-endian; result compared as big-endian

Functions: ComputePoW, ComputePoWConcurrent, ComputePoWWithContext, ValidatePoW

Server-side fallback: POST /pow endpoint.