Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Lava Lamp Terminal Key Generator 🌋

Generate secure Ed25519 SSH keys using true entropy from your webcam!

Inspired by Cloudflare's wall of lava lamps, this terminal utility captures a snapshot from your camera, mixes it with cryptographic randomness, and uses the chaos to seed an Ed25519 keypair.

Features

  • 📸 Webcam Entropy: Uses the unpredictable data from a camera snapshot as a seed.
  • 📂 Image File Option: Pass an image file with --image instead of using the webcam—no camera required.
  • 🔑 Ed25519 Keys: Generates modern, secure, 256-bit Ed25519 SSH keys.
  • 🖥️ Terminal UI: Beautiful TUI built with Bubble Tea.
  • 🔓 OpenSSH Format: Outputs keys ready for ~/.ssh/id_ed25519 and authorized_keys.

Dependencies

For webcam capture you need a working webcam and one of the following tools installed. If you use --image to pass a file instead, no camera or tools are required.

macOS

  • imagesnap (Recommended): brew install imagesnap
  • OR ffmpeg: brew install ffmpeg

Linux

  • fswebcam: sudo apt install fswebcam
  • OR ffmpeg: sudo apt install ffmpeg

Installation

# Clone the repository
git clone https://github.com/kevinaaaquil/lava-lamp-term.git
cd lava-lamp-term

# Install Go dependencies
go mod download

# Build
go build -o lava-lamp

Usage

Run the tool:

./lava-lamp
  1. The tool will show a 3-second countdown.
  2. Point your camera at something chaotic (a lava lamp, a busy street, or just your face).
  3. 📸 Snap!
  4. Your new Ed25519 public and private keys will be displayed on screen.
  5. Copy them to your SSH configuration.

Dev mode

Run with --dev to save the captured image on the host instead of discarding it. Useful for debugging or inspecting the entropy source.

./lava-lamp --dev

The image is written to /tmp with a unique filename: <uuid>_ssh_random_image.jpg (e.g. a3f2b1c0d4e5f678_ssh_random_image.jpg). The file is not deleted after use.

Use an image file

You can supply an image file as the entropy source instead of using the webcam. No camera or capture tools are required.

./lava-lamp --image /path/to/your/image.jpg

The file is read once and used to seed the key generator. Supports common image formats (e.g. JPEG, PNG). Press r to regenerate keys from the same image.

License

MIT

About

A cloudflare lava lamp inspired terminal based almost true random key generator.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages