Skip to content

Possibly avoid O's in the TOTP seed provided to the user #147

@forevermatt

Description

@forevermatt

Since the "shared secret" (aka. seed) that we provide (in case the user can't scan the QR code) is base32-encoded, it can contain any capital letter as well as the numbers 2 through 7.

Unfortunately, the capital letter O can be hard to distinguish from a zero, even when using fixed-width fonts. And since the seed string will never contain a zero, you won't get the benefit of seeing an O and a 0 next to each other in order to be able to tell the difference.

This is certainly an edge case, since most of the time people will be scanning a QR code. However, if it's not too much trouble, what if we simply avoided using any seed values that contain an O?

That would effectively reduce the number of possible values (assuming our seed is 16 characters long) from 32^16 down to 31^16, but that's still a very large number of possible seeds. With any kind of rate-limit protection at all, it seems like a negligible increase in the chances of an attacker compromising your TOTP by brute force.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions