| Crates.io | four-word-networking |
| lib.rs | four-word-networking |
| version | 2.6.0 |
| created_at | 2025-07-08 16:17:54.968747+00 |
| updated_at | 2025-08-09 16:26:27.621981+00 |
| description | Convert IP addresses to memorable, family-friendly word groups. Interactive TUI with real-time autocomplete. IPv4 = 4 words, IPv6 = 6-12 words. Perfect reconstruction with progressive hints. |
| homepage | https://github.com/dirvine/four-word-networking |
| repository | https://github.com/dirvine/four-word-networking |
| max_upload_size | |
| id | 1743135 |
| size | 9,561,862 |
Traditional networking requires us to remember complex strings of numbers. But what if every service on your computer—your website, blog, phone system, video chat, or AI assistant—had its own simple four-word address?
This isn't just about IP addresses; it's about service addresses. Each device can run over 65,000 different services, and each gets its own unique four-word combination. Same computer, different words, different services—all instantly accessible to anyone you choose to share them with.
When you start your node on this peer-to-peer network, you might receive four words like "black tree fish river". Share these words with friends, and they can instantly connect to you—no technical knowledge required. Whether you're creating a private friend network or joining a global community, those four words are your gateway.
Your computer becomes a Swiss Army knife of services:
Each service runs on the same machine but has its own memorable address. Tell a friend to video call you at "mountain cat yes valley"—that's it. No apps to download, no accounts to create, just direct, secure communication.
Cryptocurrency addresses are notoriously complex: long strings of random characters that are easy to mistype and impossible to remember. With four-word networking, sending Bitcoin becomes as simple as saying "send 2 Bitcoin to monkey rain bike forest".
For the technically curious, this elegantly solves the challenge of transmitting high-entropy data (complex cryptographic addresses) through a low-entropy channel (human speech and memory).
Think of it as a massive, global directory service—like DNS but:
Critics might say "but you can't choose your own words!" Yet look at today's internet: all the good domain names are taken. We're left with misspelled company names, hard-to-pronounce combinations, and domains that have nothing to do with their content.
Four-word networking actually levels the playing field. Everyone gets equally memorable addresses, allocated fairly by the system.
This represents a shift from the corporate-controlled internet back to its peer-to-peer roots. When anyone can run services as easily as sharing four words, we return to an internet of equals—where innovation isn't gatekept by those who can afford domain names and hosting.
While this system starts with individual machines (no load balancing like big tech companies use), it opens doors to entirely new models of distributed computing. Combined with other decentralized network technologies, we might see:
Four-word networking isn't just a technical innovation—it's a return to the internet's original vision: a network where anyone can connect, create, and communicate without permission, without fees, and without complexity.
In a world where we struggle to remember phone numbers, where we rely on corporate platforms for basic communication, and where technical barriers keep billions from fully participating online, four simple words might just be the key to unlocking the internet's true potential.
Welcome to the future of networking. It's as simple as black tree fish river.
Based on open-source peer-to-peer networking technology including ant-quic and other decentralized protocols currently in development.
The evolution from three-word to four-word networking represents a crucial balance between human usability and practical dictionary constraints.
Initially, we explored three-word encoding for IPv4 addresses, which required a dictionary of 65,536 words (2^16 words to encode 16 bits per word). While mathematically elegant, this approach faced fundamental limitations:
Four-word encoding uses a carefully curated 4,096-word dictionary (2^12 words), providing several advantages:
IPv4 encoding: 4 words × 12 bits = 48 bits (perfect fit for IP + port)
IPv6 encoding: 6-12 words (adaptive based on address complexity)
Dictionary size: 4,096 words (2^12)
A curated set of 4,096 lowercase English words for human-readable four-word identifiers. The list emphasizes pronounceability, visual clarity, and UK English conventions. It avoids brand names and sensitive/offensive terms, and standardizes US→UK spellings (e.g., color → colour, center → centre, defense → defence).
Why 4,096? Power-of-two sizing (2¹²) plays nicely with bit-packing and codecs, but—critically for humans—words beat raw base-n strings: they're easier to say, hear, write, and spot typos in. This mirrors prior art (Diceware, BIP-39, PGP word lists) that all trade a small amount of entropy density for big UX wins.
Design Goals:
What We Deliberately Exclude:
v1.2 Update: Enforces unique first-5 characters for every word in the set. This dramatically improves disambiguation for autocomplete and spoken entry, echoing the well-documented benefits of short unique prefixes in mnemonic wordlists.
Why first-5? BIP-39's 2,048-word list famously guarantees unique first four for rapid human entry and error detection. We adopt the same idea and go a notch stricter at five characters because our corpus is larger (4,096) and we want even crisper UX in noisy or low-attention contexts.
References & Prior Art:
BIP-39: 4-letter uniqueness for mnemonics, human-friendly design goals
EFF Diceware: Curated English wordlists optimized for memorability
PGP word list: Phonetic clarity for error-resistant transmission
S/KEY (RFC 2289): Classic wordlist mapping for human-verifiable codes
The four-word approach balances theoretical perfection with practical usability:
This technical foundation ensures that four-word networking provides both the mathematical rigor required for networking protocols and the human-friendly experience needed for widespread adoption.
System for converting IP addresses and ports into memorable word combinations. IPv4 addresses always produce exactly 4 words with perfect reconstruction, while IPv6 addresses use adaptive word counts maintaining the same clean user experience.
✅ Status: Ready for Community Testing - The core technology is complete and the dictionary has been significantly improved! We are now:
- Ready for community feedback on our high-quality 4,096-word dictionary
- Seeking real-world testing and user experience feedback
- Conducting ongoing security analysis and performance validation
- Preparing for production deployment and integration examples
Four-Word Dictionary - Our Production-Ready System: We've successfully created a high-quality dictionary of exactly 4,096 words using frequency-based word selection and comprehensive English validation. The dictionary now contains:
- Frequency-Optimized Words: Selected from the most commonly used English words for maximum familiarity and memorability
- Quality Validated: All words verified against comprehensive English dictionaries to ensure legitimacy and readability
- Voice-Friendly Selection: Words chosen for clear pronunciation and minimal confusion in verbal communication
- Professional Grade: Suitable for business, technical, and casual communication contexts
Encoding Quality Examples:
# IPv4 addresses now produce highly readable words: 192.168.1.1:443 → beatniks contrarily stockholm river # Natural, memorable words 10.0.0.1:80 → byname wahoos willie forest # Clear, pronounceable combinations # IPv6 addresses use natural word groups: [::1]:443 → sectorial supper ballparks consider tri gram # 6 words [2001:db8::1]:8080 → peroneal amici sharan ende wiry boun # 6 words for global unicastThis approach solves the fundamental challenge of creating a practical dictionary where EVERY word must be readable, pronounceable, and memorable. The Feistel network selects from all 4,096 positions with equal probability, so every word in the dictionary needed to meet our quality standards.
We're Ready for Community Testing! The dictionary quality has been dramatically improved and produces natural, readable English words. We encourage developers, network administrators, and early adopters to test the system and provide feedback on usability and word selection.
Try it now:
cargo install four-word-networkingand test with4wn 192.168.1.1:443
# IPv4 addresses: Always exactly 4 words (perfect reconstruction)
192.168.1.1:443 → beatniks contrarily stockholm river
10.0.0.1:80 → byname wahoos willie forest
127.0.0.1:8080 → lour pitfall strath ocean
172.16.0.1:22 → purdey defamed zola mountain
# IPv6 addresses: 6, 9, or 12 words (groups of 3-4 words)
[::1]:443 → sectorial supper ballparks consider tri gram
[2001:db8::1]:8080 → peroneal amici sharan ende wiry boun
Four-Word Networking provides a solution for converting IP addresses into human-memorable word combinations. The system uses a carefully curated 4,096-word dictionary to achieve perfect encoding for IPv4 addresses in exactly 4 words, while IPv6 addresses use adaptive compression with 6-12 words for optimal efficiency.
4wn command with cargo install four-word-networkingFour-Word Networking uses sophisticated bit manipulation and a curated dictionary to achieve optimal encoding:
The system uses a carefully curated 4,096-word dictionary optimized for human readability:
| Address Type | Example | Word Count | Time |
|---|---|---|---|
| IPv4 | 192.168.1.1:443 | 4 | <1μs |
| IPv4 | 10.0.0.1:8080 | 4 | <1μs |
| IPv6 Loopback | [::1]:443 | 6 | <2μs |
| IPv6 Link-Local | [fe80::1]:22 | 6 | <2μs |
| IPv6 Global | [2001:db8::1]:443 | 6 | <2μs |
| IPv6 Complex | [2001:db8:85a3::8a2e:370:7334]:8080 | 9-12 | <2μs |
# Install the 4wn CLI tool
cargo install four-word-networking
# Convert IP to words
4wn 192.168.1.1:443
# Output: beatniks contrarily stockholm river
# Convert words back to IP
4wn "beatniks contrarily stockholm river"
# Output: 192.168.1.1:443
# Also supports space-separated format
4wn beatniks contrarily stockholm river
# Output: 192.168.1.1:443
Add to your Cargo.toml:
[dependencies]
four-word-networking = "2.0.0"
# IPv4 addresses (always 4 words - perfect reconstruction)
4wn 10.0.0.1:80
# byname wahoos willie forest
4wn 172.16.0.1:22
# purdey defamed zola mountain
# IPv6 addresses (6-12 words)
4wn "[::1]:443"
# sectorial supper ballparks consider tri gram
# Reverse conversion
4wn "byname wahoos willie forest"
# 10.0.0.1:80
4wn "sectorial supper ballparks consider tri gram"
# [::1]:443
# Verbose mode shows details
4wn -v 192.168.1.1:443
# Input: 192.168.1.1:443
# Type: IPv4
# Words: beatniks contrarily stockholm river
# Count: 4 words
# Method: Perfect reconstruction (0% data loss)
# Note: IPv4 addresses always use exactly 4 words
use four_word_networking::FourWordAdaptiveEncoder;
let encoder = FourWordAdaptiveEncoder::new()?;
// Encode IPv4 (always 4 words, perfect reconstruction)
let words = encoder.encode("192.168.1.1:443")?;
assert_eq!(words, "beatniks contrarily stockholm river");
// Decode back to exact address
let decoded = encoder.decode("beatniks contrarily stockholm river")?;
assert_eq!(decoded, "192.168.1.1:443");
// IPv6 examples (6-12 words)
let ipv6_words = encoder.encode("[::1]:443")?;
assert_eq!(ipv6_words, "sectorial supper ballparks consider tri gram"); // 6 words
let decoded_ipv6 = encoder.decode(&ipv6_words)?;
assert_eq!(decoded_ipv6, "[::1]:443");
// Word count depends on address type
// IPv4: Always exactly 4 words
// IPv6: 6, 9, or 12 words based on complexity
assert_eq!(words.split(' ').count(), 4); // IPv4
assert_eq!(ipv6_words.split(' ').count(), 6); // IPv6
use four_word_networking::FourWordAdaptiveEncoder;
let encoder = FourWordAdaptiveEncoder::new()?;
// IPv4 perfect reconstruction details
let ipv4_words = encoder.encode("10.0.0.1:80")?;
println!("IPv4: {} -> {}", "10.0.0.1:80", ipv4_words);
// IPv4: 10.0.0.1:80 -> byname wahoos willie forest
// IPv6 adaptive compression
let ipv6_words = encoder.encode("[::1]:443")?;
println!("IPv6: {} -> {}", "[::1]:443", ipv6_words);
// IPv6: [::1]:443 -> sectorial supper ballparks consider tri gram
// Simple format for all addresses
// IPv4: 4 words (byname wahoos willie forest)
// IPv6: 6-12 words
// Integration with existing code
fn get_server_words(addr: &str) -> Result<String, Box<dyn std::error::Error>> {
let encoder = FourWordAdaptiveEncoder::new()?;
Ok(encoder.encode(addr)?)
}
Four-word addresses are optimized for verbal communication:
"What's your server address?"
"beatniks contrarily stockholm river" (192.168.1.1:443)
"Can you share the IPv6 endpoint?"
"sectorial supper ballparks consider tri gram" ([::1]:443) - 6 words
"I need the development server"
"byname wahoos willie forest" (10.0.0.1:80)
Real-world scenarios:
- Phone support: "Connect to beatniks contrarily stockholm river"
- Team meetings: "The API is at byname wahoos willie forest"
- Documentation: "Default: lour pitfall strath ocean"
- Voice assistants: "Connect me to purdey defamed zola mountain"
# Server configuration files
api_server = "beatniks contrarily stockholm river" # 192.168.1.1:443
db_primary = "byname wahoos willie forest" # 10.0.0.1:80
db_replica = "lour pitfall strath ocean" # 127.0.0.1:8080
Support: "Please connect to beatniks contrarily stockholm river"
User: "Is that B-E-A-T-N-I-K-S?"
Support: "Yes, beatniks contrarily stockholm river"
User: "Connected successfully!"
// Device announces its address verbally
device.announce("Device ready at byname wahoos willie forest");
Alert: Connection lost to lour pitfall strath ocean (127.0.0.1:8080)
Action: Reconnecting to lour pitfall strath ocean...
Status: Restored connection to lour pitfall strath ocean
use four_word_networking::FourWordAdaptiveEncoder;
use warp::Filter;
#[tokio::main]
async fn main() {
let encoder = FourWordAdaptiveEncoder::new().unwrap();
let addr: SocketAddr = "127.0.0.1:3030".parse().unwrap();
let words = encoder.encode(&addr.to_string()).unwrap();
println!("Server running at: {}", words);
println!("Tell users to connect to: {}", words);
// Your web service here
warp::serve(routes)
.run(addr)
.await;
}
# config.toml
[servers]
primary = "beatniks contrarily stockholm river" # 192.168.1.1:443
backup = "byname wahoos willie forest" # 10.0.0.1:80
[database]
master = "purdey defamed zola mountain" # 172.16.0.1:5432
replica = "lour pitfall strath ocean" # 127.0.0.1:5432
// Convert addresses in logs for readability
log::info!("Connected to {}", encoder.encode(&peer_addr.to_string())?);
// Output: Connected to beatniks contrarily stockholm river
// Parse from logs
if let Ok(addr) = encoder.decode("beatniks contrarily stockholm river") {
reconnect(addr.parse()?);
}
// Main API interface
pub struct FourWordAdaptiveEncoder { ... }
// Core Methods
fn encode(&self, input: &str) -> Result<String>
fn decode(&self, words: &str) -> Result<String>
fn analyze(&self, input: &str) -> Result<String>
// Autocomplete & Hints API
fn get_word_hints(&self, prefix: &str) -> Vec<String>
fn validate_partial_input(&self, partial: &str) -> ValidationResult
fn suggest_completions(&self, partial_words: &str) -> Vec<String>
// Input formats supported
// - "192.168.1.1:443" (IPv4 with port)
// - "192.168.1.1" (IPv4 without port)
// - "[::1]:443" (IPv6 with port)
// - "::1" (IPv6 without port)
use four_word_networking::FourWordAdaptiveEncoder;
let encoder = FourWordAdaptiveEncoder::new()?;
// Get word suggestions after 3 characters
let hints = encoder.get_word_hints("bea")?;
// Returns: ["beach", "beam", "bean", "bear", "beard", "beast", "beat", "beatniks", ...]
// Commit on 5 characters (guaranteed unique)
let word = encoder.get_word_hints("beatn")?;
// Returns: ["beatniks"] - single match due to 5-char uniqueness
// Progressive hints for better UX
let progressive_hints = encoder.suggest_completions("beatniks cont")?;
// Returns: ["beatniks contrarily", "beatniks contact", ...]
// Validate partial input
let validation = encoder.validate_partial_input("beatniks contr")?;
// Returns: ValidationResult {
// is_valid_prefix: true,
// possible_completions: ["contrarily"],
// word_count_so_far: 1,
// expected_total_words: 4 // for IPv4
// }
// Smart error recovery
let corrected = encoder.suggest_corrections("beatnik contrarilly")?;
// Returns: ["beatniks contrarily"] - fixes typos
Autocomplete Implementation:
Voice UI Integration:
Progressive Disclosure:
// Example web interface
function handleInput(text) {
if (text.length >= 3) {
// Show dropdown with suggestions
const hints = api.getWordHints(text);
showDropdown(hints);
}
if (text.length >= 5) {
// Auto-complete if unique match
const match = api.getExactMatch(text);
if (match) {
completeWord(match);
focusNextWord();
}
}
}
4wn command for instant conversions🔧 Dictionary Optimization: Fine-tuning the 4,096-word list for:
🔧 Security Analysis:
🔧 Real-World Testing:
🔧 Internationalization:
The four-word paradigm offers fascinating possibilities beyond IP addresses. Our comprehensive analysis reveals that four words provide 48 bits of entropy - equivalent to an 8-character complex password, but infinitely more memorable.
Kj7$mN2p)1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa, use monkey rain bike forestapi_key_ABC123XYZ789FakeExample001 with sunset river song oceanpaper violin stream mountain instead of TXN-2024-0C4F9BFor detailed security analysis, entropy calculations, and implementation ideas, see our Four-Word Paradigm Analysis.
We welcome contributions! Areas of interest:
See CONTRIBUTING.md for guidelines.
Licensed under either of:
at your option.
Four-Word Networking: Making IP addresses human-friendly. IPv4 in 4 words. IPv6 in groups of 4. Always.