Skip to content

unseen2004/p2p-mobile-notes-chat

Repository files navigation

VaultLink

Encrypted peer-to-peer notes & chat. No servers. No accounts. No internet.

CI codecov License: MIT


What is VaultLink?

VaultLink connects two Android devices directly over Wi-Fi Direct and lets you:

  • Share encrypted notes that sync between devices
  • Chat in real time with end-to-end encryption
  • Pair securely via QR code with fingerprint verification

All cryptography happens on-device. No server ever sees your data.


Security Model

Layer Algorithm
Identity keys Ed25519 (generated in Rust, stored in Android Keystore)
Key exchange X25519 ECDH + HKDF-SHA256
Message encryption AES-256-GCM (random nonce per message)
At-rest protection AES-256-GCM (PIN-derived key via Argon2id)
Pairing verification QR fingerprint (8-segment hex, manual confirmation)
MITM protection HMAC-SHA256 ACK verification in handshake

Session keys are ephemeral — generated fresh each connection, never written to disk.


Architecture

lib/
├── core/
│   ├── crypto/       # DH handshake, E2EE, session manager
│   ├── p2p/          # Wi-Fi Direct service, message framing
│   ├── chat/         # Chat message model & repository
│   ├── notes/        # Encrypted notes
│   └── pairing/      # QR pairing, contact store
├── features/
│   ├── auth/         # PIN screen, biometric lock
│   ├── chat/         # Chat UI (bubbles, input bar)
│   ├── notes/        # Notes list & editor
│   ├── p2p/          # P2P connection screen
│   └── pairing/      # QR scan & confirm screens
rustlib/              # Rust crypto (Ed25519, X25519, Argon2id via flutter_rust_bridge)
test/                 # Unit + widget tests (target: ≥80% coverage)

Getting Started

Prerequisites

  • Flutter 3.29.0+
  • Rust toolchain (rustup target add aarch64-linux-android)
  • Android SDK 21+

Build

# Install dependencies
flutter pub get

# Run tests
flutter test --coverage

# Run on device
flutter run

# Release build (requires signed keystore — see CI secrets)
flutter build appbundle --release

CI/CD

Workflow Trigger Steps
ci.yml push / PR to main format → analyze → test → coverage
release.yml tag v*.*.* build AAB → sign → GitHub Release

Release signing uses secrets: KEYSTORE_BASE64, KEYSTORE_PASSWORD, KEY_PASSWORD, KEY_ALIAS.


Contributing

PRs welcome. Please run dart format . and flutter analyze before submitting.


License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors