Secure, local, and memory-safe file encryption vault for Android.
RamLock is a modern, production-ready Android application that provides true local file encryption. By combining a sleek Jetpack Compose interface with a low-level cryptographic engine written in Rust, RamLock guarantees that your data and passwords remain in RAM for the shortest possible time, mitigating memory scraping and unauthorized access.
- Memory-Safe Core: Cryptographic operations are handled natively in Rust. Plaintext buffers are zeroed out (
zeroize) immediately after use. - Zero-Knowledge Architecture: Everything happens locally. No cloud sync, no tracking, no external servers.
- Agnostic File Support: Encrypts everything from small documents to massive video files using block-based AES-256-GCM streaming via JNI.
- Modern UI/UX: Built entirely with Kotlin and Jetpack Compose (Material Design 3), featuring a dark-themed, intuitive vault experience.
- Seamless Integration: Uses Android's Storage Access Framework (SAF) to securely import and isolate files into an encrypted sandbox.
RamLock follows Clean Architecture principles, ensuring a strict boundary between the UI and the native security core:
- UI Layer (Kotlin): Jetpack Compose, ViewModels, and StateFlow.
- Data Layer (Kotlin): Room Database for encrypted file metadata indexing, and Coroutines (
Dispatchers.IO) for non-blocking JNI calls. - Native Security Layer (Rust): Shared library (
.so) compiled viarust-android-gradleexposing a safe JNI bridge to Android.
- Android Studio (Koala or newer recommended)
- Android NDK and CMake (Install via SDK Manager)
- Rust Toolchain (
rustup default stable) - Cross-compilation targets for Android:
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android- Clone the repository:
git clone https://github.com/MiguelG17/RamLock.git- Open the project in Android Studio.
- Gradle will automatically invoke Cargo to compile the
rust_corelibrary during the build process. - Run the app on your emulator or physical device.
We enforce strict quality control:
- Rust Core: Run unit tests and memory safety checks via
cargo testandcargo clippy. - Android: Run UI and unit tests via
./gradlew testand linting via./gradlew detekt.
Crafted with precision for secure local storage.