Security guide

How NightInk locks your diary, and honestly, what it protects and what it can’t.

NightInk locks your diary on your device before saving it. The only keys that open that lock are the password you remember and the recovery key you keep separately. We have neither.

How your diary is locked

  1. Your password is turned into a key.This is done deliberately slowly (about 0.5 seconds, using 128 MB of memory) (Argon2id). That makes attacks that try passwords one by one just as slow and costly.
  2. The diary key is wrapped.When you first create a diary, a random key no one can guess is made. This “diary key” is only ever saved wrapped by the key made from your password. The recovery key is another key that wraps the same diary key separately.
  3. Each entry is locked.Every time an entry is saved, it is encrypted with the diary key (XChaCha20-Poly1305). If anyone changes even a little of the file’s content, or swaps it into another entry’s place, the app notices when opening it.
  4. Your password and recovery key are saved nowhere.Not on the device, not with us. That’s why no one can open the diary if both are lost.

We don’t make our own cryptography. We only use a widely vetted open library (libsodium).

What is locked, and what stays as is

Locked

  • Entry titles and text, checklists
  • Folder names, tag names and colors
  • Which folder or tag an entry is in, and whether it’s pinned
  • Settings such as the diary name and font

Stays as is

  • Each item’s random number and type (entry, folder, etc.)
  • When it was created and edited, and a mark that it was deleted
  • The size of the ciphertext
  • Lock screen color, theme and display mode — the lock screen has to be drawn before unlocking

So someone who takes the file can guess “roughly when and how many entries were written,” but not what you wrote.

What keeps the lock safe

  • Locking erases the key. When the diary locks, the diary key in memory is erased (limits are under “What it can’t protect” below).
  • It locks when you step away. Every time the app opens, the lock screen asks for your password. It also locks after you’ve been away for the time you set (My page › Settings, Help).
  • Wrong tries mean waiting. From the third wrong password or recovery key, you wait 1 second, 2 seconds, 4 seconds… up to 60 seconds each time.
  • Fingerprint and PIN are bound to the device’s security chip (Android Keystore). The diary key is wrapped once more with a key inside the phone’s security chip. That key can’t be taken out of the chip, so copying the files alone doesn’t let anyone open the diary with a fingerprint or PIN. Once every 7 days the diary asks for your password. Fingerprint and PIN are linked only to the one diary that was open when you turned them on. On a PC, the diary opens with its password for now.
  • The phone screen is hidden. By default, entries are hidden from screenshots and the recent apps preview. You can turn this off in My page › Settings › Security (if you do, screenshots stay as unencrypted images). The lock screen and screens that show the recovery key are always hidden, whatever the setting. The setting to turn it off exists only on Android 13 and later.
  • Copied text is cleared. Text copied in the app is cleared from the clipboard after 60 seconds and when the diary locks. The recovery key and password fields can’t be copied at all.
  • Nothing leaks through phone backups. Entries are excluded from Android’s Google auto backup and from device-to-device transfer.

If you turn on sync to use several devices

  • Sync is optional. Without it, your diary never leaves the device.
  • With it, entries are encrypted on the device before they go up. The server holds ciphertext and a key locked once with your diary password and once with your recovery key, nothing else. Neither the password nor the recovery key goes to the server.
  • So neither we nor anyone who looks into the server can read your diary. What the server knows is your account (e-mail address), how many items there are and of what kind (entry, folder, photo and so on), roughly how large they are, how often they changed, and when they were uploaded.
  • That is why the diary password matters. A short or common one could be guessed if the server were breached. Make it long.
  • If your account is taken over, your diary still cannot be read. If someone deletes what is on the server, the diary on this device stays, and a large deletion is asked about first.

Backups and copies

  • A backup file is a copy of the diary still encrypted, so making one doesn’t unlock your entries.
  • It opens only with the password and the recovery key the diary had when you saved it — changing either later doesn’t change that. A backup file holds the one diary that was open at the time.
  • When restoring, the file isn’t trusted as is: every entry is checked with the key, one by one, before it is moved into a new diary. Damaged or altered files aren’t restored.
  • The first time it opens after an update, before the lock screen, the app keeps a copy of the diary file on the device (the latest 3). The copies stay encrypted. The diary before a restore from backup is also kept as a separate copy (the latest 3). This is so you don’t lose entries.

