# RockZeroOS-Service **Repository Path**: BlueVale/RockZeroOS-Service ## Basic Information - **Project Name**: RockZeroOS-Service - **Description**: Lightweight and robust operating system is perfect for personal cloud storage and data management. With native Docker support, you can easily deploy and manage a Rust Server, ensuring high performance and isolation for your applications. - **Primary Language**: Rust - **License**: AGPL-3.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-14 - **Last Updated**: 2026-02-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
Secure Private Cloud NAS Operating System
--- ## Overview RockZeroOS is a high-performance, secure cross-platform private cloud NAS operating system built with Rust. It features military-grade encryption including WPA3-SAE key exchange, EdDSA (Ed25519) JWT authentication, Bulletproofs zero-knowledge proofs, hardware-accelerated video transcoding, and professional storage management. ## Security Architecture ```mermaid flowchart TB subgraph Client["Flutter Client"] A[User Login] --> B[EdDSA JWT Auth] B --> C[SAE Handshake] C --> D[Bulletproofs ZKP] end subgraph Server["Rust Backend"] E[JWT Verification] --> F[SAE Key Exchange] F --> G[PMK Derivation] G --> H[AES-256-GCM Encryption] end B --> E C --> F D --> H style Client fill:#e1f5fe style Server fill:#fff3e0 ``` | Feature | Technology | Description | |---------|------------|-------------| | JWT Authentication | EdDSA (Ed25519) | Private key derived from BLAKE3 hash of password | | Key Exchange | WPA3-SAE (Dragonfly) | Secure key negotiation based on Curve25519 | | Zero-Knowledge Proof | Bulletproofs RangeProof | Prove password knowledge without revealing it | | Video Encryption | AES-256-GCM | Each HLS segment independently encrypted | | Replay Protection | Timestamp + Nonce + HMAC | Multi-layer protection mechanism | | Hardware Auth | FIDO2/WebAuthn | Support for YubiKey, TouchID, FaceID | | Secure Storage | Reed-Solomon + CRC32 | Data integrity verification and error correction | ## Secure HLS Video Streaming ```mermaid sequenceDiagram participant C as Client participant S as Server C->>S: 1. JWT Authentication (EdDSA) S-->>C: Access Token C->>S: 2. SAE Init S-->>C: Temp Session ID C->>S: 3. SAE Commit (Curve25519) S-->>C: Server Commit C->>S: 4. SAE Confirm S-->>C: Server Confirm + PMK C->>S: 5. Create HLS Session S-->>C: Session ID + Encryption Key loop Each Video Segment C->>S: 6. Request Segment + Bulletproofs ZKP S-->>C: AES-256-GCM Encrypted Segment C->>C: 7. Local Proxy Decrypt end ``` ## Storage Management - **Smart Formatting** - Auto-select optimal filesystem based on usage - System boot: ext4 - Media library: XFS (large file optimization) - Database: ext4 (journal optimization) - Backup: Btrfs (snapshot support) - Cross-platform: exFAT/NTFS - **Auto Mount** - Smart mount point generation with UUID/Label recognition - **Partition Management** - GPT/MBR partition table creation - **Disk Health** - SMART data monitoring, temperature detection - **Secure Erase** - Multi-pass overwrite for data destruction ## Hardware Accelerated Transcoding | Platform | Acceleration | Encoder | Decoder | |----------|--------------|---------|---------| | NVIDIA | NVENC/NVDEC | h264_nvenc, hevc_nvenc | h264_cuvid, hevc_cuvid | | Intel | QSV/VAAPI | h264_qsv, hevc_qsv | h264_qsv, hevc_qsv | | AMD | VAAPI | h264_vaapi, hevc_vaapi | - | | ARM | V4L2 M2M | h264_v4l2m2m | h264_v4l2m2m | | Amlogic | V4L2 M2M | h264_v4l2m2m | h264_v4l2m2m | ## Project Structure ```mermaid graph LR subgraph Backend["Rust Backend"] A[rockzero-common] --> B[rockzero-crypto] B --> C[rockzero-sae] B --> D[rockzero-media] B --> E[rockzero-db] C --> F[rockzero-service] D --> F E --> F end subgraph Frontend["Flutter Frontend"] G[RockZeroOS-UI] end F <--> G style Backend fill:#ffebee style Frontend fill:#e8f5e9 ``` ``` RockZeroOS-Service/ ├── rockzero-common/ # Common library (error handling, config, types) ├── rockzero-crypto/ # Cryptography library │ ├── jwt.rs # EdDSA JWT (Ed25519 + BLAKE3) │ ├── ed25519.rs # Ed25519 signatures │ ├── bulletproofs_ffi.rs # Bulletproofs RangeProof │ ├── zkp.rs # ZKP authentication │ ├── aes.rs # AES-256-GCM encryption │ └── hash.rs # BLAKE3, SHA3-256 ├── rockzero-sae/ # WPA3-SAE key exchange │ ├── client.rs # SAE client │ ├── server.rs # SAE server │ └── crypto.rs # Curve25519 cryptography ├── rockzero-media/ # Media processing │ ├── session.rs # HLS session management │ ├── encryptor.rs # AES-256-GCM video encryption │ └── bulletproof_auth.rs # Video segment ZKP auth ├── rockzero-db/ # Database (SQLite + Reed-Solomon) ├── rockzero-service/ # Main service │ └── handlers/ │ ├── auth.rs # EdDSA JWT authentication │ ├── zkp_auth.rs # ZKP authentication │ ├── secure_hls.rs # Secure HLS streaming │ └── ... └── RockZeroOS-UI/ # Flutter cross-platform client └── lib/ ├── services/ │ ├── bulletproofs_ffi.dart │ ├── sae_client_curve25519.dart │ └── secure_hls_player.dart └── features/ ├── auth/ ├── files/ └── ... ``` ## Quick Start ### Prerequisites - Rust 1.90+ - FFmpeg 6.0+ - SQLite 3.x - Flutter 3.19+ ### Build Backend ```bash git clone https://github.com/blueokanna/rockzero-service.git cd rockzero-service cargo build --workspace --release cargo test --workspace cargo run -p rockzero-service --release ``` ### Configuration Create `.env` file: ```env HOST=0.0.0.0 PORT=8080 RUST_LOG=info DATA_DIR=./data DATABASE_URL=./data/rockzero.db JWT_SECRET=your-super-secret-jwt-key-change-this-in-production JWT_EXPIRATION_HOURS=24 REFRESH_TOKEN_EXPIRATION_DAYS=7 STORAGE_ROOT=/mnt/storage MAX_UPLOAD_SIZE=10737418240 HLS_CACHE_PATH=./data/hls_cache ``` ### Run Flutter Client ```bash cd RockZeroOS-UI flutter pub get flutter run ``` ## API Reference ### Authentication ```mermaid sequenceDiagram participant C as Client participant S as Server C->>S: POST /api/v1/auth/register Note right of S: Create user withMade with ❤️ by blueokanna
Powered by Rust 🦀 | Secured by EdDSA + Bulletproofs 🔐 | Accelerated by Hardware 🚀