ExkPasswd Quick Start
Mix.install([
# {:exk_passwd, "~> 0.1.0"}
{:exk_passwd, git: "https://github.com/futhr/exk_passwd.git"}
# {:exk_passwd, path: "/path/to/exk_passwd"}
])
Introduction
Welcome to ExkPasswd - a secure, memorable password generator using the XKPasswd method!
XKPasswd creates strong passwords by combining:
- Random words (easy to remember)
- Numbers and symbols (hard to crack)
- Configurable transformations (customizable strength)
This interactive notebook lets you explore ExkPasswd and generate passwords right in your browser.
Basic Usage
The simplest way to generate a password:
ExkPasswd.generate()
Run the cell above multiple times - you’ll get a different password each time! All randomness uses cryptographically secure sources.
Using Presets
ExkPasswd includes several built-in presets for common use cases:
# XKCD-style: 4 lowercase words with hyphens
ExkPasswd.generate(:xkcd)
# Web-friendly: 32 character max length
ExkPasswd.generate(:web32)
# WiFi: Maximum 63 characters for WPA2
ExkPasswd.generate(:wifi)
# Security: Maximum strength with 6 words
ExkPasswd.generate(:security)
# Apple ID: Meets Apple's requirements
ExkPasswd.generate(:apple_id)
Exploring Available Presets
See all available presets:
ExkPasswd.Config.Presets.start_link(nil)
ExkPasswd.Config.Presets.list()
Get details about a specific preset:
ExkPasswd.Config.Presets.get(:xkcd)
Generate Multiple Passwords
Need several passwords at once? Use batch generation:
config = ExkPasswd.Config.Presets.get(:default)
ExkPasswd.Batch.generate_batch(5, config)
Batch generation is optimized for performance - it’s faster than generating passwords one at a time!
Password Strength
Check the strength of generated passwords:
config = ExkPasswd.Config.Presets.get(:security)
password = ExkPasswd.generate(config)
strength = ExkPasswd.Strength.analyze(password, config)
IO.puts("Password: #{password}")
IO.puts("Strength: #{strength.rating}")
IO.puts("Entropy: #{Float.round(strength.entropy_bits, 2)} bits")
# IO.puts("Crack time: #{strength.crack_time_display}")
Interactive Playground
Try modifying these examples:
# Generate 10 different preset passwords and compare them
presets = [:xkcd, :web32, :wifi, :security, :apple_id]
for preset <- presets do
config = ExkPasswd.Config.Presets.get(preset)
password = ExkPasswd.generate(config)
strength = ExkPasswd.Strength.analyze(password, config)
IO.puts("#{preset}: #{password}")
IO.puts(" → #{strength.rating} (#{Float.round(strength.entropy_bits, 1)} bits)")
IO.puts("")
end
:ok
Next Steps
- Advanced Usage - Custom configurations and transformations
- Security Analysis - Deep dive into entropy and strength
- Benchmarks - Performance metrics and comparisons
Learn More
- GitHub Repository
- Documentation
- XKCD Comic #936 - The inspiration for this method