Skip to content

VasuLabs/ciph-vault

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

31 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

CIPH Vault - Secure File Encryption for Android

CIPH Vault Version Rust License

High-performance file encryption for Android powered by Rust

Features โ€ข Screenshots โ€ข Installation โ€ข Build โ€ข Usage


๐Ÿ” Overview

CIPH Vault is a production-grade Android application that provides military-grade file encryption using the CIPH v2 encryption engine written in Rust. It features a beautiful gallery-style interface for managing your sensitive media files with ease.

Why CIPH Vault?

  • ๐Ÿ”’ Military-grade encryption: AES-256-GCM with Argon2 key derivation
  • โšก Blazing fast: Parallel processing with Rayon for maximum speed
  • ๐ŸŽจ Beautiful UI: Modern Material 3 design with dark theme
  • ๐Ÿ“ฑ User-friendly: Gallery-style file browser with multi-select
  • ๐Ÿ’พ Organized storage: Encrypted files stored in Downloads/ciph/
  • ๐Ÿ”‘ Dual passwords: Meta and Data password protection

โœจ Features

Encryption Features

  • AES-256-GCM authenticated encryption
  • Argon2id key derivation function
  • Dual password system (Meta + Data)
  • Parallel processing for fast encryption
  • Chunk-based processing with progress tracking
  • Metadata preservation (file names, timestamps, permissions)

UI Features

  • Gallery view for images and videos
  • Multi-select with visual feedback
  • Real-time progress tracking
  • Encrypted file browser
  • Password visibility toggle
  • Dark theme optimized interface

File Management

  • Automatic organization: Encrypted files in Downloads/ciph/
  • One-tap decryption: Restore files to Downloads
  • File size display: Human-readable sizes
  • Sorted by date: Most recent first
  • Video thumbnails: Preview before encryption

๐Ÿ“ธ Screenshots

Gallery View

Browse your images and videos in a beautiful grid layout with multi-select capability.

Encryption Dialog

Secure dual-password entry with visibility toggles for both Meta and Data passwords.

Encrypted Files

View all your encrypted files organized in one place with easy decryption access.

About Screen

Learn about CIPH Vault's features and how to use the app effectively.


๐Ÿš€ Installation

Option 1: Download APK (Recommended)

  1. Go to Releases
  2. Download the latest ciph-vault-release.apk
  3. Install on your Android device (Enable "Install from Unknown Sources")

Option 2: Build with GitHub Actions

  1. Fork this repository
  2. Go to Actions tab
  3. Click Build APK workflow
  4. Click Run workflow
  5. Wait for build to complete (~5-10 minutes)
  6. Download APK from Artifacts

Option 3: Build Locally

See Building from Source below.


๐Ÿ› ๏ธ Building from Source

Prerequisites

  • Android Studio Hedgehog (2023.1.1) or later
  • Rust 1.70+ with Android targets
  • Android NDK r25c or later
  • JDK 17

Setup Steps

1. Install Rust and Android Targets

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Add Android targets
rustup target add aarch64-linux-android
rustup target add armv7-linux-androideabi
rustup target add i686-linux-android
rustup target add x86_64-linux-android

2. Install Android NDK

In Android Studio:

  1. Tools โ†’ SDK Manager
  2. SDK Tools tab
  3. Check NDK (Side by side)
  4. Select version 25.1.8937393
  5. Click Apply

3. Set Environment Variables

export ANDROID_HOME=$HOME/Android/Sdk
export NDK_HOME=$ANDROID_HOME/ndk/25.1.8937393
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

Add these to your ~/.bashrc or ~/.zshrc for persistence.

4. Clone and Build

# Clone repository
git clone https://github.com/ankit-chaubey/ciph-vault.git
cd ciph-vault

# Build Rust library
./gradlew cargoBuild

# Build APK
./gradlew assembleDebug

# Or build release
./gradlew assembleRelease

5. Install on Device

# Install debug build
./gradlew installDebug

# Or install release
adb install app/build/outputs/apk/release/app-release.apk

Build with Android Studio

  1. Open Android Studio
  2. File โ†’ Open โ†’ Select ciph-vault folder
  3. Wait for Gradle sync and Rust build
  4. Click Run (โ–ถ๏ธ) or Build โ†’ Build APK

๐Ÿ“ฑ Usage

Encrypting Files

  1. Open Gallery Tab

    • Browse your images and videos
    • Tap files to select them
    • Or use "Select All" button
  2. Tap Lock Button (floating action button)

    • Enter Meta Password
    • Enter Data Password
    • Tap Encrypt
  3. Wait for Completion

    • Progress bar shows real-time status
    • Encrypted files saved to Downloads/ciph/

Decrypting Files

  1. Open Encrypted Tab

    • View all encrypted files
    • Tap on a file to decrypt
  2. Enter Passwords

    • Enter same Meta Password
    • Enter same Data Password
    • Tap Decrypt
  3. File Restored

    • Decrypted file saved to Downloads
    • Original filename and metadata restored

Password Tips

  • Use strong passwords: Mix uppercase, lowercase, numbers, symbols
  • Different passwords: Use different Meta and Data passwords
  • Remember them: No password recovery available
  • Write them down: Store securely offline

๐Ÿ—๏ธ Project Structure

ciph-vault/
โ”œโ”€โ”€ .github/
โ”‚   โ””โ”€โ”€ workflows/
โ”‚       โ””โ”€โ”€ build.yml              # GitHub Actions workflow
โ”‚
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ src/main/
โ”‚   โ”‚   โ”œโ”€โ”€ java/com/ciph/vault/
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ CiphNative.kt      # JNI bridge to Rust
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ MainActivity.kt     # Main UI (gallery, encryption)
โ”‚   โ”‚   โ”œโ”€โ”€ res/                    # Android resources
โ”‚   โ”‚   โ””โ”€โ”€ AndroidManifest.xml
โ”‚   โ”œโ”€โ”€ build.gradle.kts            # App build configuration
โ”‚   โ””โ”€โ”€ proguard-rules.pro          # ProGuard optimization
โ”‚
โ”œโ”€โ”€ rust-lib/
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ lib.rs                  # CIPH v2 core engine
โ”‚   โ”‚   โ”œโ”€โ”€ api.rs                  # API layer
โ”‚   โ”‚   โ””โ”€โ”€ ffi.rs                  # JNI bindings
โ”‚   โ””โ”€โ”€ Cargo.toml                  # Rust dependencies
โ”‚
โ”œโ”€โ”€ build.gradle.kts                # Root build configuration
โ”œโ”€โ”€ settings.gradle.kts
โ””โ”€โ”€ README.md                       # This file

๐Ÿ”ง Technical Details

Encryption Specs

  • Algorithm: AES-256-GCM (Galois/Counter Mode)
  • Key Derivation: Argon2id
    • Memory: 64 MB
    • Iterations: 3
    • Parallelism: 1
  • Nonce: 96-bit random nonce per chunk
  • Authentication: 128-bit authentication tag per chunk
  • Chunk Size: 16 MB (configurable)

File Format

[128-byte header]
[Encrypted metadata]
[Encrypted chunk 1 + auth tag]
[Encrypted chunk 2 + auth tag]
...

Header contains:

  • Magic bytes: CIPH
  • Version: 2
  • Salt (16 bytes)
  • Master nonce (12 bytes)
  • Argon2 parameters
  • Metadata length

Performance

  • Encryption Speed: 50-400+ MB/s (device dependent)
  • Parallel Processing: Uses all available CPU cores
  • Memory Efficient: Streaming with memory-mapped I/O
  • APK Size: ~15-20 MB (all architectures)

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development Setup

# Run tests
./gradlew test

# Run Rust tests
cd rust-lib && cargo test

# Format code
./gradlew ktlintFormat
cd rust-lib && cargo fmt

# Lint
./gradlew lint
cd rust-lib && cargo clippy

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ‘ค Author

Ankit Chaubey


๐Ÿ™ Acknowledgments

  • Rust Crypto Community for excellent cryptography libraries
  • Android Jetpack Compose team for modern UI framework
  • Mozilla for rust-android-gradle plugin
  • All contributors and testers

๐Ÿ› Known Issues

  • Large files (>1GB) may take several minutes to encrypt
  • Some devices may require "Allow from this source" for installation
  • Android 11+ requires "All files access" for best experience

๐Ÿ“ฎ Support

If you encounter any issues or have questions:

  1. Check Issues
  2. Open a new issue with:
    • Device model and Android version
    • Steps to reproduce
    • Expected vs actual behavior
    • Logcat output (if applicable)

โš ๏ธ Security Notice

  • Password Recovery: There is NO password recovery. If you forget your passwords, your files cannot be decrypted.
  • Backup: Always keep unencrypted backups of important files.
  • Testing: Test encryption/decryption with non-critical files first.
  • Updates: Keep the app updated for latest security patches.

๐ŸŽฏ Roadmap

  • Cloud backup integration
  • Biometric authentication
  • Password manager integration
  • Batch operations optimization
  • File compression before encryption
  • Secure file shredding
  • Multi-language support

Made with โค๏ธ and ๐Ÿฆ€ Rust

โญ Star this repository if you find it useful!

About

CIPH Vault App is a secure Android file encryption app built with Flutter. It uses AES-256-GCM and modern cryptographic practices to protect local files.

Resources

Stars

12 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors