magic-wormhole / magic-wormhole.rs

Rust implementation of Magic Wormhole, with new features and enhancements
European Union Public License 1.2
712 stars 74 forks source link

New wordlists #106

Open piegamesde opened 3 years ago

piegamesde commented 3 years ago

Since I've started using Magic Wormhole, I've never been fond of the word list it uses. Quick summary:

Here's the problems I have with it:

I think if we give up holding on that "phonetically distinct" property (as it does not really work out IMO), we can start discussing more secure (and localized) alternatives.

If we have multiple word lists or code generation schemes, we then need a way for the user to choose one. CLI flags alone won't cut it, as specifying them every single time is tedious.

Python issue: https://github.com/magic-wormhole/magic-wormhole/issues/301

piegamesde commented 2 years ago

Update: The BIP word list translations sadly kind of died off. In any case, translating word lists is really hard and probably not worth it. I instead found https://www.eff.org/deeplinks/2016/07/new-wordlists-random-passphrases, which includes a really great one: 10.3 bits/word, three letter prefix uniqueness (the only one from the diceware category). If we stick to words, this would be it.

On the other hand, the non-word codes still sound quite appealing to me. Hex is out because it is strictly inferior, but base 36 (aka alphanumeric) looks promising:

d442
06yw
vsyt
i6uw
cgrh
irei
a2oc
gn8f
65he
5gve

Generally, I'd like to aim for at least 20 bits entropy by default. This significantly reduces the probability of an attacker guessing the password, while allowing us to reuse a code up to 16 times (e.g. for send-many) without losing security compared to before.

Also, I'd like to point out that emojis are a thing: https://spec.matrix.org/latest/client-server-api/#sas-method-emoji This must obviously be optional (especially as we cannot easily build plain text fallback), but every emoji from that list gives us 6 bits of entropy, so we'd only need 3-4 for a password.