How the second key stays hidden

  • The diary file always has two key slots. If you haven’t made a second key, the other slot is filled with random values, so it can’t be told apart from a real one.
  • Whatever password is entered, both slots are tried all the way, the same way. So the time it takes doesn’t give it away either.
  • The marks on each entry can be recognized only with that diary’s key. Settings that exist once per diary are always saved in the same number and size, so no one can count how many diaries there are.
  • Limit: it can’t stop someone who analyzes the device’s files with forensic tools. Such a person could guess “there is more data than the open diary.” What this feature protects is that someone looking at the screen can’t prove another diary exists.

What it protects

If a locked device is lost or stolen
Every saved entry is ciphertext. Trying passwords one by one is made deliberately slow, so with a strong password the diary is very hard to open.
If family or friends pick up your phone or PC for a moment
The app always opens on the lock screen first, and it locks itself when you step away. On phones, entries are hidden from the recent apps screen and from screenshots by default.
If someone gets hold of a backup file
Backup files are ciphertext too. They can’t be opened without that diary’s password or recovery key.
When you delete an entry
The deleted entry’s content is overwritten inside the diary file, so even someone who later learns the password can’t dig it back out of the file (exceptions are under “What it can’t protect” below).
Dalmuri (us)
Your password and recovery key never come to us. Entries are encrypted on the device before they are saved, and never sent to a server. So neither we nor any server can read your diary.

What it can’t protect

No app can stop everything. We write it down honestly so you know.

If you lose both your password and your recovery key
No one can open the diary — not even us. Backup files open with the same password or recovery key, so a backup can’t bring it back either.
If someone else gets your recovery key
They can open the diary too. Treat your recovery key as carefully as your password.
If you use an easy password
Someone who takes the file can try common passwords first. Each try is made slow, but an easy password is guessed quickly. Use a long sentence only you know.
If your device is hacked
While the diary is open, malware on the device or someone controlling it remotely can see the entries on screen and in memory. That is beyond what an app can prevent.
If someone looks at or films your screen
While the diary is open, the app can’t stop someone looking over your shoulder or filming the screen with another camera.
Memory while the diary is open
The keys are erased from memory when the diary locks, but because of the technology the app is built on (Java), fragments may remain. It can’t stop an attack that copies the whole memory with specialist equipment. The core promise is “no plain text on disk while locked.”
Copies outside the diary
Even a deleted entry stays, as ciphertext, in backup files made before and in the copies kept on the device during updates and restores (the latest 3 of each). Those copies open with the password and recovery key of that time. Backup files and older copies on the device still open with the old key even after you make a new recovery key, so make a new backup after making a new key. Traces left separately by the storage device or the operating system (inside an SSD, system restore points and backups) can’t be erased by the app.
If you allow screenshots
If you allow screenshots in Settings, the screenshots stay on the device as unencrypted images.
Files exported as plain text
Files made with “Export as plain text” are not encrypted. Delete them yourself when you’re done.
The clipboard
Text copied in the app is cleared after 60 seconds and when the diary locks, but the app can’t erase clipboard history kept separately by some keyboard apps.
A printed recovery key
While printing, a print queue file may briefly stay on disk.
Professional analysis of the file
The content can’t be read, but roughly when and how many entries you wrote, and their approximate length, can be guessed.
If the whole file is swapped for an older copy
If someone replaces the diary file on the device with an older one, the app can’t tell that it’s an older state.

What we don’t do

  • No master password that opens everything, no server-side recovery, no back door only developers know.
  • No ads and no analytics tools. We don’t collect what you write, when you write, or which features you use.
  • This website doesn’t use cookies, analytics tools or external fonts either.

Found a security problem?

Let us know at [email protected]. Don’t send diary content, passwords or recovery keys.

Get NightInk

Choose the store for your device.