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

proposal: encoding: add encoding/base58 #25522

Closed
FlorianUekermann opened this issue May 23, 2018 · 3 comments
Closed

proposal: encoding: add encoding/base58 #25522

FlorianUekermann opened this issue May 23, 2018 · 3 comments

Comments

@FlorianUekermann
Copy link
Contributor

Besides being wide spread in the cryptocurrency world, base58 is generally great for data humans interact with manually (url shorteners, password reset tokens etc).

https://en.m.wikipedia.org/wiki/Base58

@ALTree
Copy link
Member

ALTree commented May 23, 2018

Usual question: why has this to be in the standard library?

https://golang.org/doc/faq#x_in_std

@ALTree ALTree changed the title Add encoding/base58 encoding: add encoding/base58 May 23, 2018
@dsnet dsnet changed the title encoding: add encoding/base58 proposal: encoding: add encoding/base58 May 23, 2018
@gopherbot gopherbot added this to the Proposal milestone May 23, 2018
@FlorianUekermann
Copy link
Contributor Author

Usual question: why has this to be in the standard library?

Maybe it doesn't, I'm honestly not quite sure.

Pros:

  • Fits well with the existing base32 and base64 packages.
  • Useful for web programming and generally most usecases for base32
  • Unlikely to be maintenance burden
  • Used in security sensitive contexts, where it is nice to avoid third-party code.
  • Shorter than base32

Cons:

  • Not as commonly used as base32
  • There are a small number of variants, but maybe only one is necessary

In terms of usecases you could list everything base32 is used for. In my case it came up in a security sensitive package where we are hesitant to add third party dependencies for trivial code, so we would probably end up creating yet another base58 package otherwise (there are about 50 open source implementations already and probably a lot more closed source ones and package-private implementations).
I expect that this is a somewhat common scenario given that base58 is a good choice for codes and ids that are checked/typed/copied by users.

@bradfitz
Copy link
Contributor

Yeah, I don't think we want this in the standard library. The standard library is already arguably bigger than it needs to be, and if anything we'll be removing stuff from it (for Go 2).

It already exists outside the standard library, too: https://godoc.org/?q=base58

@golang golang locked and limited conversation to collaborators May 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants