Entropy

What entropy is, how Passgen measures it, and how much of it you need.

In computing, entropy measures how many bits of randomness something contains. A lowercase eight-letter password such as grxrmizc has less entropy than an eight-character password that also uses uppercase letters and digits, such as budRcEUi, even though they have the same length. There are simply more possibilities for the latter.

Passgen can calculate the entropy of the sequences it generates. This tells you how much work it would take to crack a passphrase by brute force, if an adversary knew the exact pattern you used to generate it. Use the --entropy flag:

$ passgen -e '[a-z]{8}'
entropy: 37.60 bits
grxrmizc
$ passgen -e '[A-Za-z0-9]{8}'
entropy: 47.63 bits
budRcEUi

The longer a passphrase is, and the more choice goes into every part of it (a larger set of characters, a longer wordlist), the higher its entropy, and the more secure it is.

Calculator

With some public data on how fast hashes can be computed, it is possible to estimate how long an adversary would need to try every possible passphrase of a given entropy. On average, they will find it in half that time.

The estimate assumes that the attacker knows the pattern, has stolen a hash of the passphrase, and spends the budget on graphics cards. Hash rates are Hashcat benchmarks for an RTX 4090, priced at $1600. The choice of algorithm is made by the service that stores your passphrase, not by you.

Recommendation

Use passphrases with at least 100 bits of entropy. Every additional bit doubles the effort needed to crack the passphrase, so it is cheap to err on the side of caution.

Also keep in mind that the passphrase is often not the weakest link in the chain. As xkcd 538 points out, sometimes the human is.