System Architecture

This section provides an overview of Cypheron Core’s architecture and design principles.

For complete technical details, see the full Architecture Documentation.

Overview

Cypheron Core is structured as a multi-layered system combining Rust-native implementations with NIST reference implementations through FFI bindings. The architecture ensures cross-platform compatibility while maintaining security and performance.

Core Components

ComponentModule PathPrimary TypesPurpose
ML-KEM(Kyber)kem/MlKem512, MlKem768, MlKem1024Key encapsulation mechanisms
Digital Signaturessig/MlDsa44, MlDsa65, MlDsa87, Falcon512, Falcon1024Post-quantum digital signatures
Hybrid Cryptographyhybrid/P256mlKem768, EccDilithium, CompositeKeypairClassical + PQ combinations

Architecture Layers

┌─────────────────────────────────────────────────────────────┐
│                    APPLICATION LAYER                        │
│  • Safe Rust API                                           │  
│  • Type Safety Guaranteed                                   │
├─────────────────────────────────────────────────────────────┤
│                    CYPHERON CORE                            │
│  • Algorithm Wrappers                                       │
│  • Memory Management                                        │
│  • Error Handling                                           │
├═════════════════════════════════════════════════════════════┤
│                    FFI BOUNDARY                             │
│  • Input Validation                                         │
│  • Buffer Management                                        │
│  • Safety Enforcement                                       │
├═════════════════════════════════════════════════════════════┤
│                    NIST C IMPLEMENTATIONS                   │
│  • ML-KEM Reference Code                                    │
│  • ML-DSA Reference Code                                    │
│  • Falcon & SPHINCS+ Code                                   │
└─────────────────────────────────────────────────────────────┘

Build System Architecture

The build system orchestrates compilation of NIST reference implementations and generates FFI bindings:

  • Vendor Code Integrity: SHA-256 verification of all C source files
  • Secure Compilation: Platform-specific optimization with security flags
  • FFI Safety: Automated binding generation with function allowlisting

Platform Abstraction Layer

PlatformSecure RandomMemory ProtectionKey Features
WindowsBCryptGenRandomVirtualProtectBCrypt API, Windows Crypto
macOSSecRandommprotectSecurity Framework, Apple Silicon detection
Linuxgetrandom syscallmprotectHardware RNG detection, CPU affinity

Testing and Validation

The testing infrastructure includes:

  1. Known Answer Tests (KAT) - NIST compliance validation
  2. Property Based Testing - Cryptographic property verification
  3. Security Analysis - Timing attacks and memory safety
  4. Fuzzing Infrastructure - Robustness testing
  5. Performance Benchmarking - Regression detection

For detailed technical architecture including security analysis, see the complete Architecture Documentation.