-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add base58check decoding to recovery iframe #18
Conversation
.nvmrc
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
// Assuming random bytes in our bundle and a bundle length of 33 (public key, compressed) + 48 (encrypted cred) = 81 bytes. | ||
// The odds of a byte being in the overlap set between base58 and base64url is 58/64=0.90625. | ||
// Which means the odds of a 81 bytes string being in the overlap character set for its entire length is... | ||
// ... 0.90625^81 = 0.0003444209703 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't completely wrap my brain around ss58 impl, but the test coverage looks good so I trust it!
Readability updates look great 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
This branch adds base58check decoding. For now I've left base64url decoding in place, but we should be able to get rid of it once we release base58check recovery codes.
The nice thing about recovery codes is that they auto-expire after 30mins. So as soon as we switch to base58check codes, clock starts ticking, and we're good to delete the awkward branching after just 30mins (although, practically we'll wait a few hours at least!)