Skip to content

Latest commit

 

History

History
128 lines (82 loc) · 3.33 KB

File metadata and controls

128 lines (82 loc) · 3.33 KB

Express.js NodeJS JavaScript TypeScript GitHub NPM Installs

Ephemeral Note

Local, offline, self-destructing encrypted notes.

Ephemeral Note is a small security utility designed to store sensitive text locally with strict lifetime and access limits. It intentionally avoids servers, accounts, sync, or background services. A note is just a file, and the key never leaves memory.

Philosophy

•	Local-first, offline-only
•	No servers, accounts, sync, or telemetry
•	One encrypted file + one binary
•	The encryption key exists only in process memory
•	Self-destruction is enforced cryptographically and physically, not by trust or policy flags

This tool is designed to work in spite of platforms, not because of them.

What It Does

Ephemeral Note allows you to create an encrypted note protected by:

- a passphrase
- a maximum number of opens
- a fixed lifetime (TTL)

Once the limits are reached, the note destroys itself.

Installation

npm i ephemeral_notes
note --version

Usage

Create a note

note create mynote.enc

You will be asked for:

- note text (ends with ".")
- maximum number of opens
- lifetime in hours
- passphrase (entered twice)

Open a note

note open mynote.enc

On every open:

- TTL is checked
- open counter is checked
- note state is updated
- on the last allowed open, the note destroys itself

Help

note help

Self-Destruction

When a note expires or reaches its maximum number of opens:

- the encryption key is wiped from memory
- the file is overwritten with random data (best-effort on modern filesystems)
- the file header is intentionally corrupted
- the file is deleted

The goal is to make recovery from backups or casual forensic analysis impractical.

Threat Model

Protected against:

- accessing the note after destruction
- stale or accidental backups
- casual forensic analysis of deleted files
- “I changed my mind” scenarios

Not protected against:

- live OS compromise
- screen recording or keylogging
- memory dumps during decryption
- root access or attached debuggers

If the environment is hostile at the moment of opening, the note is already compromised.

Cryptography

•	Encryption: XChaCha20-Poly1305 (AEAD)
•	Key derivation: Argon2id (memory-hard)
•	Library: libsodium

These primitives were chosen for misuse resistance and long-term auditability.

File Format

[MAGIC 8b] [VERSION 1b] [SALT 16b] [POLICY 12b] [STATE 12b] [NONCE 24b] [CIPHERTEXT ...] [AUTH TAG 16b]

All fields except MAGIC and VERSION are authenticated by AEAD.

License

MIT