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.
- 📸 Webcam Entropy: Uses the unpredictable data from a camera snapshot as a seed.
- 📂 Image File Option: Pass an image file with
--imageinstead 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_ed25519andauthorized_keys.
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.
- imagesnap (Recommended):
brew install imagesnap - OR ffmpeg:
brew install ffmpeg
- fswebcam:
sudo apt install fswebcam - OR ffmpeg:
sudo apt install ffmpeg
# 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-lampRun the tool:
./lava-lamp- The tool will show a 3-second countdown.
- Point your camera at something chaotic (a lava lamp, a busy street, or just your face).
- 📸 Snap!
- Your new Ed25519 public and private keys will be displayed on screen.
- Copy them to your SSH configuration.
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 --devThe 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.
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.jpgThe 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.
MIT