Key Exchange Algorithms

Side-channel claim limit. Nothing on this page claims constant-time behaviour or side-channel resistance for any target: the side-channel harness covers nothing (finding A48) and no measurement exists. The Rust and C cores are designed for constant time and unmeasured; managed runtimes (JIT, GC, bounds checks) make no timing claim. Where this page names constant-time or side-channel techniques, in prose or in code, they are design intent or recommendations, not measured properties.

Key exchange algorithms enable two parties to establish a shared secret over an insecure channel, forming the foundation of secure communication protocols.

Available Key Exchange Algorithms

Classical Key Exchange

X25519

Elliptic curve Diffie-Hellman key exchange using Curve25519.

  • Security Level: 128-bit equivalent
  • Key Size: 32 bytes (public and private)
  • Shared Secret: 32 bytes
  • Use Cases: TLS, Signal Protocol, SSH, VPN

Algorithm Comparison

Algorithm Type Security Level Key Size Performance
X25519 Classical ECDH 128-bit 32 bytes Very Fast
ML-KEM-768 Post-Quantum 192-bit 1,184 bytes Fast

Security Considerations

Classical vs Post-Quantum

  • X25519: Secure against classical computers, vulnerable to quantum computers
  • ML-KEM-768: Secure against both classical and quantum computers
  • Hybrid Approach: Combine X25519 + ML-KEM-768 for transition period

Best Practices

  • Always use ephemeral keys for forward secrecy
  • Validate public keys before use
  • Use proper key derivation from shared secret
  • Implement constant-time operations

Selection Guide

For Current Applications

  • Primary: X25519 (fast, widely supported)
  • Backup: ECDH P-256 (broader compatibility)

For Post-Quantum Transition

  • Hybrid: X25519 + ML-KEM-768
  • Future: ML-KEM-768 only

For Specific Use Cases

  • TLS 1.3: X25519 or hybrid
  • Signal Protocol: X25519
  • SSH: X25519 or Ed25519 (for signatures)
  • VPN: X25519 or hybrid approach

Implementation Notes

All key exchange algorithms in MetaMUI Crypto Primitives provide:

  • Constant-time behaviour and side-channel resistance: not claimed — unmeasured for every target (A48)
  • Constant-time behaviour and side-channel resistance: not claimed — unmeasured for every target (A48)
  • ✅ Proper key validation
  • ✅ Cross-platform compatibility
  • ✅ Standards compliance