Joshua Walls164 downloadsKeep sensitive Obsidian note sections encrypted until you choose to reveal them.
Lockblock keeps sensitive Obsidian note sections encrypted until you choose to reveal or edit them.
lockblock code blocks with a random vault key.secretStorage.Warning Back up your vault before using Lockblock on important notes. Lockblock is designed to keep sealed blocks recoverable, but encryption, plugin, sync, or editing errors can still make sensitive content difficult or impossible to recover without a good backup.
Run Lockblock: Setup once. Lockblock creates a random vault key, protects it with your unlock password, stores wrapped key material in Obsidian secretStorage, and shows a recovery key.
Write secrets in fenced lockblock blocks:
```lockblock
secret text
multiple lines
```
When the vault is unlocked, Lockblock can seal plaintext blocks when you enter reading view, when you lock the vault, or when you run Lockblock: Encrypt plaintext blocks in current note.
Sealed blocks look like this in the note file:
```lockblock
lockblock:v1:kid=7b9d5d9a-2f70-4cc9-8e77-08713d8b93d6:alg=AES-GCM:iv=<base64url>:ct=<base64url>
```
In reading view, sealed blocks render as Lockblock cards with actions to show, hide, copy, or lock. Showing a block reveals plaintext in the UI only; it does not write plaintext back to the note.
In source or live preview editing, sealed blocks are editable only after the vault is unlocked. If the vault is locked, Lockblock blocks edits that touch sealed ciphertext and offers an unlock action.
Use Suppress notification popups in Lockblock settings to hide Lockblock toast messages while keeping dialogs and confirmations visible.
Obsidian secretStorage is device-local. To use the same sealed blocks on another device, enable plugin settings sync for Lockblock. Lockblock stores a synced copy of the wrapped keyring in plugin settings and imports it into local secretStorage when a device does not already have a local keyring.
The synced keyring does not contain your unlock password or raw vault key. It contains password-wrapped and recovery-wrapped key material, so the unlock password or recovery key is still required on each device.
Use Lockblock: Sync keyring to plugin settings or the Sync keyring settings button if you need to force-refresh the synced keyring after setup, password changes, or recovery-key changes.
If another device was accidentally set up with its own local keyring, first run Lockblock: Sync keyring to plugin settings on the device that has the correct keyring. After plugin settings sync, run Lockblock: Import synced keyring or the Import synced keyring settings button on the other device. This overwrites that device's local secretStorage keyring with the synced wrapped keyring from plugin settings.
See docs/commands.md for a quick TLDR of every command.
Lockblock requires Obsidian 1.11.4 or newer for app.secretStorage.
npm install
npm run dev
For a production build:
npm run build