Skip to content

0b10headedcalf/lockbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo

  ▄▄▄                                          
 ▀██▀                        █▄                
  ██                  ▄▄     ██                
  ██      ▄███▄ ▄███▀ ██ ▄█▀ ████▄ ▄███▄▀██ ██▀
  ██      ██ ██ ██    ████   ██ ██ ██ ██  ███  
 ████████▄▀███▀▄▀███▄▄██ ▀█▄▄████▀▄▀███▀▄██ ██▄

Encrypt a file(or zipped directory) with AES-256-GCM and email the key + nonce to a recipient. The file is then deleted and key+nonce zeroed in memory. The onus is then on the recipient to provide you with the ability to decrypt your file. Currently supports any arbitraryformat but zip is preferred if you have a good compression program. This program was originally intended to stop myself from accessing and ruminating over old letters/files in my Obsidian vaults.

Also a simple eframe gui implementation via lockbox run. If you'd like, setting up an SMTP connection using lettr instead of using Resend shouldn't be too hard, though we opt for the Resend API for ease of use in here.

Build

cargo build --release

Configure

Copy config.toml.example to config.toml and add your Resend API key:

[mail]
RESEND_KEY = "re_xxxxxxxxxxxxx"

This is done for developer experience and ease of use but setting up an SMTP send protocol in Rust is not very difficult either, there's some really good tutorials online and the lettr crate also makes it rather simple.

Usage

Lock

Encrypts <file> to <file>.lckbx and emails the key + nonce to the recipient.

lockbox lock --target secret.zip --recipient trusteduser@example.com

Unlock

Decrypts <file>.lckbx back to <file>.md using the key and nonce.

lockbox unlock --target secret.lckbx <key> <nonce>

Run

Try the GUI! Should be self-explanatory and uses a simple egui implementation.

lockbox run

How it works

  • Generates a random 256-bit key and 96-bit nonce per lock.
  • Encrypts the file with AES-256-GCM (tampering fails decrypt).
  • Sends key and nonce (hex-encoded) to the recipient via Resend.
  • Zeroes the key in memory after sending.

About

itty-bitty rust program to encrypt a directory to lock it until the key is resolved by a third-party.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages