Skip to content

ahzay/silverbullet-crypt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

silverbullet-crypt

Per-page AES-256-GCM encryption for SilverBullet. Only the page body is encrypted -- frontmatter (tags, dates, metadata) stays plain so indexing and queries keep working. Passphrase is entered once per session and lost when you close the tab.

Install

Run Library: Install in SilverBullet and enter:

github:ahzay/silverbullet-crypt/PLUG.md

Usage

  • Open any page, run Crypt: Encrypt Page from the command palette
  • Navigate away and back -- it prompts for your passphrase once, then auto-decrypts
  • Edits are auto-re-encrypted on save
  • Crypt: Decrypt Page permanently decrypts a page (writes plaintext to disk)
  • Crypt: Change Password re-encrypts all encrypted pages with a new passphrase
  • Reload the page to lock (clears cached passphrase)

How it works

  • PBKDF2 key derivation (100k iterations, SHA-256)
  • AES-256-GCM encryption via Web Crypto API
  • Frontmatter is preserved in plain text, only the body after --- is encrypted
  • Runs entirely in Space Lua, no compiled plug needed
  • Encrypted pages have plain frontmatter followed by %%ENCRYPTED%% and base64-encoded salt, IV, and ciphertext

About

Per-page AES-256-GCM encryption for SilverBullet.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors