A blazing-fast, lightweight steganography tool for concealing data inside normal-looking files. Lupin can be used as a CLI tool for quick operations or as a Rust library for integration into your applications.
Steganography hides the existence of data rather than just its contents. Where encryption makes a message unreadable, steganography makes it invisible: the file still looks and behaves like an ordinary PDF, PNG, or JPEG.
Lupin is named after Arsène Lupin, the fictional gentleman thief, for the same reason: hiding something in plain sight.
- PDF: Appends data after the
%%EOFmarker (unlimited capacity, easily detectable) - PNG: Custom ancillary chunks (unlimited capacity, zero visual artifacts, somewhat easily detectable)
- JPEG: Signed APP13 application markers, split across segments as needed (unlimited capacity, zero visual artifacts, somewhat easily detectable)
All three engines currently optimize for capacity: unlimited size, but easy to spot with strings. The CLI and API carry an --capacity / --stealth selector for a future low-detectability strategy; no engine implements --stealth yet, so requesting it returns a clear error. See the CLI and library guides.
# Install
cargo install lupin
# Or build from source: git clone && cargo build --release
# Hide data in PDF
lupin embed document.pdf secret.txt output.pdf
# Extract data
lupin extract output.pdf recovered.txt
# More options
lupin --helpMore info in the CLI Guide.
# Cargo.toml
[dependencies]
lupin = "1.0"use lupin::operations::{embed, extract};
use lupin::EmbedMode;
// Read files
let source = std::fs::read("document.pdf")?;
let payload = std::fs::read("secret.txt")?;
// Embed with metadata
let (embedded_data, metadata) = embed(&source, &payload, EmbedMode::Capacity)?;
println!("Used {} engine", metadata.engine);
// Extract (mode is autodetected)
let (extracted, info) = extract(&embedded_data)?;More info in the Library Guide.
- CLI Guide - Command-line usage, logging, examples
- Library Guide - Rust API, integration examples
- Architecture - How it works, adding new formats
Contributions welcome! Please read the architecture docs to understand the codebase structure.
Apache License 2.0. See LICENSE for details.
Disclaimer: For educational and legitimate use only. Users are responsible for complying with applicable laws.