Skip to content

Security: pasichDev/Encly

SECURITY.md

Security

Encly is a local encrypted notes application. This document describes the security model of Encly 3.1 (vault format v3), its trust boundaries, and known limitations.

The secret that unlocks the vault depends on the platform. On Android and iOS it is a numeric PIN. On a computer (the desktop app in the repository: Linux, Windows and macOS, none of them released yet) it is a passphrase, stretched with Argon2id. Where this document says PIN, wipe PIN or duress PIN without naming a platform, it describes the phones; on a computer read passphrase, wipe passphrase and duress passphrase, with the rules and formats of Desktop. There is no biometric unlock on a computer.

Key hierarchy

Encly does not derive the SQLCipher key directly from a PIN, a passphrase or a seed.

  • A fresh vault generates a random 256-bit DEK.
  • SQLCipher uses that DEK as a raw key (x'<64 hex>'): the DEK is already uniformly random, so SQLCipher's own PBKDF2 key derivation is skipped. cipher_memory_security is switched on (best effort) so SQLCipher wipes the memory it frees.
  • Unlock factors each protect their own AES-GCM envelope containing the same DEK.
DEK (random 256 bit) ── SQLCipher raw key
├─ PIN slot       AES-GCM(kek_pin)       kek_pin = HKDF(PBKDF2(pin, salt, 600k) ‖ HMAC_keystore(salt ‖ pin))
│                                        (Android, iOS; slot version 3)
├─ passphrase slot AES-GCM(kek_pw)       kek_pw = HKDF(Argon2id(pw, salt, 64 MiB, 3) ‖ HMAC_secretstore(salt ‖ pw))
│                                        (computers, in place of the PIN slot; slot version 4, see "Desktop")
├─ biometric slot AES-GCM(keystore key)  auth-per-use, BIOMETRIC_STRONG CryptoObject
├─ recovery slot  AES-GCM(kek_rec)       kek_rec = HKDF(SHA-256(normalized 12 words), "encly/recovery/kek/v3")
├─ backup-key slot AES-GCM(HKDF(DEK))    holds backupRoot = HKDF(SHA-256(words), "encly/backup/root/v1")
└─ decoy key      AES-GCM(HKDF(DEK))    holds decoy DEK (see "Duress PIN")

decoy DEK (random 256 bit) ── SQLCipher raw key of the decoy vault (vault_b.db)
└─ duress slot    AES-GCM(kek_duress)    kek_duress = HKDF(same PIN KDF run, "encly/pin/decoy/v3")
                                         (computers: the same passphrase KDF run, "encly/secret/decoy/v4")

A vault has one secret slot: the PIN slot on a phone, the passphrase slot on a computer. Both live in the entry pin.slot; only the bytes differ.

PIN slot

This section is about the PIN of Android and iOS.

  • The PIN is 6 to 12 digits, the user's choice. Shorter PINs are not offered: the lockout and the device-bound half below limit how many guesses anyone gets, and 6 digits is the shortest that stays safe under those limits. The length is not stored anywhere: the KDF below is the same for every length, so a PIN made when the PIN was fixed at 6 digits derives exactly the keys it did (the golden tests pin that), and an attacker who copies the slot learns nothing about the length. The lock screen does not auto-submit and does not show how long the PIN is: the row shows one filled dot per digit typed and no empty rings (it is empty before the first digit, and keeps its height so the layout does not move), the dots of a failed attempt stay in the error colour until the next digit is typed, and an Unlock button sends what was typed. A stored length (to submit at it) would leak it, and would also make the wipe PIN and the duress PIN, which may have another length than the PIN, impossible to enter. The wipe PIN and the duress PIN follow the same 6 to 12 digit rule and the same KDF run, so nothing in the store or on screen tells which of the three a PIN is.
  • The PIN KEK has two halves, mixed with HKDF-SHA256 (info = "encly/pin/kek/v3", the slot's random 16-byte salt as HKDF salt):
    • software: PBKDF2-HMAC-SHA256 (600,000 iterations) of the PIN and the salt;
    • device-bound: HMAC-SHA256 of salt ‖ PIN under a non-exportable AndroidKeyStore key, generated in StrongBox where the device has one (falling back to the TEE), and usable only while the device is unlocked (setUnlockedDeviceRequired, API 28+).
  • That KEK wraps the DEK with AES-256-GCM. The slot is version ‖ salt ‖ IV ‖ ciphertext; the version and salt are authenticated as associated data ("encly/pin/slot/v3").
  • No separate PIN hash is stored.
  • Because of the device-bound half, a copied slot cannot be attacked off the device: on Android every PIN guess needs this phone's secure hardware (the iOS build gets the same property with a different construction, see iOS; the desktop build does not have it, see Desktop). PBKDF2 stays at full cost as defence in depth, for the case where the Keystore key itself were ever extracted.
  • If the Keystore key is lost (a Keystore reset, a key the system invalidated), the PIN can no longer unlock. The lock screen says so and switches to the recovery phrase (or keeps fingerprint unlock); the vault without either routes to the damaged-vault screen. A new PIN set after a recovery unlock gets a new Keystore key.
  • Wrong PINs fail GCM authentication. Lockout: every attempt is recorded durably (atomic file write) before the key derivation runs, under one lock, so killing the app mid-check or racing attempts never yields a free guess. From the 5th consecutive miss the lockout is 30 s and doubles with each further miss (1, 2, 4 … 32 min, ~1 h …) up to 24 h. It runs on SystemClock.elapsedRealtime, so changing the wall clock does not end it; across a reboot the remaining penalty is kept and restarts from boot (a reboot never shortens a lockout). A failure of the Keystore itself is not counted as a guess. A second counter (pin.strikes) keeps the misses since the PIN itself was last right; see the duress PIN below for why. Wrong PINs never erase anything: the only wipe is the optional wipe PIN below, and only when the user set one up.
  • Changing the PIN keeps the slot's salt (slots written before keep their own), so a wipe PIN set earlier keeps working.
  • Downgrade and PIN length. A PIN longer than 6 digits cannot be entered in versions before 3.0.0: their keypad submits at the sixth digit, so every attempt with a longer PIN is a counted miss and the lockout escalates, until the user turns to the recovery phrase. Upgrading again changes nothing: the PIN and its slot are untouched. A PIN of 6 digits works in every version.
  • Leftover entries. Development builds briefly wrote a pin.password.slot entry (and pin.password.notice). No release reads or writes them. A vault file that has them opens with its PIN as before; the entries are ignored and dropped by the next PIN write or erase.

iOS

The device-bound half is computed by the Secure Enclave once per PIN guess, but not as an HMAC: the Enclave holds only EC keys and answers ECDH. Per PIN key slot the app makes a non-extractable P-256 key inside the Enclave (kSecAttrTokenIDSecureEnclave, access control privateKeyUsage only, WhenUnlockedThisDeviceOnly: usable while the phone is unlocked, never in iCloud Keychain or a backup restored to another device, no biometry). For a guess, with data = salt ‖ PIN:

Q  = hash_to_curve("encly.ios.pin-factor.v2/hash-to-point" ‖ slot ‖ data)   (SHA-256, try-and-increment)
Z  = x(d · Q)                                  one ECDH inside the Secure Enclave
hw = HKDF-SHA256(Z, salt = info prefix, info = "encly.ios.pin-factor.v2/hw" ‖ data)   (32 bytes)

hw replaces the Android HMAC in the PIN KEK. Why this needs the Enclave for every guess: Q is a hash of the guess, so nobody knows its discrete logarithm, and d · Q cannot be computed without d, which exists only in the Enclave. Two simpler constructions were rejected because they let the PIN be searched without it: Q = k·G with k derived from the PIN gives d·Q = k·(d·G), computable from the public key; and a fixed peer key with the PIN mixed in after the agreement gives a per-slot constant that one capture turns into an offline search.

  • A copy of the vault file, the Keychain and everything else on the phone except the Enclave does not let anyone test PINs. The point Q is as sensitive as the PIN (10^6 SHA-256 calls recover the PIN from it) and is wiped after use. Someone who can run code in the app while the phone is unlocked (a jailbreak, a debugger on a development build) can still ask the Enclave one guess at a time; the guess rate is the Enclave's, not a GPU's, and the app's lockout is not what protects against that attacker.
  • The Enclave key is gone when the phone is restored from a backup onto another one or the Enclave key is otherwise lost. That is the lost-key state above: the PIN no longer unlocks and the recovery phrase is needed. Removing the device passcode does not drop this key (WhenUnlockedThisDeviceOnly does not need a passcode); it deletes the biometric item (WhenPasscodeSetThisDeviceOnly), so Face ID unlock ends and the PIN still works.
  • No Enclave, no PIN. Every iPhone that runs iOS 15 has a Secure Enclave. If a device cannot make the key, setting a PIN fails; the app never falls back to a software key on a device. The iOS Simulator has no Enclave and uses a software key in the Keychain so that the app and its tests can run; that code is compiled only for the Simulator and gives no protection against someone who can read the Mac.
  • Not verified on hardware by the test suite: the Enclave key itself (the Simulator cannot run it). The construction is tested with software P-256 keys against values computed independently with CryptoKit.

Desktop

The desktop app is not released: Encly 3.1.0 is published for Android only. This section describes the code as it is; nothing here is a promise about a build that anyone can download. The Linux packages (a .deb and a Flatpak bundle) are built by CI and from source, and Windows and macOS are in the repository too, none of them published.

On a computer the vault is unlocked with a passphrase, not a PIN, and the passphrase is stretched with Argon2id instead of PBKDF2. Android and iOS are unchanged: the PIN, PBKDF2-HMAC-SHA256 with 600,000 iterations and slot version 3 stay byte for byte as described above.

Everything else keeps its name and its place. The state file is still vault_state_v3.bin (vault format v3), and the entries are still pin.slot, pin.wipe.slot, pin.decoy.slot, pin.key_slot, decoy.key, lockout.* and pin.strikes, and the secret-store items keep their names (pin-factor-v1). Only the bytes inside the three secret-derived slots are different: they are slot version 4. The recovery slot, the backup-key slot and decoy.key are the same as on a phone.

The passphrase

  • To set (the passphrase, the wipe passphrase and the duress passphrase): text of 12 to 128 code points after normalisation to Unicode NFC (an emoji counts once), not only digits (digits of any script), with at least 5 distinct code points. Text with an unpaired surrogate is refused. NFC means that the same text typed with precomposed or decomposed letters, which keyboards and systems differ on, gives the same key.
  • To unlock: what is typed is taken only up to 768 UTF-16 units (128 code points times the 6 units that one character can take when written decomposed), then turned to NFC; anything from 1 to 256 UTF-16 units of that NFC form is accepted and checked, so tightening the rule for setting a passphrase can never lock anyone out. What is outside that range is a wrong attempt, counted like any other. When a passphrase is being set, an NFC form of more than 128 code points (but within the 768 units typed) is reported as too long, not as one that cannot be used.
  • Suggest a passphrase is offered wherever a new passphrase is chosen (onboarding, the new passphrase that a recovery-phrase unlock asks for, Change passphrase, the wipe passphrase and the duress passphrase). It gives five words drawn independently and uniformly from the 2048-word BIP39 English list by the system's random generator (rejection sampling, so no word is likelier than another): 55 bits. The words are not the recovery phrase and are shown as such.
  • The lock screen is one masked field and an Unlock button (Enter also sends it). There is no auto-submit and no length is stored or shown, so the same field takes the passphrase, the wipe passphrase and the duress passphrase and nothing in the store or on screen tells which of the three it is. An eye shows what is typed, a hint shows while Caps Lock is on, and what is typed is emptied from the field when it is sent. A masked field refuses copy and cut; when the text is shown, the copy and cut keys are swallowed too, and the field has no context menu, so the passphrase does not reach a clipboard that Encly cannot clear.
  • One KDF run, three slots. Exactly as for the PIN: every attempt is counted before the derivation, runs Argon2id and the device-secret HMAC once, derives the three KEKs and always tries all three AES-GCM opens. The wipe passphrase and the duress passphrase follow the same rule as the passphrase and are refused when they equal another one (a refusal costs a miss, as for the PIN).
  • A stretch that cannot run (the 64 MiB the derivation needs could not be allocated) is not a guess: the attempt is given back, nothing is counted and the lock screen reports a failure of the key storage, as when the keyring does not answer. Trying again may work.

Derivation and slot format

pw   = UTF-8(NFC(passphrase))
sw   = Argon2id(pw, salt, m = 64 MiB, t = 3, p = 1) → 32 bytes          (version 1.3, RFC 9106)
hw   = HMAC-SHA256(deviceSecret, "encly/secret/hw/v4" ‖ salt ‖ pw)
ikm  = sw ‖ hw
kek  = HKDF-SHA256(ikm, salt, "encly/secret/kek/v4")                    (the passphrase slot)
wkek = HKDF-SHA256(ikm, salt, "encly/secret/wipe/v4")                   (the wipe slot)
dkek = HKDF-SHA256(ikm, salt, "encly/secret/decoy/v4")                  (the duress slot)

Argon2id comes from Bouncy Castle (bcprov-jdk18on 1.86, MIT licence), which is a dependency of the desktop build only and is not on the Android or iOS classpath. Nothing of the v3 handling is reused: the v3 code truncates each character to a byte, which would make every non-ASCII passphrase weaker than it looks.

The passphrase slot (pin.slot) is 85 bytes:

Offset Size Field
0 1 version = 0x04
1 1 KDF id: 0x02 = Argon2id (0x01 = PBKDF2 is set aside for the PIN and never written in version 4)
2 1 factor id: 0x01 = HMAC-SHA256 under a key of the OS secret store
3 4 Argon2 memory in KiB, unsigned big-endian
7 1 Argon2 passes
8 1 Argon2 lanes
9 16 salt
25 12 AES-GCM IV
37 48 AES-256-GCM(kek, IV)(DEK) with its 16-byte tag

The AAD is "encly/secret/slot/v4" ‖ bytes[0..25), so the version, the ids, the costs and the salt are all authenticated. The wipe slot (pin.wipe.slot) and the duress slot (pin.decoy.slot) are 0x04 ‖ IV(12) ‖ ciphertext(48), 61 bytes as on a phone, with the AAD "encly/secret/wipe-slot/v4" or "encly/secret/decoy-slot/v4" followed by the passphrase slot's first 25 bytes. Without a wipe or duress passphrase they hold random bytes whose first byte is 0x04. The three entries have the same sizes either way, and the wipe and the duress slot have no salt of their own. A new slot is written with m = 65,536 KiB, t = 3, p = 1.

A slot's header is attacker-controlled input and is checked before anything is allocated or stretched: version 4, KDF id 2, factor id 1, memory from 64 MiB to 1 GiB, 3 to 10 passes, exactly 1 lane. A slot that is not accepted does not exist for the attempt: it is no counted guess, and nothing is derived or sent to the secret store. Under the PIN it is the other way round, exactly as before: a pin.slot that cannot be read still costs an attempt (the policy says which, in UnlockSecretPolicy.chargesForUnusableSlot). A passphrase change keeps the slot's salt, so a wipe or duress passphrase set earlier keeps working, but only while the kept slot has the same format and costs as the one written now; otherwise both are turned off, like after a reset device secret, and Settings says so.

A version 3 slot on a computer. Only development builds ever wrote one on a computer, and there is no migration. Such a slot is not usable: with a recovery phrase the user unlocks by the phrase and must set a passphrase (which writes a version 4 slot); without one, the vault goes to the damaged-vault screen. Conversely, the PIN policy of a phone reads only version 3 slots.

Backups. The backup key and the recovery KEK come from the 12 recovery words alone (SHA-256 of the words, then HKDF): the unlock secret takes no part. A backup made on a phone restores on a computer, and the reverse. The passphrase is not a backup passphrase either: backups still have none (see Encrypted backups).

The device secret

The device-bound half is hw above: an HMAC under a deviceSecret of 32 random bytes from SecureRandom, created once per OS user (and once per key slot) and kept only in the operating system's secret store of that user. Encly's own files never hold it unprotected, and it is never logged. It is a mandatory second factor: without it the passphrase alone opens nothing, and a copy of the vault files alone cannot be attacked.

OS Where the secret lives
Windows Encrypted with DPAPI (CryptProtectData, current-user scope, no UI, Encly-specific entropy). The encrypted blob is a file in %LOCALAPPDATA%\pasichdev\Encly\ (the data folder, not the install folder %LOCALAPPDATA%\Programs\Encly, so an upgrade or uninstall of the app does not touch it; local to the machine, not the roaming profile that is copied to profile servers); only the same Windows user can decrypt it.
macOS A generic password in the user's login Keychain (service com.pasich.encly, account pin-factor-v1), through Security.framework.
Linux An item of the default collection of the freedesktop Secret Service (GNOME Keyring, KWallet, KeePassXC), attributes application = com.pasich.encly, purpose = pin-factor-v1 (pin-factor-v1-b for the second key slot) and vault = the absolute path of the data folder, so the secret is per OS user, per key slot and per data directory. The secret crosses the session bus encrypted (dh-ietf1024-sha256-aes128-cbc-pkcs7: Diffie-Hellman in the 1024-bit Oakley group 2, an AES-128 key from HKDF-SHA256, AES-CBC), never as plain; a service that cannot do the exchange is reported as unavailable. Without a running Secret Service (a headless session) the passphrase cannot be used; there is no fallback to a file. A locked default keyring, or a service that is not running, is a temporary failure, not a lost key: the lock screen, the passphrase setup in onboarding and the passphrase change in Settings say what is missing (for a locked keyring "Unlock your system keyring and try again"), and the attempt that met it is not counted. Encly calls Unlock on the collection and, when the service answers with a prompt, runs it (Prompt.Prompt, then waits for the Completed signal) and the service shows its own dialog; the wait is at most 120 seconds, and a lock of the vault dismisses the prompt (Prompt.Dismiss) and ends the wait. A prompt that is dismissed, left unanswered or ended by a lock reports the keyring as unavailable. A missing default collection is created through the service (CreateCollection, which prompts); reading and writing the item run the prompts the service asks for, and onboarding checks all of this before a secret is chosen. Deleting the item never prompts: a locked keyring leaves it. An item that is not found is not treated as a lost key on Linux (the item may be in another keyring, in one that is closed, or under another data folder): the lock screen says the key was not found and offers Try again, the recovery phrase when there is one, and, as the last resort, a hold-to-confirm wipe; nothing is counted. On Windows and macOS, whose builds are not published, a missing secret is still a lost key.

The second key slot (used after a wipe-passphrase unlock) keeps its own secret under the same names with a -b suffix.

On Windows the DPAPI blob and the vault are in the local profile (%LOCALAPPDATA%), never the roaming one. In a domain, DPAPI master keys can be recovered with the domain's backup key, so domain administrators can obtain the secret of a domain user; that is part of the desktop trust boundary below. On macOS the data folder is excluded from Time Machine (the sticky com.apple.metadata:com_apple_backup_excludeItem attribute, set at every start).

A secret that is missing or can no longer be read (a reset or replaced keyring, a new OS account, a profile restored elsewhere) leaves the passphrase unable to unlock, as a lost Keystore key above does, and the recovery phrase is the way in; after it a new passphrase is set (and a new device secret is made). On Linux the lock screen says that the key was not found and does not call it lost (see the Linux row above); an item that is there but has the wrong size is still a lost key. Without a recovery phrase the vault cannot be opened, and the wipe is the only way on. A store that is only locked or not running is a temporary failure, not a lost key.

Because the Linux secret is tied to the data directory, a vault that is moved to another path, opened with a changed XDG_DATA_HOME, or copied between the .deb and the Flatpak (their data folders differ) finds no item: the key is reported as not found, Try again can succeed only if the item comes back, and otherwise only the recovery phrase opens it; a new passphrase then makes a new secret for the new place.

A new vault always makes a new device secret, replacing an item of the same name that an earlier erase could not delete, so the secret of an erased vault is never adopted by the next one.

Erase all data deletes the device secret from the store, but the deletion never reports a failure and never prompts: with the keyring locked or not running, the erase succeeds and the item stays, without telling the user. It is only the device half, which is useless without the deleted vault, but to remove it, delete the item whose application attribute is com.pasich.encly (and vault the old data folder) in your keyring program (Passwords and Keys, KWalletManager, KeePassXC).

This key is software-bound to the OS user account, not hardware-bound. It does not sit in a StrongBox, a TEE or a Secure Enclave, and the secret store releases it to any process running as the same user (macOS may ask the user on the first read by another program; DPAPI and the Secret Service do not). Secure Enclave, TPM and FIDO2 keys are not used: the slot header has a factor id so that one could be added without a new format, and only id 1 is written or accepted.

What the passphrase protects, and what it does not

On a computer the vault is as strong as the passphrase. What Argon2id adds is cost per guess: against one RTX 4090, public benchmarks put PBKDF2-HMAC-SHA256 at 600,000 iterations at about 14,800 guesses per second (derived from hashcat 6.2.6, 8.87 MH/s at 999 iterations) and Argon2id with 64 MiB and 3 passes at about 1,700 (hashcat 7.0.0 release notes), roughly nine times fewer. That is a multiplier on the cost of each guess and no more: it does not make a weak passphrase safe, and a PIN-sized secret would not be saved by it. On an Apple M2 one derivation takes about 0.17 s; slower computers were not measured. A suggested passphrase of five words has 55 bits.

What the passphrase changes is the attacker who gets the vault files and the device secret once, while the vault is locked: an infostealer, a stolen or seized computer whose OS login is known, a backup of the home directory that includes the keyring. That attacker has no lockout and no app to go through, and has to guess the passphrase offline against Argon2id: with a long passphrase that is out of reach, with a short or common one it is not. With only the vault files, or only the keyring, nothing can be tested.

What no passphrase stops:

  • malware running as the user while the vault is open (it can read the open database and the process's memory, and act as Encly), or at any time (it can read the secret store and the files);
  • a keylogger. The Flatpak and the .deb (built by CI, not published) both run the bundled Java runtime through X11 (XWayland on a Wayland session), where any client of the session can read keystrokes, so the sandbox does not help against one;
  • screen capture: Linux has no call to exclude a window from it;
  • a screen locker that the session does not report: the app sees logind's Lock, PrepareForSleep and LockedHint and the ActiveChanged of the four screen savers it knows (freedesktop, GNOME, Cinnamon, MATE). A locker that reports to none of them (xscreensaver, a bare i3lock or slock without xss-lock) is not detected, and then only the focus and idle locks apply;
  • a replaced Encly binary or a replaced runtime;
  • swap and hibernation images, which can hold the passphrase or the open vault's memory, unless the disk is encrypted;
  • root, and anyone who has the OS login together with the files.

Lockout. The lockout (see the PIN slot above) and the strikes work as on a phone, on the OS uptime and the boot id instead of elapsedRealtime. On a computer they only throttle guessing through the app's own lock screen. An attacker who holds the files never runs the app, so the lockout is not what protects the vault there: the passphrase is.

Wipe passphrase and duress passphrase work as the wipe PIN and the duress PIN below, with the same single derivation and three slot checks, the version 4 slots and the rule above. The wipe passphrase's crypto-erase is weaker than on Android. It deletes the device secret and makes a new one under the other key slot, but a secret store gives no guarantee that a deleted item is gone, and an attacker who copied the device secret before the wipe still holds it. With a copy of the old vault files and of that secret, the old passphrase still opens the old copies. The old files are unlinked, not overwritten, as on Android.

Memory

  • The typed passphrase passes through the text field's state and the platform's input-method buffers. They cannot be wiped the way the PIN's CharArray is. Encly keeps the text only while the form is up, never in saved state, and hands a CharArray that it wipes to the check.
  • Text with a character from U+0300 up (a combining mark, Cyrillic, Greek, CJK, an emoji) goes through the JDK's normaliser, which works on immutable Strings that stay in memory until the garbage collector takes them. A passphrase of characters below U+0300 (ASCII and Western European letters) is already in NFC and never becomes a String here.
  • Every array that Encly itself makes from the passphrase is wiped before the call returns, and Argon2's memory matrix is wiped after each run (it uses a block pool of its own). What is not reachable is Bouncy Castle's working blocks and its Blake2b state, which stay for the garbage collector, as do the JCA Mac's internal copies and the native calls'.

The desktop process

The app starts its JVM with -XX:+DisableAttachMechanism, so another process of the same user cannot attach to it (the Attach API: jcmd, a debugger, an agent) and run code inside the process that the macOS Keychain item trusts. The packaged runtime does not contain java.instrument, so an agent named in JAVA_TOOL_OPTIONS cannot be loaded either. What this does not stop: the environment variable can still add other JVM options, and code running as the same user can read the process in other ways, so it remains part of the desktop trust boundary above (it can act as Encly). On macOS the app's code signing (not published) uses the disable-library-validation entitlement: JNA, Skiko and the SQLCipher driver extract their native libraries at run time into a cache, where they are not signed with the team ID. Shipping them signed inside the .app (and loading them from there only) would let it be dropped; the code does not do that.

Quit, lock and clipboard. Cmd+Q, the Dock's Quit and a logout on macOS end the app the same way the menu's Exit does (the editors are saved, the vault is locked and the clipboard is emptied of Encly's clip). A clip of Encly's that is still on the clipboard is also cleared when the vault locks, not only after 60 seconds. On Windows and macOS a copy is marked so that clipboard history, cloud sync and Universal Clipboard leave it out. On Linux it carries the x-kde-passwordManagerHint target, which Klipper and CopyQ honour; GPaste and other clipboard managers may still keep a copy that the wipe cannot reach. A plaintext export (Markdown, PDF) and a backup file that Encly creates on macOS or Linux are readable by their owner only (0600); a file that the save dialog had already created keeps its permissions. Once written, the file is outside Encly's control.

Locking on Linux. The vault locks on every lock that the session reports (logind's Lock, PrepareForSleep and LockedHint, and the ActiveChanged of the freedesktop, GNOME, Cinnamon and MATE screen savers), including every later one after a locker that never says it has ended (swaylock, or i3lock through xss-lock). logind is asked for the state rather than trusted to report its end, so a later lock is never swallowed as a repeat of one that is long over. A screen saver whose bus name nobody owns is counted as not there (asked with NameHasOwner, not read and failed); one that is there and then fails to answer leaves the state unknown, and unknown is not read as unlocked. A "locked" that only a signal set, and that the OS cannot confirm, is dropped after 3 unanswered questions in a row spread over at least 30 seconds; a later lock report starts the count again. That cannot leave the vault open: the vault is closed by the lock signal itself, and the flag only decides whether an unlock typed into Encly's own window may complete, which behind a real lock screen cannot be typed. logind's Lock, Unlock and PrepareForSleep are taken only from this session's object path (from any session's, when this one cannot be found) and from the manager, and only when the sender is the current owner of org.freedesktop.login1; when the owner cannot be asked the signal is taken anyway, because a lock that is dropped leaves more open than one that is heard wrongly. Root is outside what this covers, and a locker that reports nothing is still not detected (see above).

A forced new secret. While an unlock by the recovery phrase still owes a new passphrase (or the choice to keep the old one), the app cannot be taken past that screen from another window, and menu and keyboard commands other than Lock are refused, so the new passphrase cannot be skipped by opening a second window.

Wipe PIN

An optional second PIN (Settings → Security → Wipe PIN; set, replace or turn off, each after the real PIN). Typed on the lock screen, it erases the vault without a visible sign and opens Encly as an empty vault, not onboarding. It is meant for coercion on the spot ("open the app and show me"), not against a forensic examination.

On a computer this is the wipe passphrase: the same design with the passphrase rule instead of 6 to 12 digits, Argon2id instead of PBKDF2, the slot version 4 formats and the encly/secret/*/v4 HKDF infos (see Desktop). Its crypto-erase is weaker there, because the device secret can be copied before the wipe. The rest of this section describes the PIN.

  • Recognising it without showing it is set. Every vault with a PIN slot has a pin.wipe.slot of the same length: version ‖ IV ‖ AES-GCM_wkek(random marker), with wkek = HKDF(sw ‖ hw, salt, info = "encly/pin/wipe/v3") from the same KDF run as the PIN KEK and the AAD ("encly/pin/wipe-slot/v3") bound to the PIN slot's salt. It has no salt of its own (a second salt equal to or different from the first would give it away). Without a wipe PIN it holds random bytes, written by a startup migration that needs no PIN and leaves pin.slot byte for byte as it was. The store has the same keys and sizes either way; no verifier, hash or extra Keystore key exists for it. Only the wipe PIN itself can tell, so Settings never shows whether one is set. Setting another PIN (wipe, duress or a new PIN) in Settings is refused when it is one of the others, which tells; each such refusal therefore costs a miss like a wrong guess, and the wipe and duress PIN cannot be set during a lockout.

  • Same cost either way. Each attempt runs PBKDF2 and the Keystore HMAC once, derives both KEKs and always tries both AES-GCM opens, without early exit.

  • Rules. 6 to 12 digits and different from the PIN (checked by opening the PIN slot with it). Changing the PIN to the wipe PIN turns the wipe PIN off (one PIN never opens both slots). A reset of the PIN's Keystore key (see above), or a new PIN set after that key was deleted and had to be created anew, turns it off too, since the slot can never open again; Settings then says so.

  • Lockout. It counts as an attempt before the KDF like any PIN and is refused during a lockout. Once it matched, the erase clears the lockout like a right PIN. Inside an open vault (PIN re-checks in Settings or before an export) it is just a wrong PIN; it wipes only from the lock screen.

  • What is destroyed, crypto-erase first. The PIN's Keystore key alternates between two aliases (encly_pin_factor_v3, the one every vault starts with, and encly_pin_factor_v3b); the active one is recorded in the store (pin.key_slot). On the wipe PIN:

    1. with the wipe PIN still in memory: a new key under the other alias, a new random DEK, a new PIN slot that the wipe PIN opens (same salt, reusing the PBKDF2 result already computed, so the slow half does not run twice) and a fresh decoy wipe slot;
    2. one atomic store write swaps them in and drops the recovery, backup-key and biometric slots, the biometric flag and the lockout, and records wipe.pending;
    3. the old database.db (with -wal, -shm) is deleted, the empty database is created with the new DEK and opened, and wipe.pending records that it exists before the vault is shown (if that write fails, the database is closed again and the unlock fails; the next one creates it anew);
    4. while the vault is revealed, the old PIN key, the biometric key and the "last export" date are deleted and wipe.pending is dropped.

    A kill at any point ends in either the old vault (before step 2) or an empty one: startup repeats steps 3 and 4 while wipe.pending is set (every step is a deletion; the database is only deleted while it is not open, under the same lock as the unlock that creates it, and only at the first start of a process), and the next PIN unlock creates the empty database if it does not exist yet. If no key can be created under the other alias, the erase still replaces the slots and deletes the database, only without erasing the old PIN key. An erase that fails before step 2 changes nothing and deletes the key it made; one the process died in before step 2 leaves that key under the second alias, which the next start deletes (while the first alias is active and nothing is pending). Afterwards the old PIN is a wrong PIN like any other, and the wipe PIN is the PIN of the empty vault. Theme, sorting, auto-lock and keyboard settings stay. vault.version stays so that the empty vault is a committed vault; it has no recovery phrase until one is added.

  • Not touched: backup files already exported. They stay encrypted with the recovery phrase and are the only way back; the settings page says so.

  • Biometrics are not switched off when a wipe PIN is set (a fingerprint icon disappearing from the lock screen would itself be a sign). Someone can force a finger onto the sensor and open the real vault, so the settings page warns about it and offers to turn biometric unlock off.

  • After the erase nothing of the old vault reappears: the note that was open when the app re-locked is reopened after an unlock only in the vault it was opened in (each erase starts a new epoch, and a restarted process starts one that matches nothing), and a screen that was in the background while the vault was unlocked elsewhere (the My Notes hand-off's lock screen) is replaced by the lock screen or the notes list when it comes back.

  • Unlock time. The wipe path is slower than a normal unlock, and this is not hidden: on top of the same KDF run it generates a new Keystore key (in StrongBox where there is one, which can take noticeably longer than the TEE), runs one more HMAC, writes the store twice (each write synced to disk) and creates the empty database. The rest of the erase (deleting the old keys) runs after the vault is shown, and the empty vault opens behind the same unlock animation, but someone timing the unlock, or simply noticing a longer pause on a phone with StrongBox, may tell the two apart. No delay is added to normal unlocks to hide it.

  • Limits. Against a forensic look at the phone this is partial: leftovers in flash, the filesystem journal, two snapshots taken before and after, or simply an empty vault on a phone where Encly was used for years. On a rooted, unlocked phone PIN guessing through the Keystore (see "Important limitations") finds the wipe PIN as well. Overwriting files on flash is not reliable, which is why the erase relies on deleting keys first. That crypto-erase covers the PIN path only: it destroys the PIN's Keystore key, but the recovery slot of the previous state file needs nothing but the 12 words. The old file is unlinked, not overwritten, so someone who holds a previously written recovery phrase and can carve the deleted state file and database out of flash could still recover the erased vault.

  • Downgrade. Older builds ignore the new store entries and keep opening a vault that never used the wipe PIN. After a wipe has happened (the PIN key moved to the second alias), an older build only knows the first alias: the PIN reports a lost key there and cannot unlock. A PIN changed in an older build gets a new salt, which silently turns a wipe PIN off: after upgrading again the wipe slot is kept but can never open, and Settings does not say so (it cannot tell without the wipe PIN), so set the wipe PIN again after such a round trip. Apart from this, the same release moves the database to version 4, which older builds cannot open at all (see CHANGELOG).

Duress PIN

An optional third PIN (Settings → Security → Duress PIN; set, change or turn off, each after the real PIN). Typed on the lock screen, it opens a decoy vault: a second, fully usable vault with its own random DEK and its own SQLCipher database (vault_b.db, with its -wal and -shm), empty the first time. Its notes, tags and tasks persist across re-locks and restarts. The real vault stays closed and is not changed. Unlike the wipe PIN, it erases nothing. It is meant for "open the app and show me", not against a forensic examination.

On a computer this is the duress passphrase: the same design with the passphrase rule instead of 6 to 12 digits, Argon2id instead of PBKDF2, and the slot version 4 formats and encly/secret/decoy/v4 info (see Desktop); decoy.key is unchanged. The rest of this section describes the PIN.

  • Key material. The duress slot (pin.decoy.slot) is version ‖ IV ‖ AES-GCM_dkek(decoy DEK), dkek = HKDF(sw ‖ hw, salt, info = "encly/pin/decoy/v3") from the same KDF run as the PIN KEK, its AAD ("encly/pin/decoy-slot/v3") bound to the PIN slot's salt, like the wipe slot. The real vault also keeps the decoy DEK in decoy.key, sealed under HKDF(DEK, "encly/decoy/key/salt/v1", "encly/decoy/key/kek/v1"), so changing the duress PIN keeps the decoy notes and only the real vault's session can tell whether a decoy vault exists. The decoy DEK never wraps or unwraps anything of the real vault, and nothing derived from it opens a real-vault slot.
  • Nothing in the store shows it is set. Both entries always exist with the same length: a startup migration that needs no PIN writes random bytes into them and leaves pin.slot byte for byte as it was; turning the duress PIN off writes random bytes again, and every step that replaces one of them (a new PIN slot, the erase) replaces it with or without a decoy vault. Whether a dead duress slot needs setting again is kept inside decoy.key (sealed with another AAD, "encly/decoy/key/off/v1"), not in a store entry of its own. The lockout counters are the exception, see below.
  • One attempt, three slots. Every lock-screen attempt is counted before the KDF, runs PBKDF2 and the Keystore HMAC once, derives the three KEKs and always tries all three AES-GCM opens, without early exit. The PIN opens the real vault and the duress PIN the decoy one with the same result, animation and screen; the wipe PIN erases. Settings never lets one PIN open two slots; should it happen anyway, the order is PIN, duress, wipe (never the erase while a PIN could open a vault). The duress PIN is refused during a lockout and ends it like the PIN, but not the strikes (misses since the PIN itself was last right): from the 10th strike on every miss is locked out, escalating as above, even right after the duress PIN opened the decoy vault. Without that, someone who was given the duress PIN could guess at the real PIN 4 times, type the duress PIN to reset the lockout, and repeat without limit. The cost is a store-level tell: after misses, a duress unlock leaves pin.strikes in the state file with no matching lockout failures, which a real PIN unlock never does, so anyone who can read the app's private files can see that a duress PIN exists. The entry stays until the real PIN is typed again (or a new PIN is set, or the wipe PIN erases the vault): later misses, fingerprint unlocks and recovery-phrase unlocks do not clear it, so someone who unlocks mostly with a fingerprint can carry it for weeks. On screen, from the 10th strike on every miss is locked out (as above). A duress unlock with no misses before it leaves the same entries as a real PIN unlock.
  • Rules. 6 to 12 digits, different from the PIN and from the wipe PIN (checked by opening their slots with it); a wipe PIN equal to the duress PIN is refused, and so is changing the PIN to the duress PIN, since either would silently orphan the decoy notes. A reset of the PIN's Keystore key, or a PIN set with a new salt (after a recovery-phrase unlock when the PIN slot could not be read), turns the duress PIN off like the wipe PIN; Settings in the real vault then shows it as off and says why, and setting it again opens the same decoy notes. A refused collision costs a miss, as for the wipe PIN.
  • Inside the decoy vault. Notes, tags, tasks, trash, search, sorting and appearance work as usual. Settings shows the same entries as in the real vault, and everything that belongs to the real vault is refused by the security layer and fails like a storage error would, with the usual generic message: changing the PIN, the wipe and duress PINs, the recovery phrase, encrypted backups (export and import) and "Erase all data" (fingerprint unlock is the exception, see the next item). A PIN re-check there accepts the duress PIN only, so the decoy vault itself cannot be used to test guesses of the real PIN; on the lock screen the strikes above bound them. A refused PIN change there runs the same KDF step as the real vault's own work (one PBKDF2 and Keystore run over the PIN typed), so the refusal does not come back faster. Fingerprint unlock and the recovery phrase on the lock screen always open the real vault, and nothing in the decoy vault offers a way to switch: to change vaults, lock and type the other PIN. App settings (theme, sorting, font, auto-lock, keyboard privacy) are shared.
  • Fingerprint in the decoy vault (a known tell). Settings there shows fingerprint unlock as it is set in the app, but the decoy vault cannot use it: the PIN re-check dialogs (allowing screenshots, Markdown export, confirming a weaker setting, erase) have no fingerprint key, although the real vault's offer one, and turning the fingerprint switch on or off fails at once with an error of its own and no system fingerprint prompt. Someone who knows the app can notice.
  • Session isolation. Only one database is open at a time. Every repository is bound to the opening it was created in (a lease revoked before Room closes), so nothing created in one vault reads or writes the other. Opening the other vault starts a new epoch, so the note that was open when the app re-locked is reopened only in the vault it belongs to.
  • Failures never fall back. A decoy database that does not open fails the unlock; it is neither deleted nor replaced by the real vault. Turning the duress PIN off (after the PIN and a confirmation) forgets the decoy key first and then deletes vault_b.db; a kill in between leaves a file nothing can open, which the next duress PIN set replaces. The delete is checked: the database file and its -wal, -shm, -journal and lock files must be gone, or turning the duress PIN off reports a failure, and setting a new duress PIN (which also starts by deleting an old vault_b.db) fails instead of leaving a PIN that opens a stale file.
  • Wipe PIN. The erase also replaces both decoy entries with random bytes and deletes vault_b.db with the real database: the empty vault has no decoy vault either.
  • Limits. The decoy vault does not hide that the real one exists from a forensic look: the second database file, its size and timestamps, filesystem leftovers, or comparing two snapshots. The first unlock with the duress PIN creates that database and takes longer. Biometrics can be forced. On a rooted, unlocked phone PIN guessing through the Keystore (see "Important limitations") finds the duress PIN as well.
  • Downgrade. Older builds ignore both entries and the second database and keep opening the real vault. A PIN changed in an older build gets a new salt, which silently turns the duress PIN off; the decoy notes come back once it is set again in this version. An erase in 2.1.x (the wipe PIN or "Erase all data") predates the decoy vault and does not know vault_b.db, so the file can stay on disk (encrypted) after it.

What an observer can and cannot tell

From the review of 2026-11-21 (someone made to see the app, or reading an image of the phone's storage).

Checked and safe:

  • The state file has the same entries and sizes with or without a duress PIN, through setting it, changing it, turning it off, a PIN change and the erase.
  • Every PIN attempt costs the same (one KDF run, all three slots tried), whichever PIN it is.
  • No data of the real vault is reachable from the decoy: it opens only its own database, every operation of the real vault is refused there, and its PIN re-check accepts the duress PIN only.
  • Nothing outside the two databases records which vault was used: the shared settings hold appearance and privacy choices, the what's-new version and the trash purge times (the decoy vault's own one is written only after it purged), and there are no notifications, widgets, shortcuts or attachments on disk.

Still visible:

  • Fingerprint in the decoy vault (above).
  • pin.strikes in the state file after a duress unlock that followed misses (above).
  • Encrypted backups exported earlier are named encly-backup-* in shared storage and can show in the file picker's recent list, which the decoy vault's Import screen opens. The decoy vault itself says "never exported".
  • "What's new" and the trash notice after an update are shown to whichever vault is unlocked first, so a duress unlock can use them up before the real vault shows them.
  • The second database file, its size and timestamps (see Limits).
  • The downgrade note above, for someone who goes back to 2.1.x.

Biometric slot

Biometric unlock is optional.

  • Encly generates an AES-256 AndroidKeyStore wrapping key.
  • The key is configured with setUserAuthenticationRequired(true).
  • On Android 11+ it uses auth-per-use AUTH_BIOMETRIC_STRONG; older supported Android versions use the equivalent per-use biometric validity configuration.
  • The DEK can only be wrapped/unwrapped through a BiometricPrompt.CryptoObject carrying the authenticated Cipher.
  • The biometric key is invalidated when biometric enrollment changes. The lock screen then drops the fingerprint button, marks biometric unlock off and says to unlock with the PIN and turn it on again in Settings.

A successful biometric prompt by itself is therefore insufficient to open the database. The authenticated cryptographic operation must release the DEK.

  • The system screen lock (device PIN, pattern or password) is never accepted in place of a biometric: the prompt allows BIOMETRIC_STRONG only, and falling back means Encly's own PIN.
  • Turning biometric unlock on needs a biometric prompt that wraps the DEK through the new key's CryptoObject; turning it off needs a Class 3 biometric confirmation, and deletes the slot and the key. Only one such prompt can be open at a time, and the switch is disabled on devices without enrolled strong biometrics.

Recovery slot

Onboarding offers an optional BIP39 recovery slot.

  • Encly generates a 12-word BIP39 seed.
  • The seed is normalized (lower case, single spaces; the one normalization shared with the backup key), hashed with SHA-256 and processed through HKDF-SHA256 with domain-separated recovery context.
  • The resulting recovery KEK wraps the same random DEK with AES-256-GCM.
  • Entering the correct recovery seed can therefore recover local database access even when the PIN is unavailable.
  • After a recovery unlock the PIN is no longer replaced by force. If the PIN slot still exists, is not locked out and its device key is not lost (probed with one HMAC; a transient Keystore failure counts as not lost), the user chooses Keep my PIN (the default) or Set a new PIN. Only when the slot is missing, the key is lost or a lockout runs is a new PIN required before going on. Keep changes nothing in the store and ends the session's permission to reset the PIN without the current one; the recovery phrase is the proof of ownership either way, and the lockout is left alone (a new PIN ends it).
  • On a computer the same applies with the passphrase. A new passphrase is also required when the vault's slot is not a usable version 4 slot (a version 3 slot from a development build, see Desktop), and the app cannot be taken past that screen from another window or by a menu or keyboard command other than Lock. The recovery KEK takes only the 12 words: the passphrase and the device secret play no part in it, so the phrase is also what opens the vault after the OS secret store was reset.

Choosing "PIN only, no backups" during onboarding (on a computer, "passphrase only, no backups") intentionally creates no recovery slot. One can be added later from an unlocked session (Settings → Security, or Settings → Backup before the first export, after re-entering the PIN): the live DEK is wrapped under a newly generated seed that the user writes down and confirms.

Replacing the phrase. Settings → Security → "Replace recovery phrase" (unlocked session, after PIN or biometric re-authentication, and a confirmation) generates 12 new words, shows them and checks three of them. Only then are the recovery slot and the backup-key slot rewritten for the new words, in one atomic write that drops the old recovery slot. The old words then open nothing in the state file as it is now. The database key is not rotated (replacing the phrase, like changing the PIN, re-wraps the same DEK), so someone who kept an earlier copy of vault_state_v3.bin and has the old words can still open that copy's recovery slot and read any later copy of the database. Replacing the phrase therefore does not protect data against anyone who already copied the state file; it limits what the old words open from now on. Backups exported before still open only with the old words (their key derives from them); the UI says so before and during the replacement.

Encrypted backups

Android backup stays disabled. Data leaves the device only in files the user exports explicitly: an encrypted backup file (Settings → Backup) and, if they choose, a plaintext Markdown export (see "Markdown export" below). The backup is stored wherever they choose through the Storage Access Framework. Encly requests no storage permission and no network access for it; the file is written only to the single document the user picks. Its storage location, and any copying or syncing of it afterwards, is the user's choice and outside Encly's control: the file must therefore be safe to keep anywhere, which is why it is sealed with the recovery-seed key below and holds no vault key material. This is also why the store listings declare that Encly collects and shares no data (see PRIVACY.md).

What a backup contains

Every note (title, the serialized block list verbatim so every block type survives, trash, pinned and archived state, colour key, created/edited timestamps), every tag (name, visibility, order) and every task (title, description, completion, created/completed dates, priority, order). Records carry a stable random uid; links between them (note → tag, task → tag) are stored as uids, never as per-device database ids.

It also carries the user's display and behaviour preferences (theme, palette, fonts, text size and spacing, list layout, sort order, swipe actions, language, auto-lock delay, strict keyboard privacy, note previews). They come from an explicit allow-list (BackupSettings in :core:security); a test fails for any preference key the app uses that is on neither the allow-list nor the documented exclusion list. A restore reads each value separately: an unknown key or a value outside the allowed set is ignored, and preferences are applied only after the notes were imported, and only by "replace all" and the first-run restore (a merge keeps the preferences of the install it lands in).

A backup never contains the DEK, the PIN or biometric slots, lockout state, onboarding or vault-commit flags, the screenshot allowance, the recovery seed, the backup key, or any other state of the install or the vault.

Payload schema 5 added the preferences section. A schema-4 file restores exactly as before. An app that reads only schema 4 reports a schema-5 file as "unsupported version, update the app": its strict reader cannot skip a section, and it never half-restores or reports the file as damaged.

Key: the recovery seed, not a separate password

seedHash   = SHA-256(normalized BIP39 words)
backupRoot = HKDF-SHA256(ikm = seedHash, salt = "encly/backup/salt/v1", info = "encly/backup/root/v1")
fileKey    = HKDF-SHA256(ikm = backupRoot, salt = <32 random bytes per file>, info = "encly/backup/file/v1")
  • The info strings are distinct from the recovery KEK's (encly/recovery/kek/v3), so a backup key can never unwrap the vault and a recovery KEK can never open a backup.
  • Each file has its own random salt, so each file has its own key; the 12-byte GCM nonce is random per file as well.
  • The vault keeps backupRoot in a backup-key slot: AES-256-GCM under a sub-key of the DEK (HKDF(DEK, "encly/backup/slot/salt/v1", "encly/backup/slot/kek/v1"), so the SQLCipher key itself is never used as an AES-GCM key). An unlocked session can therefore export without asking for the words, and the same 12 words re-derive backupRoot on a fresh install.
  • A fast KDF is enough: a BIP39 phrase carries 128 bits of entropy, so brute force is infeasible regardless of the KDF cost.
  • No backup passphrase. (This is a password for the backup file; the passphrase that unlocks the vault on a computer is not one, and a backup is sealed with the recovery words alone on every platform, so a backup made on a phone restores on a computer and the reverse.) A user-chosen passphrase would be the weakest link of a file that can end up anywhere (cloud drives, e-mail) and could be attacked offline forever; a PBKDF2/Argon2 work factor only slows that down linearly. It would also be a second secret to lose. Instead, exporting from a vault without a recovery seed first creates one: Encly shows 12 new words, the user types three of them back, and the seed becomes both the vault's recovery slot and the backup key. A vault created before the backup-key slot existed asks for its words once.

Export and import rules

  • Export and import require an unlocked session and re-authentication (PIN, or a Class 3 biometric confirmation when biometric unlock is on) at the start of each operation.
  • Export seals the file in memory before the save dialog opens; nothing is written if sealing fails, and the plaintext payload buffer is zeroized right after sealing. A vault whose file would exceed the 64 MiB import limit is refused (TOO_LARGE) instead of exported, so every file Encly writes can be restored.
  • Export never overwrites: a picked document that already holds data is refused (TARGET_EXISTS), because truncating it first would lose the previous backup whenever the new write then fails. The written file is read back and compared; a failed or incomplete write is reported and the new document deleted where the provider allows it.
  • Import reads the file (at most 64 MiB), checks magic, format version and header structure before asking for the words, then authenticates and decrypts in memory, then validates the payload (schema version, unique uids, links that resolve, known priorities) — all before touching the database. It is then applied in one SQLite transaction: any failure rolls the whole import back.
  • Merge adds only records (sub-tasks included) whose uid is not in the vault yet (local versions win); replace deletes every note, tag, task and sub-task first and needs an explicit confirmation.
  • Wrong words and any modification of the header or ciphertext fail AES-GCM authentication and are reported as one error ("these words don't open this backup, or the file was modified"), with nothing written.
  • Restoring on a fresh install (onboarding "Restore from backup") decrypts and validates the file first, then creates the new vault with those words as its recovery seed, and writes the backup once the mandatory PIN setup has opened the vault — before onboarding is committed. If the import fails, nothing is committed and the vault is closed; the user can retry or continue with an empty vault. Before the new vault is opened for a staged restore, a restore-pending marker is written to the vault state file and cleared only by the commit. A process killed in between leaves the marker, and the next start does not count that vault as committed even though its database exists: it is deleted and onboarding starts over, rather than opening an empty or half-restored vault. Until then the decrypted payload is held in memory only, and an uncommitted setup vault is not re-locked by backgrounding (setup closes it itself if it finishes in the background).
  • The system file picker is another app, so the process briefly goes to the background. Export needs no open vault while it is shown (the file is already sealed), so backgrounding locks as usual and the sealed file is still written to the chosen document. For import, SessionLockManager keeps the vault open only when Encly itself opened the picker within the last 5 seconds, for at most 60 seconds measured on elapsedRealtime (deep sleep counts). The screen turning off ends the grace at once and closes the vault; returning after the grace expired, or with the keyguard up, closes it the moment the app is back; the picker's result ends the grace.
  • No temp files, no plaintext on disk, no logging of payloads, words, keys or SQLite error messages (which can quote row content). Derived keys and the plaintext payload buffer are zeroized after use.

Markdown export

The second, plaintext way out of the vault. It exists because some users want their notes in a portable form; it is therefore built to be impossible to trigger by accident, and to leave no copy behind.

  • Warning, then re-authentication, then the save dialog. A dialog says the file is not encrypted and that wherever it is saved (cloud folders included) holds a readable copy. Only then does the existing ReauthFlow run (the PIN, or the biometric confirmation when biometric unlock is on): the same path as backup export and import, with no auth code of its own.
  • Read after authentication, through that session. Only the exported note (or, for all data, the vault) is read, and only when the save dialog returns, through the vault session that was authenticated (bindToCurrentSession). A vault that re-locked in between fails with a message instead of exporting. While the save dialog is in front, SessionLockManager keeps the vault open for the same short grace as for the import picker. Nothing plaintext is held before that.
  • Only a Storage Access Framework document. The content is streamed into the document the user created with ACTION_CREATE_DOCUMENT (CreateDocument): no share intent, no FileProvider, no temp file in the cache or files directory, no storage permission. A document that already holds data is refused; an incomplete one is deleted where the provider allows it. NoPlaintextExportTest keeps the share/FileProvider/notification/clipboard bans and allows CreateDocument only in the two screens that host these exports.
  • What is exported. One note as one .md, or a .zip (java.util.zip) with one .md per note outside the trash (archived notes under archive/, notes under a hidden tag included) and tasks.md. It exports the vault that is open: the decoy vault exports what it contains, nothing more, and nothing is special-cased. No PIN, key, recovery phrase or setting is written.
  • No title in a name the system sees. The save dialog is outside the app's screen protection and keeps its recent files, so the suggested name is a date only (encly-note-<date>.md, encly-notes-<date>.zip). A failed export deletes the empty document the dialog made, but never one that holds data.
  • Safe content. File names inside the zip come from note titles and are treated as untrusted: NFC, control, format and bidi characters and / \ : * ? " < > | removed, no leading dot, Windows device names avoided, cut by bytes, unique ignoring case (a title cannot escape the folder or collide with tasks.md). Text is escaped so it cannot become other Markdown; the header values are JSON strings. A link becomes a Markdown link only for http, https, mailto and tel (any other scheme is written as inline code), and a link's preview image address is never written, so opening the file fetches nothing.
  • What it cannot do. Once written, the file is outside Encly's control, like any exported file. The user is told so before every export. Strings the app decrypted for the export live in memory only until the garbage collector reclaims them (a JVM String cannot be zeroized).

Import from My Notes

Encly is the successor of My Notes, which can hand its data over once (#46). One way only: Encly never sends anything to My Notes except the result counts, and exposes no provider or anything readable.

  • ImportFromMyNotesActivity is exported for the action com.pasich.encly.action.IMPORT_FROM_MY_NOTES only. Before it reads the intent's URI it requires (HandoffRequest):

    • getCallingPackage() == "com.pasich.mynotes" and a signing certificate from a pinned SHA-256 set (MyNotesCallerVerifier.TRUSTED_MY_NOTES_CERT_SHA256): hasSigningCertificate(…, CERT_INPUT_SHA256) on Android 9+, and on Android 8.x GET_SIGNATURES with exactly one signer;
    • no FLAG_ACTIVITY_FORWARD_RESULT. The calling package names the app the result goes to, not the one that wrote the intent: an app My Notes starts for a result (the file picker of its own import, say) could forward that request here, and the system would report My Notes as the caller of that app's intent and URI;
    • on Android 14+, where the system names the app that launched the activity (getLaunchedFromPackage, only when that app shares its identity), that it is My Notes;
    • a content:// URI of My Notes' own FileProvider: the authority com.pasich.mynotes.provider, which PackageManager.resolveContentProvider must find in the My Notes package.

    Anything else is refused (untrusted_caller, or invalid_payload for a wrong action or a URI that is not content://) without reading the URI.

  • The vault must be unlocked through the normal lock screen first; an open session (within the auto-lock grace) is used as is. Backgrounding locks it as everywhere else.

  • My Notes' ZIP (plaintext) is copied to a file of its own in Encly's private cache, because the URI grant ends with the activity, then read and deleted in a finally. What a killed process left there is deleted when the app next starts (off the main thread) and when a wipe-PIN erase finishes; a file another hand-off of the same process is still reading is left alone. It is never logged. Reading is strict: one handoff.json entry, format and schema checked first (a newer schema asks for an Encly update), at most 32 MiB compressed and 32 MiB uncompressed (counted on the bytes read, so a ZIP bomb stops there), 100 000 records per list, 1 Mi characters per text field. Editor.js HTML is reduced to plain text.

  • Only counts are shown; nothing is written before the user confirms. The data then goes through the backup merge import: one transaction, records whose uid exists are skipped (a repeated hand-off adds nothing), tags are matched by name.

Import from other apps

Settings → Import notes reads exports of other notes apps (#62): Google Keep Takeout, a decrypted Standard Notes backup, Joplin JEX or RAW, Notesnook Markdown/TXT exports and generic Markdown/TXT (Obsidian, Markor).

  • Input. Only documents and folders the user picks through the Storage Access Framework, read as streams through ContentResolver while the vault is unlocked (the picker gets the same short grace as a backup import). No path, seek or declared size is trusted. The source files are never written.
  • Bounded reading, in memory only. ZIP is read sequentially from local headers with a reader of Encly's own (every entry's CRC checked; encrypted entries refused), TAR with a minimal ustar/GNU reader that hands data out only up to the size of each entry. Limits, counted on the bytes actually read and inflated: 2 GiB read, 64 MiB uncompressed for what is kept, 4 MiB per file (16 MiB for a JSON export that holds every note), 20 000 entries (directories and every archive header included), 20 000 notes, path depth 16, JSON nesting 64. Media and attachments (images, audio, video, PDFs, by name) are counted and never kept: a picked file or folder entry is not opened and a TAR member is skipped unread; a ZIP member has to be inflated to find the next header, so it is streamed through a small buffer against its own 2 GiB cap, and a bomb named photo.jpg still ends as "too large". Absolute paths, .., drive letters, NUL, links, devices, archives inside archives and folders deeper than the limit are skipped and counted (a backslash is read as /); a ZIP bomb or an endless archive ends as "too large", and a damaged archive keeps the notes read before the damage and counts the rest as unreadable. Nothing is staged in cacheDir or anywhere else on disk, and nothing is logged.
  • Formats are recognised by content, not by extension; an ambiguous selection asks the user. Encrypted Standard Notes backups and Notesnook backups (.nnbackupz) are refused with guidance instead of being parsed. Markdown and HTML become plain Encly blocks (inline HTML tags are removed, other angle-bracket text stays); nothing is executed or rendered as HTML, and frontmatter is read for a few known keys only.
  • Review before writing. Parsed notes (titles, a snippet, the read-only text) are shown on a review screen and live only in that screen's ViewModel: no saved state, nothing persisted, and they are dropped on cancel, on finish and when the vault locks. The selected notes go through the backup merge import: one transaction on the database session the import started in, all or nothing, notes whose uid exists are skipped (the uid is derived from the source's own id, or for Markdown from the path and a digest of the text, so a repeated import adds nothing), tags matched by name.
  • Vaults. It is available in a decoy session too and imports into whichever vault is open; a vault switch or re-lock during the import makes the transaction fail instead of writing elsewhere.
  • Limits. Like the editor and the backup import, parsed text passes through JVM strings that cannot be zeroized.

Settings that ask for re-authentication

A phone left unlocked for a moment must not be able to weaken the protection of the vault. These changes on Settings → Security ask for the PIN first (or a Class 3 biometric confirmation when biometric unlock is on), through the same re-authentication as export and import (on a computer it asks for the passphrase, and there is no biometric option):

  • lengthening the auto-lock delay;
  • turning strict keyboard privacy off;
  • turning "Show note previews" on;
  • turning biometric unlock on (the PIN is asked before the enrolment; turning it off keeps its own strong-biometric confirmation);
  • "Allow screenshots until the app locks".

Changes that strengthen protection (a shorter or equal delay, strict keyboard on, previews off, screenshots blocked again) never ask. The switch keeps its old value until the change is applied, so a cancel or a wrong PIN leaves it. A check that fails because the device key store did not answer (a locked or missing keyring, a key not found) says so and does not say the secret is wrong; as before, such an attempt is given back and not counted against the vault's attempts. The change is held in memory only and is discarded, not applied, by a cancel and by any lock between the request and the PIN, as for the screenshots allowance. A full backup restore applies the stored settings without asking: it already needs the recovery phrase and the same re-authentication.

Session lifecycle

  • The database is not considered committed until mandatory PIN setup succeeds.
  • Interrupted first-run setup restarts onboarding and discards incomplete vault slots, including a vault whose staged restore had not been committed (restore-pending marker).
  • When the app backgrounds, SQLCipher is closed and Encly's in-memory DEK copy is zeroized, after the user's auto-lock delay (Settings → Security: immediately, 15 s by default, 30 s, 1 min, 2 min, 5 min, 10 min, 15 min or 30 min). The screen being off or the keyguard being up when the app is found stopped closes it at once, whatever the delay or a picker grace, and so does the screen turning off during the delay. Android 14+ freezes a cached app about ten seconds after it left the screen, and a frozen process runs no handler timer and hears no screen-off broadcast. The delay is therefore also set as an inexact AlarmManager wake-up alarm (setAndAllowWhileIdle, no exact-alarm permission) that is delivered to a non-exported receiver, which closes the vault on the main thread. The system may deliver an inexact alarm a little late (up to minutes in Doze), never early, so the vault can stay open a short while past the chosen delay while the app is frozen. The alarm replaces the timer only, not the screen-off signal: if the screen turns off while the process is already frozen (Android 14+, about ten seconds after leaving), Encly does not hear it. The vault then closes when the delay ends (the alarm) or when the app is next in front after the delay, not at the moment the screen went off, and coming back inside the delay on an unlocked phone finds it still open. The longer the delay, the longer that window; "Immediately" and a screen that is already off when Encly stops are not affected. The alarm is cancelled when the app comes back or the vault locks. When the app comes back, the elapsed time is measured again on elapsedRealtime (deep sleep counts) and the vault is closed if the delay ran out. ViewModels holding decrypted content (notes list, tasks, editor, a decrypted backup, new recovery words) drop it at that moment, not only when the UI resumes.
  • Within the delay the vault stays open in the background: the DEK and decrypted content are in memory, and the recents thumbnail is still blocked by FLAG_SECURE. Choose "Immediately" to close it the moment Encly leaves the screen. Swiping Encly away from Recents closes the vault at once, whatever the delay; so does Back out of the app on Android 8-11.
  • The next foreground entry must unwrap the DEK again through PIN, biometric, or recovery.
  • A process started with a committed, closed vault starts in the locked state, and a central navigation guard sends every vault screen to the lock screen while the database is closed, so a back stack restored after process death shows nothing. Search queries and tag drafts are not kept in saved instance state. Navigation deep-link extras are stripped from incoming intents.
  • An unlock whose screen is gone by the time the key derivation finishes (or that finishes in the background) closes the vault again. A re-lock during the unlock animation cancels it.
  • The PIN typed on the lock screen is kept in a CharArray that is wiped after the attempt (never a String; a passphrase typed on a computer passes through a text field and cannot be handled that way, see Desktop); unlock DEK copies are wiped after use. While open, the database accepts a second unlock call only with the same key, compared in constant time.
  • FLAG_SECURE is applied before the first Activity frame and is on by default. Since 3.0 the user can allow screenshots until the app next locks (Settings → Security, after the PIN or a biometric): the allowance lives in memory only, ends at every lock and never survives a restart, open dialogs and sheets follow it, and the screens that show secrets (PIN entry, the recovery phrase) stay protected whatever it says.
  • Erase all data (Settings → Security, danger zone) is held for 5 seconds, confirmed in a dialog, then re-authenticated with the PIN or a Class 3 biometric. It closes and deletes the database, every key slot, the lockout state, Encly's Keystore keys (both PIN factor aliases and the biometric key) and the vault flags (onboarding state, last export, strict keyboard privacy), and returns to onboarding. There is no undo; only an exported backup brings the data back.

Outbound data policy

Encly intentionally leaves out system-visible plaintext features:

  • no notifications at all: no notification permission, channel or scheduled work, and no alarm that shows or reads note content (the only alarm is the auto-lock wake-up above, which carries no data);
  • no seed clipboard, file, Drive, or generic share export (encrypted backups never contain the seed; see "Encrypted backups");
  • no share sheet and no plaintext note share flow: the only plaintext path is the Markdown export above, started by the user, warned about, re-authenticated and written to a document the user creates;
  • no task export to the system calendar;
  • no FileProvider retained for those export flows.

Clipboard. Everything Encly puts on the clipboard (a text-field copy, a copied link) is marked sensitive (ClipDescription.EXTRA_IS_SENSITIVE, honoured from Android 13) and cleared after 60 seconds unless something else was copied since. Only Encly's own clip is cleared: it is recognised by the timestamp of its description. From Android 10 the system hides that description from an app that is not in front, so a clear that falls due in the background is not done blindly: the stamp stays pending and the next time Encly comes to the foreground it clears the clip if the clipboard still carries it. The clip is also cleared when the vault locks (at the next foreground if the lock happened in the background), and a pending stamp survives a killed process in a small preferences file (a timestamp only, no content, excluded from every backup), so the next start clears it. A recovery phrase pasted into the 12 cells is removed from the clipboard right away.

Autofill, accessibility, overlays. The window excludes itself and all its fields from autofill services. On Android 14+ its content is marked accessibility-data-sensitive, so only services that declare themselves accessibility tools (TalkBack, Switch Access) can read it. On Android 12+ other apps' overlay windows are hidden while Encly is in front (HIDE_OVERLAY_WINDOWS).

Keyboard. All Compose text fields run inside a shared input boundary that requests IME_FLAG_NO_PERSONALIZED_LEARNING. The opt-in Strict keyboard privacy setting (Settings → Security, off by default) additionally presents every text field as a visible-password field with TYPE_TEXT_FLAG_NO_SUGGESTIONS: compliant keyboards then show no suggestions, use no cloud prediction and receive no surrounding text. The residual risk is the keyboard itself: it still receives every key it types, and a malicious or non-compliant IME can ignore all of these flags (see "Important limitations"). The cost is no autocorrect, and some keyboards hide emoji or voice input in password fields.

On iOS every text input is a Kotlin subclass of Compose's CMPTextInputView. At start, and again each time the keyboard appears (the subclasses may register with the Objective-C runtime late), the app walks the class list and replaces the trait getters on CMPTextInputView and on every class that descends from it, so they answer "no" for autocorrection, spell checking, smart quotes, smart dashes, smart insert/delete and inline predictions, and "none" for Writing Tools, whatever the field asked for: the system keyboard then has no suggestions to learn from. Free text fields use the plain text keyboard type there (Compose would turn the Android Password type into secure, ASCII-only entry), with autocorrection off. iOS has no "do not learn" flag and no password-like mode that fits a multi-line editor, so Strict keyboard privacy is not shown on iOS. Third-party keyboards are not loaded at all (the app refuses the keyboard extension point). If a Compose upgrade renames the class, the startup log line "keyboard privacy patched ..." shows fewer replacements than expected, and the review of the upgrade must catch it. Not verified on a device: that the system keyboard honours every trait.

iOS host behaviour. What Android does with window flags and services, the iOS build does as follows.

  • Screenshots and recordings. iOS cannot refuse a screenshot taken by the user; the vault is locked whenever the app is left, so nothing is exposed beyond what was on screen. While the screen is captured (recording, AirPlay, mirroring) a cover window hides the content, from the user's own screen as well.
  • App switcher snapshot. A cover window above every other window goes up on willResignActive, before the system snapshot. On an iPad where the app shares the screen (Split View, Slide Over, Stage Manager), willResignActive also fires when the user only works in the other app while Encly stays visible; there the cover is raised at didEnterBackground (still before the snapshot) so that the visible app is not blanked. Capture still covers it.
  • Background. iOS suspends an app seconds after it leaves the screen. A background task keeps the auto-lock timer and the device-lock signal running; when iOS takes it back (about 30 s) the vault locks. An auto-lock delay longer than that therefore locks at about 30 s; the delay choices above that are not offered on iOS.
  • Pasteboard. Encly's copies are localOnly (no Universal Clipboard) and carry an expiration date of 60 s; a timer clears the pasteboard if it is still Encly's, and the clip is cleared when the vault locks.
  • Backups. The data directory is excluded from iCloud and iTunes/Finder backups.
  • No device passcode. Face ID unlock is not available (its Keychain item needs a passcode); the PIN works. The Keychain and Enclave items are ThisDeviceOnly and not synced.
  • Face ID. A changed Face ID enrolment or a dropped item ends biometric unlock and the lock screen says so, as on Android.
  • Apple-silicon Macs. The app opts out of running as an iPhone/iPad app on a Mac (the desktop app is the Mac build).

The app requests no INTERNET permission and performs no analytics or sync.

Platform storage

  • Android app sandbox isolates local files from ordinary apps.
  • allowBackup=false is set.
  • Database/security state is excluded from cloud backup and device transfer.
  • The key slots (PIN, wipe-PIN, duress-PIN, decoy-key, recovery, backup-key and biometric envelopes) and the PIN lockout state live in one app-private file, no_backup/vault_state_v3.bin. Every secret in it is already an AES-256-GCM envelope, so it needs no further encryption layer and no Keystore key to be read: a broken Keystore or Tink keyset can no longer make the vault state unreadable at startup. Every change rewrites the file to a temp file, fsyncs it and renames it over the old one (an atomic replace), so a crash leaves the old or the new state, never a mix. A SHA-256 over the content detects damage: a damaged file reads as empty (nothing unlocks), refuses writes, and startup routes to the damaged-vault screen instead of crashing. (That digest detects accident, not tampering; tampering with an envelope fails its GCM tag.)
  • The envelopes are what protect the DEK, and each is only as strong as its KEK. The file itself is readable by anyone who can read the app's private storage (root, a forensic extraction of an unlocked device). That is why the PIN KEK includes a non-exportable Keystore factor: with only a copy of the file, the 10^6 PINs can not be tried off the device.
  • Non-secret flags (onboarding finished, last export time, strict keyboard privacy) are kept in plain app-private preferences.
  • Encly no longer uses androidx.security:security-crypto (deprecated upstream).

Network and third parties

  • The merged release manifest requests no INTERNET permission (checked in CI).
  • Editor fonts are bundled OFL font files. Encly does not use the Google Play Services downloadable-font provider, so no font request goes to Google and the app works the same on devices without Google Play Services.
  • The About screen offers links (privacy policy, GitHub issues, developer email and, only in the play flavor, the Play Store listing), the open-source licenses page links each library's and font's license, and, only in the fdroid flavor, the Support page links the developer's Ko-fi page. They open in another app only after an explicit tap; Encly itself sends nothing.
  • Links in notes are a deliberate exception to "nothing leaves the vault". A link block opens only from its sheet, which first shows the full address, after an explicit tap on "Open", through the system chooser. Only http, https and mailto are saved or opened; addresses with user info, backslashes, whitespace or control characters are refused, and hosts are shown in punycode, so the card cannot name a different host than the one that opens. The receiving app (a browser, a mail client) then sees that one address. Encly fetches no previews: a link card is built from the stored address alone.

Threat model

Designed to resist

  • ordinary cross-app filesystem access;
  • offline theft of the encrypted SQLCipher database;
  • casual physical access after Encly has re-locked;
  • lock-screen / notification leakage (the app posts no notifications);
  • screenshots, screen recording, and recent-app snapshots through FLAG_SECURE;
  • bypassing biometric UI without successfully using the auth-bound Keystore Cipher;
  • on a computer: a copy of the vault files taken without the user's OS secret store (see Desktop).

Important limitations

  • A rooted or fully compromised OS can observe process memory, UI input, or execute code in the app's security context. Encly cannot provide a trustworthy boundary against a hostile kernel / system image.
  • On phones, a numeric PIN has finite entropy (10^6 to 10^12 values, by its length). Off the device, a copied PIN slot is useless without the Keystore factor. On a rooted device that is unlocked, an attacker can drive the Keystore key from the app's own security context: guesses then run at the secure hardware's HMAC speed (StrongBox is much slower than the TEE), the PBKDF2 half can be computed off the device, and the lockout file can be reset. A device that has never been unlocked since boot, or is locked (API 28+), refuses the key entirely. Where StrongBox is missing the key lives in the TEE; on devices without hardware-backed Keystore it is software only. Encly does not read back which protection level the key got, and falls back to weaker key options without telling the user. Offline, the PIN is therefore protected by the hardware keystore, not by PBKDF2 (which adds only about 19 bits, the size of a 6-digit PIN): a longer PIN (8 to 12 digits are supported) is the better choice, most of all on a device without a hardware-backed Keystore.
  • The lockout is enforced by the app, not by the secure hardware. On a computer it only throttles guessing through the lock screen: someone who holds the files never runs the app.
  • On a computer the vault is as strong as the passphrase. The device secret is software-bound to the OS user account, so anyone who gets the files and the secret once (an infostealer, a seized computer whose OS login is known, a home-directory backup that includes the keyring) can guess the passphrase offline, and Argon2id only makes each guess about nine times dearer than PBKDF2 would. Malware in the user's session, a keylogger (the bundled runtime draws through X11, where any client of the session can read keystrokes), screen capture, a replaced binary, swap and hibernation images and root are not stopped by any passphrase. See Desktop.
  • The wipe PIN (see "Wipe PIN") and the duress PIN (see "Duress PIN") defend against being forced to unlock on the spot, not against a forensic examination or a rooted phone.
  • The recovery seed restores the local vault (recovery slot) and opens encrypted backups. On a new phone the seed alone recreates nothing: the user also needs a backup file, and only data up to that export is restored.
  • Anyone with the 12 words and a backup file can read that backup. Once exported, a file cannot be revoked; a backup's secrecy never exceeds the seed's.
  • A backup's size and timestamp reveal roughly how much data it holds. The file name is chosen by the user (the default contains only the date).
  • Decrypted backup content passes through JVM strings while it is parsed and imported; like the editor itself, Encly cannot zeroize those copies.
  • User-visible seed words necessarily exist in UI memory while being displayed or entered. Encly minimizes avoidable copies but cannot guarantee JVM/Compose heap zeroization of every immutable string representation.
  • A third-party keyboard is part of the device trust boundary. Encly requests Android's no-personalized-learning flag (and, with strict keyboard privacy, a password-type field without suggestions), but an IME sees every key typed and may ignore these requests.
  • Clipboard clearing is best effort: a clipboard manager or another app may read or keep a clip during its 60 seconds, and while Encly is in the background (or after it was killed) the clip stays until Encly is next in front, because Android hides the clipboard from it.

Distribution and signing

GitHub Releases, Google Play and F-Droid ship the same source under the same application ID. All channels are meant to carry the same release signing certificate (Play App Signing with the uploaded release key; F-Droid via reproducible builds of the fdroid flavor), whose SHA-256 is published in the README. Android refuses to update an install with an APK signed by a different certificate, so a mismatch shows up as a failed update rather than a silent replacement; never uninstall to "fix" it without an exported backup, because uninstalling deletes the vault.

The Linux packages (the .deb and the Flatpak bundle) are not released with 3.1.0 and are not on GitHub Releases; CI builds them (and checks them with desktopApp/packaging/verify-linux-packages.sh) and they can be built from source. When they are published, how to verify them will be described here and in the README.

Supported versions

Version Storage format Security fixes
3.1.x v3 vault, as 3.0.x; on a computer (Linux) the secret slot is version 4: a passphrase stretched with Argon2id ✅ yes
3.0.x v3 vault (random DEK in PIN / biometric / recovery slots; Keystore-bound PIN KEK; slot file) ✅ yes
2.x v3 vault, the same format ❌ no; update in place to 3.0 (nothing to migrate)
1.x (≤ 1.1.1, versionCode ≤ 30) v1 (seed-derived SQLCipher key, 4-digit PIN) ❌ no; not migrated, uninstall and install 3.0

Reports should include the exact app version (About screen), where it was installed from, and the Android version (or, for the desktop app built from source, the Linux distribution).

Reporting a vulnerability

Please report security issues privately; do not open a public issue or pull request with exploit details.

Include the app version, the Android version and device (or, for the desktop app built from source, the Linux distribution and desktop environment), the steps to reproduce, and the impact you expect. Never send real seed words, PINs, passphrases or note content; a test vault is enough. Please allow reasonable time for a fix before public disclosure. Reporters are credited in the release notes unless they prefer otherwise.

There aren't any published security advisories