Anyhide - Hide Anything in Anything
Hide anything inside anything. Anyhide is an advanced steganography and encryption tool that conceals any data (text, files, binaries) within any carrier file(s) (images, videos, documents, executables) using hybrid encryption with forward secrecy and plausible deniability.
Why Anyhide?
Traditional steganography modifies the carrier file and transmits it. Anyhide is different:
| Traditional Steganography | Anyhide |
|---|---|
| Modifies the carrier file | Never touches the carrier |
| Transmits the modified file | Transmits only a short code |
| Carrier can be analyzed | Carrier stays untouched |
| Hide text in images | Hide anything in anything |
Use cases:
- Hide encrypted files inside a shared video
- Conceal sensitive documents using a public PDF as carrier
- Store secrets referenced by any file both parties have
- Covert communication with plausible deniability
How It Works
Anyhide uses a pre-shared carrier model:
- Both parties have the same file (ANY file: image, video, PDF, text, etc.)
- Sender hides data by finding byte patterns in the carrier
- Only an encrypted code is transmitted - the carrier is never sent
- Receiver uses the same carrier + code to extract the hidden data
┌─────────────────────────────────────────────────────────────┐
│ SENDER RECEIVER │
│ │
│ carrier.mp4 ──┐ ┌── carrier.mp4 │
│ │ │ (same file) │
│ secret.zip ───┼──► ANYHIDE CODE ─────┼──► secret.zip │
│ │ (only this │ │
│ passphrase ───┘ is sent) └── passphrase │
│ │
│ The carrier is NEVER transmitted │
└─────────────────────────────────────────────────────────────┘
Key Features
- Any carrier: text, images, audio, video, PDFs, executables, archives
- Any payload: text messages, binary files, documents, archives
- Dual-layer encryption: Symmetric (ChaCha20) + Asymmetric (X25519)
- Forward secrecy ratchet: Key rotation per message - past messages stay secure even if keys leak
- Ephemeral keys: Generate rotating keys for perfect forward secrecy
- Key fingerprints: Verify keys out-of-band (hex, emoji, visual art)
- Mnemonic backup: Export/import keys as 24-word BIP39 phrases for paper backup
- Contacts with aliases: Save contacts in
~/.anyhide/contacts.toml, use--to alice - P2P Chat over Tor: Real-time encrypted chat via Tor hidden services (experimental)
- Duress password: Two messages, two passphrases - reveal the decoy under coercion
- Message signing: Ed25519 signatures for sender authentication
- Message expiration: Auto-expiring messages
- Code splitting: Split codes for multi-channel delivery
- QR code support: Share codes via QR
- Plausible deniability: Wrong passphrase returns garbage, not an error
- Never fails: Decoder always returns something - prevents brute-force detection
- Library support: Use Anyhide in your own Rust projects
Installation
From crates.io
Download Pre-built Binary
Download from GitHub Releases:
- Linux:
anyhide-linux-x86_64oranyhide-linux-aarch64 - macOS:
anyhide-macos-x86_64(Intel) oranyhide-macos-aarch64(Apple Silicon) - Windows:
anyhide-windows-x86_64.exe
Build from Source
Quick Start
1. Generate Keys
# Creates: mykeys.pub, mykeys.key, mykeys.sign.pub, mykeys.sign.key
2. Encode a Message
# Using any text file as carrier
# Output: AwNhYmNkZWZn... (send this code)
3. Decode a Message
# Output: ama park
Command Reference
Generate Keys
)
)
)
)
)
)
# Long-term keys (default)
# Long-term keys with mnemonic backup phrases
# Shows 24-word phrases for both encryption and signing keys
# Creates: mykeys.pub, mykeys.key, mykeys.sign.pub, mykeys.sign.key
# Ephemeral keys (individual files)
# Creates: alice.pub, alice.key (with EPHEMERAL PEM headers)
# Ephemeral keys (consolidated separate files)
# Adds/updates contact "bob" in both JSON files
# Ephemeral keys (unified file)
# Adds/updates contact "bob" with my_private and placeholder their_public
Encode
)
)
)
)
Decode
)
)
)
)
)
)
)
)
)
)
Fingerprint
Display a key's fingerprint for out-of-band verification (like Signal/WhatsApp).
)
# Show all fingerprint formats
# Show only emoji fingerprint (easy to compare by phone)
Output example:
Key: alice.pub
Hex Fingerprint:
75EC37D4 51EBEDE4 E4AA4182 FD719560
BE3E765C CE49A772 597A0ACF 09AC05FA
Emoji Fingerprint:
🌲 🚂 🌺 🦊 🐺 ⛵ 🏎️ 🎻
Visual Fingerprint:
+-----------------+
| o .o|
| .o ..+|
| . o..oo|
| + o .o..|
| S + +.+oB|
| . *.+o#+|
| . O+=+B|
| . o.Oo= |
| E ..* |
+-----------------+
Mnemonic Backup
Export and import long-term keys as 24-word BIP39 phrases for paper backup.
# Export existing key to mnemonic
# Shows 24 words for paper backup
# Export signing key
# Import encryption key from mnemonic (interactive)
# Enter 24 words when prompted
# Creates: restored.key, restored.pub
# Import signing key from mnemonic
# Creates: restored.sign.key, restored.sign.pub
Important: Mnemonic backup is only for long-term private keys (.key, .sign.key). Ephemeral keys rotate per message and should not be backed up.
Contacts
Manage contacts with aliases to avoid typing full paths.
# Add a contact
# List all contacts
# Show contact details with fingerprint
# Remove a contact
# Use contact in encode
Contacts are stored in ~/.anyhide/contacts.toml:
[]
= "/path/to/alice.pub"
= "/path/to/alice.sign.pub"
[]
= "/path/to/bob.pub"
P2P Chat over Tor
Real-time encrypted chat using Tor hidden services. Both peers are equal - no server/client distinction.
Security Warning: Arti's onion services are experimental and not as secure as C-Tor. Do not use for highly sensitive communications.
Setup (one time):
# 1. Generate your keys (encryption + signing)
# 2. Initialize your chat identity (bootstraps Tor, shows your .onion)
# Output: Your .onion address: xyz123abc.onion
# 3. Add a contact (you need their .onion address and public keys)
Start chatting:
# Enter your passphrase when prompted (input is hidden)
Pre-shared carriers (optional, extra security):
# Both parties must use the SAME files in the SAME order
# The carrier files are NEVER transmitted - only a hash is verified
# This provides extra security: the files become an additional secret
# N files = N! additional security (3 files = 6 possible orders)
That's it! The system will:
- Ask for your passphrase (required for encryption, input is hidden)
- Create your hidden service
- Try to connect to Bob's .onion address
- If Bob isn't online, wait for him to connect to you
- First successful connection (incoming or outgoing) establishes the session
- Launch the TUI (Terminal User Interface)
TUI Interface:
┌─ Anyhide Chat - bob ─────────────────────────────────┐
│ Connected | abc123...onion | 2↑ 1↓ │
├──────────────────────────────────────────────────────┤
│ │
│ [14:32] Connected to bob │
│ [14:32] Type /help for commands. Ctrl+C to quit. │
│ [14:33] you: Hello Bob! │
│ [14:33] bob: Hey Alice! How are you? │
│ │
├─ Input ──────────────────────────────────────────────┤
│ > your message here... 11/256 │
└──────────────────────────────────────────────────────┘
The counter shows current/max characters. Turns yellow at <20 remaining, red at 0.
Chat management commands:
Local testing with profiles:
# Run multiple identities on the same machine (for testing)
# Terminal 1:
# Terminal 2:
Each profile gets separate config and Tor state directories.
Chat session commands:
/quitor/q- Exit the chat/statusor/s- Show session statistics/helpor/h- Show available commands/clearor/c- Clear message history
Keyboard shortcuts:
Ctrl+CorEsc- QuitEnter- Send messagePage Up/Down- Scroll message historyCtrl+Up/Down- Scroll one line
How it works:
- Both parties initialize with
chat init(creates their .onion identity) - Exchange identities out-of-band:
- Option A (QR):
chat export-qrto generate QR, scan withchat import-qr - Option B (Manual): Share .onion address and public keys, use
chat add
- Option A (QR):
- Run
anyhide chat <contact>- both peers create hidden services and race to connect - First successful connection wins, handshake establishes encrypted session
- Messages encrypted with Double Ratchet protocol for forward secrecy
Other Commands
Examples
Binary Files as Carrier
Use any file (video, PDF, image, executable) as carrier:
# Hide text in a shared video
# Hide a ZIP file inside a PDF
# Extract hidden file
Message Signing
# Sign message
# Verify signature
# Output: From Alice
# Signature: VALID
Message Expiration
# Message expires in 24 hours
# After expiration: returns garbage (not an error)
Code Splitting
# Split into 3 parts
# Output: part-1: xxx, part-2: yyy, part-3: zzz
# Decode with all parts in order
# Wrong order = garbage (plausible deniability)
QR Codes
# Generate code + QR in one step
# Read QR and decode
# Split QR codes
# Creates: code-1.png, code-2.png, code-3.png
Multi-Carrier Encoding
Use multiple carriers concatenated in order. The order is an additional secret!
# Encode with 3 carriers - order matters!
# Decode with EXACT same files in EXACT same order
# Wrong order = garbage (plausible deniability)
# Returns garbage, not an error
Security benefit: N carriers provide N! additional combinations:
- 2 carriers = 2 combinations
- 3 carriers = 6 combinations
- 4 carriers = 24 combinations
- 5 carriers = 120 combinations
When using multiple carriers:
- All files are read as bytes and concatenated in order
- Single text file with
-c file.txtpreserves text carrier behavior - Multiple files always become a binary carrier
Forward Secrecy Ratchet
Enable key rotation per message for perfect forward secrecy.
Ephemeral Key Storage Formats
Anyhide supports 3 storage formats for ephemeral keys:
Option 1: Individual PEM files (simple, single contact)
# Creates: alice.pub, alice.key (with EPHEMERAL headers)
Option 2: Separate consolidated JSON files (multiple contacts)
# mykeys.eph.key: JSON with your private keys for each contact
# contacts.eph.pub: JSON with each contact's public key
Option 3: Unified JSON file (recommended for chat apps)
# contacts.eph: JSON with both my_private and their_public per contact
Automatic Ratchet with Individual Files
# Step 1: Both parties generate ephemeral keys and exchange public keys
# Step 2: Alice sends message (keys rotate automatically)
# Output: Just the code (alice.key updated with next keypair)
# Step 3: Bob decodes (their public key updated automatically)
# Output: Hello Bob (alice.pub updated with her next public key)
# Step 4: Bob replies (keys rotate again)
# Output: Just the code (bob.key updated)
Automatic Ratchet with Separated Stores
For environments where you want private keys and public keys in separate files:
# Step 1: Setup - create separated key stores
# Exchange initial public keys
# Step 2: Alice sends message
# Output: Just the code (alice.eph.key[bob] updated with next keypair)
# Step 3: Bob decodes
# Output: Hello Bob (bob.eph.pub[alice] updated with Alice's next public key)
Automatic Ratchet with Unified Store (Recommended)
# Step 1: Setup - create unified key stores for each party
# Exchange public keys initially
# Step 2: Alice sends message
# Output: Just the code (alice.eph[bob].my_private updated)
# Step 3: Bob decodes
# Output: Hello Bob (bob.eph[alice].their_public updated)
# Step 4: Bob replies
# Output: Just the code (bob.eph[alice].my_private updated)
Key points:
- Messages are always clean - no key information displayed
- Keys rotate automatically after each encode/decode
- Use
-vfor verbose output if you need to see key details - The
--keyflag is deprecated - use--my-keyand--their-keyinstead
Library Usage for Chat Applications
use ;
use ;
// Initial setup: generate keys for Bob
let my_keypair = generate_ephemeral;
save_unified_keys_for_contact?;
// Encode with ratchet enabled
let config = EncoderConfig ;
let result = encode_with_config?;
// result.next_keypair contains your NEXT key pair
// Save it for the next message you send
// result.code contains the encrypted message
// On receiving a reply, decode and get their next key
let decoded = decode_with_config;
if let Some = decoded.next_public_key
How the ratchet works:
- Each message includes sender's NEXT public key
- Recipient uses that key for the reply
- Keys rotate with every message exchange
- Compromised keys cannot decrypt past messages
Security Properties
- Four-Factor Security: Carrier + Passphrase + Private Key + Correct Version
- Never-Fail Decoder: Always produces output - no error signals for attackers
- Plausible Deniability: Wrong inputs return garbage, not errors
- Forward Secrecy: Ephemeral keys protect past messages
- Code Splitting: Wrong order = garbage (no error)
Disclaimer
Anyhide is provided for educational and legitimate privacy purposes only.
This software is a tool, and like any tool, it can be used for good or bad purposes. The authors:
- DO NOT endorse or encourage any illegal activities
- ARE NOT responsible for how this software is used
- PROVIDE this software "as is" without warranty
You are solely responsible for ensuring your use complies with all applicable laws.
Documentation
- User Manual: This README
- Architecture & Development: ARCHITECTURE.md
- Version History: CHANGELOG.md
License
MIT License - see LICENSE for details.
Version
Current version: 0.11.0 (see CHANGELOG.md)