A secure, open-source encrypted notes application for Android
Features • Screenshots • Architecture • Security • Getting Started • FAQ • License
Note: Due to changes in Google's developer profile policy, AndSafe3 is no longer listed on Google Play. You can build the application from source using the instructions below.
AndSafe3 is an offline-first, client-side encrypted notes app built with Flutter. It is the third-generation rewrite of the original AndroidSafe app, now fully open source under the MIT license.
All encryption and decryption happen entirely on-device — AndSafe3 has no network functionality and never transmits data to any server.
- 🔐 AES-256-CBC Encryption — Every note is individually encrypted using AES in CBC mode with a 256-bit key
- 🧂 scrypt Key Derivation — Password-based key derivation using scrypt (N=65536, r=8, p=1) with per-note salts
- 🔑 Biometric Authentication — Optional fingerprint / face unlock for session access
- 📂 Import & Export — Portable encrypted backup format; import notes from AndSafe v2
- 🔍 Full-Text Search — Fast, indexed search powered by SQLite FTS3
- 🌐 Localization — Internationalization support via Flutter's
intlpackage - 🛡️ Screen Capture Protection — Prevents screenshots of sensitive content
- 🖥️ Cross-Platform Note Reader — Read exported notes on desktop via the companion PyAndSafe project
AndSafe3 follows a clean, modular architecture built on the Provider pattern for dependency injection:
lib/
├── models/ # Domain objects (Note, Signature)
├── pages/ # UI page widgets (home, note list, note editor, etc.)
└── utils/
├── services/ # Service layer (NoteService, SignatureService, AuthService, DatabaseHelper)
└── andsafe_crypto.dart # Cryptographic primitives and key derivation
| Layer | Responsibility |
|---|---|
| UI (Pages) | Presentation logic, user interactions |
| Services | Business logic, CRUD operations, authentication |
| Database | SQLite storage with FTS3 search indexing |
| Crypto | AES-CBC encryption, scrypt key derivation, KCV verification |
CPU-intensive cryptographic operations are executed in background Dart isolates via compute() to maintain a smooth UI.
For detailed architectural documentation, see docs/technical-design.md.
| Property | Value |
|---|---|
| Algorithm | AES-CBC with PKCS7 padding |
| Key Length | 256 bits |
| Key Derivation | scrypt (N=65536, r=8, p=1) |
| Salt | Unique per note |
| IV | Unique per note |
| AES Implementation | Pointy Castle |
| scrypt Implementation | Native C via Tarsnap/scrypt |
Password correctness is verified using a Key Check Value (KCV) mechanism rather than storing the password itself. A random plaintext string is encrypted and the resulting ciphertext (truncated to 3 bytes) is stored as the verification token. This avoids exposing high-entropy key material.
Each note is encrypted with its own derived key. This design originates from the original AndroidSafe v1, which supported sharing individual encrypted notes. As a consequence, operations such as password changes or bulk imports require re-deriving keys and re-encrypting every note within an atomic database transaction.
- Flutter SDK (≥ 3.12.0)
- Android SDK with NDK (required for native scrypt compilation)
# Clone the repository
git clone https://github.com/kitsook/AndSafe3.git
cd AndSafe3
# Install dependencies
flutter pub get
# Run on a connected device or emulator
flutter runflutter testI forgot my password. Can you help me recover it?
No. AndSafe3 uses client-side-only encryption with no backdoors. If you lose your password, your encrypted notes cannot be recovered.
How do I back up my notes?
Use the Export notes function within the app to save all notes to an encrypted backup file. Copy this file to your computer or external storage for safekeeping.
Although exported notes are encrypted, you should still protect the backup file as a best practice.
Where are exported notes stored?
- AndSafe v2:
AndroidSafeExports/under internal storage. - AndSafe3: When you export, the app opens a system directory picker (Android's Storage Access Framework) so you choose the destination folder yourself. The exported file is an XML file named with a timestamp, e.g.,
AndSafe20260717_230000.xml.
[!NOTE] On modern Android (11+), the directory picker may restrict access to certain root-level folders (e.g., the top-level
Downloaddirectory). You can typically select a subfolder withinDocumentsor other user directories. Files saved to user-owned folders will persist even if the app is uninstalled.
Can I import notes from a previous version?
Yes. AndSafe3 can import notes exported from AndSafe v2. Export your notes in the older app, then use the import function in AndSafe3. Note that the reverse (v3 → v2) is not supported.
How does search work?
The full-text search matches from the beginning of whole words only. For example, if a note title is "Password for foobar.com", searching for "pass", "foo", or "com" will find it, but "bar" will not.
This is a limitation of the SQLite FTS3 engine used for backward compatibility.
Can I read encrypted notes on my computer?
Yes. The companion PyAndSafe project provides a Python GUI application for reading exported AndSafe notes on desktop.
- App Icon: From DelliPack by Wendell Fernandes
- AES Implementation: Pointy Castle
- scrypt Implementation: Colin Percival / Tarsnap
This project is licensed under the MIT License.
Copyright © 2021 Clarence K.C. Ho



