Calculating Shannon Entropy: The Bit Math
Information entropy measures the unpredictability of a password string in bits. The formula is: Entropy (bits) = Length × log2(Pool Size).
A 12-character password using only lowercase letters (pool = 26) provides only 56.4 bits of entropy. Adding uppercase, digits, and special symbols (pool = 95) raises a 16-character password to 105.1 bits. At 105 bits of entropy, exhaustive brute-force search would take modern supercomputers trillions of years.
Why Standard Math.random() is Insecure
In JavaScript, Math.random() is implemented using pseudorandom number generators like xorshift128+. It is deterministic and designed solely for statistical uniformity, not cryptographic unpredictability.
DocSwift relies strictly on the Web Crypto API: window.crypto.getRandomValues(). This taps directly into kernel hardware entropy sources (mouse jitter, CPU thermal noise, disk interrupt timings) to generate unguessable entropy.
Step-by-Step Tutorial
Determine Target Entropy
Aim for a minimum of 80 bits for general accounts and 100+ bits for master vault passphrases.
Leverage In-Browser CSPRNG
Use DocSwift Password Generator to sample from a verified pool of 95 alphanumeric and special characters.
Store in Zero-Knowledge Vault
Never save credentials in plain text files; store them in an encrypted password manager.
Ready to Try It Yourself?
DocSwift processes everything directly on your device. Fast, safe, and completely free forever.
How helpful was this guide?
Rated 4.9 / 5 by 3,420+ users worldwide
Share with Colleagues & Friends
Help others protect their document privacy
Frequently Asked Questions
Are passwords generated in DocSwift transmitted to any server?
Never. The generator runs 100% in local browser JavaScript using window.crypto.getRandomValues(). Zero bytes leave your device.
How long does it take to brute-force a 16-character high-entropy password?
With 105 bits of entropy and modern GPU rigs testing billions of guesses per second, cracking takes longer than the age of the observable universe.