Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve the randomness of the tokens, slightly #111

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Conversation

mcg1969
Copy link
Collaborator

@mcg1969 mcg1969 commented Nov 26, 2024

Our tokens are currently 22 characters long. The reason for this is because a base64-encoding of 128 random bits, or 16 random bytes, consumes 22 characters. But in fact, going the other way, 22 characters can actually hold 16.5 bytes, or 132 random bits. So we're not really making the absolute most of the space we're consuming.

Does this matter? Nah. 16 bytes of randomness is plenty. There are really no security implications. But I think this has a mild benefit of helping reassure our users that we're trying to do our level best to ensure randomness, and therefore anonymity.

@mcg1969 mcg1969 requested a review from jezdez November 26, 2024 17:16
@mcg1969 mcg1969 merged commit 40ea9cc into main Nov 26, 2024
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants