Skip to content

Repository files navigation

English · Persian / فارسی

Soren logo

Soren

Native Windows desktop stack — Jalali calendar, BSI-aligned cryptography, ciphertext-only VFS.

CI Release License Rust Platform

soren.dll · Threat model · BSI mapping · Release


Table of Contents

Jump to section

What is Soren?

Soren (سورن) is a layered native Windows product that combines:

Pillar Detail
Jalali calendar Hybrid 33-year cycle (1925–2090) + astronomical engine (52.5°E)
BSI-aligned crypto Argon2id, XChaCha20-Poly1305, AES-GCM-SIV, AES-SIV filenames, ML-KEM hybrid
Encrypted VFS Ciphertext-only disk store, WAL/checkpoint, WinFsp live-mount
Multi-shell UI WinUI 3, Flutter (view-only), C++ smoke — all via soren.dll C ABI

Design rule: binary/crypto data never crosses JSON/MethodChannel — only dart:ffi and C ABI pointers.


Architecture

Layer diagram (canonical)

Flutter (View)  ──┐
                  ├──► soren.dll (Zig FFI + arena) ──► soren-core (Rust)
C++ WinUI shell ──┘                                      ├── soren-crypto
                                                           ├── soren-calendar
                                                           └── soren-vfs

Mermaid (GitHub-compatible)

flowchart TB
  subgraph view [View Layer]
    Flutter["Flutter / Dart\n(dart:ffi)"]
    WinUI["WinUI 3\nCalendar / Crypto / Vault / Security"]
  end
  subgraph bridge [FFI Bridge]
    Zig["Zig arena\nsoren.dll"]
  end
  subgraph core [Governance Core — Rust / Tokio]
    Crypto["soren-crypto"]
    Cal["soren-calendar"]
    VFS["soren-vfs"]
    Orchestrator["soren-core"]
  end
  subgraph os [OS Integration]
    WinFsp["WinFsp VFS"]
    TPM["TPM / DPAPI / Windows Hello"]
    Widget["Windows 11 Widget COM"]
  end

  Flutter -->|"C ABI soren_*"| Zig
  WinUI -->|"C ABI soren_*"| Zig
  Zig --> Orchestrator
  Orchestrator --> Crypto
  Orchestrator --> Cal
  Orchestrator --> VFS
  VFS --> WinFsp
  WinUI --> TPM
  WinUI --> Widget
Loading
Contract Location
C ABI header include/soren.h
Threat model docs/threat-model.md
BSI TR-02102-1 map docs/compliance/BSI.md

Prerequisites

Tool Version Purpose
Rust 1.80+ Core crates, staticlib
Zig 0.13+ soren.dll FFI bridge
Flutter 3.24+ Windows desktop UI
CMake + MSVC VS 2022+ soren_shell.exe
.NET SDK 10+ WinUI 3 (SorenWinUI)
WinFsp 2.0+ (optional) Live-mount VFS tests & runtime
Inno Setup 6 (optional) build-installer.ps1

Quick start

# Full stack: Rust → Zig soren.dll → C++ shell → Flutter deps
.\scripts\build-all.ps1

# Verification (tests + export check + smokes)
.\scripts\verify.ps1

# Golden gate (build + verify + fuzz smoke)
.\scripts\golden-verify.ps1

# WinUI FFI smoke (Calendar / Crypto / Security / Vault)
.\scripts\smoke-winui.ps1

# Flutter UI (requires soren.dll beside runner)
cd flutter\soren_ui
flutter run -d windows

See CONTRIBUTING.md for the full test matrix.


Crates

Crate Role
soren-crypto Argon2id, XChaCha20-Poly1305, AES-SIV filenames, SORN container, ML-KEM-768 hybrid
soren-calendar Hybrid 33-year cycle + astronomical engine (52.5°E)
soren-vfs Ciphertext disk store + WAL; WinFsp host when SDK present
soren-core Tokio orchestrator + soren_rust_* C exports + async jobs

Shells & parity

Capability Flutter (soren_ui) WinUI (SorenWinUI)
Jalali calendar
Buffer encrypt/decrypt
Filename AES-SIV
VFS mount + encrypt-file job
TPM / DPAPI master key ✓ Security page
Windows Hello gate ✓ Security page
Widget COM + manifest ✓ MSIX + in-process

Details: docs/flutter-winui-parity.md


Security & platform integration

Feature Implementation Evidence
VirtualLock / zeroize soren-crypto Threat model §2.1
TPM (NCrypt) WinUI NcryptTpmVault Security page + C++ shell smoke
DPAPI fallback WinUI + C++ shell smoke-winui.ps1 DPAPI round-trip
Windows Hello UserConsentVerifier before key load Security page
Widget provider COM + Package.appxmanifest + Public/widgets/ WinUI MSIX

Release artifacts

Artifact Script Output
Full zip bundle package-release.ps1 dist/Soren-*-win-x64.zip
WinUI MSIX build-msix.ps1 dist/Soren-*-win-x64.msix
Flutter MSIX build-flutter-msix.ps1 dist/Soren-*-flutter-win-x64.msix
Inno installer build-installer.ps1 dist/Soren-*-setup.exe (needs ISCC)
GitHub release create-github-release.ps1 tag + upload
Code signing sign-release.ps1 / -Sign Authenticode + MSIX
.\scripts\package-release.ps1          # golden gate + zip (+ WinUI MSIX)
.\scripts\build-flutter-msix.ps1       # Flutter MSIX
.\scripts\build-installer.ps1          # Inno Setup (optional)
.\scripts\create-github-release.ps1 -DryRun

Version source: VERSION — must match soren_version() in soren.dll.

Full process: docs/RELEASE.md · CHANGELOG.md


CI & quality gates

  push / PR
     ├── verify          build-all + verify.ps1
     ├── golden          golden-verify.ps1 (-SkipFuzz)
     ├── fuzz            cargo-fuzz smoke (nightly)
     └── package         package-release + flutter bundle verify (+ optional sign)

  tag v*
     └── release         golden + package + GitHub Release upload

Workflows: .github/workflows/ci.yml, .github/workflows/release.yml

Gate Command
Local verify .\scripts\verify.ps1
Golden .\scripts\golden-verify.ps1
Bundle check .\scripts\verify-package-bundle.ps1
WinUI smoke .\scripts\smoke-winui.ps1

Repository layout

Soren/
├── include/soren.h           # Shared C ABI
├── crates/                   # Rust workspace (crypto, calendar, vfs, core)
├── zig/soren_ffi/            # Zig → soren.dll
├── cpp/soren_shell/          # C++ smoke (TPM, widget COM)
├── cpp/soren_winui/xaml/     # WinUI 3 app + Security/Widget
├── flutter/soren_ui/         # Flutter view-only UI
├── docs/                     # Threat model, BSI, release, parity
├── scripts/                  # build-all, verify, golden, package, MSIX
├── assets/                   # Logo & branding
└── .github/workflows/        # CI + release

Status

Layer State
Rust core + tests Functional
Zig soren.dll Functional
Flutter UI Functional (calendar + crypto + VFS demo)
C++ shell DPAPI + NCrypt TPM + IWidgetProvider COM + FFI smoke
WinUI 3 XAML Calendar / Crypto / Vault / Security (TPM + Hello + Widget)
WinFsp VFS WAL replay, rename/delete IRP, live-mount integration test
ML-KEM PQ ML-KEM-768 via pqcrypto-mlkem (MSVC)
AES-GCM-SIV RFC 8452 Appendix C.2 vectors
cargo-fuzz scripts/fuzz.ps1 + CI fuzz job
Golden gate scripts/golden-verify.ps1
Release bundle zip + WinUI MSIX + Flutter MSIX + optional Inno installer

Documentation

Document Contents
README.fa.md Persian README (same structure)
LICENSE.md MIT OR Apache-2.0
CONTRIBUTING.md / .fa.md Dev workflow
SECURITY.md / .fa.md Vulnerability reporting
docs/README.md Documentation hub (EN)
docs/RELEASE.md / .fa.md Release & signing
docs/threat-model.md Security architecture
docs/compliance/BSI.md BSI TR-02102-1 mapping
docs/flutter-winui-parity.md UI feature matrix
CHANGELOG.md Release notes

Contributing

See CONTRIBUTING.md (فارسی).

  • Run golden-verify.ps1 before release PRs.
  • English is the canonical docs language; Persian companions (.fa.md) track the same facts.
  • Do not commit secrets, .pfx, or local scratch files.

License

Dual-licensed MIT OR Apache-2.0LICENSE.md.


Soren 0.1.0-bsi-2026 — native Windows calendar, crypto, and encrypted filesystem in one auditable stack.

Languages: English · فارسی

About

Native Windows stack: Jalali calendar, BSI-aligned crypto, ciphertext-only VFS — Rust core, Zig FFI, WinUI & Flutter shells.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages