How to avoid weak passcodes and PINs when using physical dice

Obviously I should reroll if I get something like 1234 or 0000, but are there other cases where I should reroll?

I keep getting people asking why not just use the first result. I’m going to answer up here now. The reason you may not want to use the first result is if it’s something an attacker would be likely to guess, like 123456 or 111111, due to how many people lazily pick these. These are a very small minority of all passcodes (see this reply), so you lose almost no entropy by excluding them. Meanwhile, if you roll something like 123456 and stick with it, you’re much more vulnerable to said attacker. 123456, 000000, and 121212 will always be weak passcodes, whether you get them by rolling dice or coming up with them yourself, because they’re commonly used and thus the things an attacker will try immediately.

This doesn’t mean you should reroll any time a sequence doesn’t feel random enough, like if it has a large number of repeating digits like 885722. The human brain is bad at judging randomness, and by default judges any coincidental pattern as less random. The only cases when you should reroll are cases where you accidentally get a sequence that incidentally happens to fit a very predictable pattern of someone not using any kind of random generation process, like the examples mentioned above.

If it ties to PII, like your birthday.

For a PIN, if you have to use one, try and use one number that repeats in there. That way if there’s a clear set of fingerprint dots on your screen that show the numbers, it’s harder to get right in a few tries. And yes, avoid use of PII. Other options are to look at the T9 telephone dial pad letters and base your PIN on a word, like the olds used to do. For example, blibly would be 254259. Makes it easier to remember.

A password is far better, and can be easy to set up if you think through how your keyboard works. Let’s say you need a capital letter, number, and special character. Your keyboard likely starts off with caps on when you go to enter text, so start your passcode with a capital letter, then a string of lower case letters, then however you get to numbers and special characters, do them in a group since they’ll be on the same screen, If you try and do something like !!PaSSc0DE1234 it will take forever because of the back and forth on the keyboard. If you use Pass12357!Code or something like a Nickname@12357 it will take far less time. If you set your phone to reset on brute force attempts, a longer passcode will make it functionally beyond reason to try and get in there without borking the device.

strongphrase.net cites this analysis, which says that ones in the form of 1212 or 1122 are also popular, and should also be avoided.

How is this true? There are 12 ways to arrange a 4-digit PIN with one repeating digit, and 24 ways to arrange a 4-digit pin with no repeating digits, so one with no repeating digits should be harder to guess.

Proof table
No repeating digit One repeating digit
1234 1123
1243 1132
1324 1213
1342 1231
1423 1312
1432 1321
2134 2113
2143 2131
2314 2311
2341 3112
2413 3121
2431 3211
3124
3142
3214
3241
3412
3421
4123
4132
4213
4231
4312
4321

You’re always going to get the most entropy for a number of digits by generating it randomly. I find a 6 or even 8-digit passcode easy enough to remember if I’m using it every time I unlock my phone.

Isn’t rerolling contra productive? At the end the attacker can cross out passcodes you rerolled, and you do not have true randomness.

The number of easy-to-guess passcodes is very small compared to the number of all possible passcodes. Excluding them is not a significant loss. Meanwhile, in the unlikely event you roll something like 0000, and you go with that rather than rerolling, you’re much more vulnerable to someone who’s going to try to brute force from a list of commonly used passcodes.

When looking at 4-digit PINs, if we consider a PIN bad if it fits into one of the following categories:

  • AAAA (1111, 2222, etc.), of which there are 10
  • ABAB (1212, 7373, etc.), of which there are 90
  • AABB, (3377, 9955, etc.), of which there are 90
  • An increasing or decreasing PIN, like 1234 or 8765, of which there are 12

then we get 10 + 90 + 90 + 12 = 202 weak PINs. There are 10^4 = 10,000 possible 4-digit PINs. So the bad ones make up 202/10,000 = 2.02% of all 4-digit PINs.

d6 or d10?

If its randmoly rolled, you will probably reduce the entropy by rerolling

d10

I’ve explained this already

You don’t want to go, “Yeah, I rolled 1234 as my PIN, but if I reroll for to a safer one, it isn’t truly random, so my PIN is 1234 now.”

10,000 PINs is equal to 13.288 bits of entropy. 10,000 PINs, minus the 202 defined bad ones equals 13.258 bits. The difference is vanishingly small.

To be serious, the security of the PIN comes from some degree of randomness, but additionally the length of the PIN (6 >> 4), not repeating PINs across surfaces, and from lockout mechanisms with PINs. I would suggest a 6 digit PIN.

This is true. Longer is better.

Did you mean services here?

What do you mean by this?

Yes, surface as a more general term.

I.e. For GrapheneOS, different profiles can have different PINs, reducing the ability that a single crack cracks all profiles.

I.e. you can enable wiping of data after 10 wrong attempts. This means a user gets 10 tries before failure, effectively capping the chances of randomly guessing. 10 / 2^6 isn’t that feasible. But that’s also up to you. Default iOS has exponential retry backoff as well afaik

Then why not just roll and use the first result?

If you roll a nat 10 do you score the best possible security? /s