Ed25519Crypto
Platform-specific Ed25519 cryptographic operations.
Production-Ready Implementations
All implementations use audited, battle-tested cryptographic libraries:
JVM
Library: BouncyCastle (org.bouncycastle:bcprov-jdk18on)
Algorithm: Ed25519 via
Ed25519Signer,Ed25519PrivateKeyParametersSecurity: RFC 8032 compliant, constant-time operations
Provider: Registered as JCA security provider
iOS/macOS (Native)
Library: libsodium (via C interop)
Algorithm: Ed25519 via
crypto_sign_*functionsSecurity: Audited, constant-time, memory-safe
Random:
randombytes_buf()using system CSPRNGWhy libsodium over CryptoKit:
Direct C interop (no Swift bridge needed)
Matches Stellar's exact key format (raw 32-byte seeds)
Cross-platform (same code for iOS, macOS, Linux)
Used by stellar-core reference implementation
Industry standard (Signal, Tor, etc.)
JavaScript (Browser & Node.js)
Primary: Web Crypto API (Chrome 113+, Firefox 120+, Safari 17+)
Fallback: libsodium-wrappers (WebAssembly, universal compatibility)
Strategy: Automatic detection and graceful fallback
Security: libsodium.js is the same audited C library compiled to WASM
Compatibility: Works in all modern browsers and Node.js
Why libsodium.js over TweetNaCl:
More features (crypto_sign_seed_keypair for key derivation)
Better performance (WebAssembly vs pure JS)
Same library as native implementation
Actively maintained