Bug 1250113 - coreutils doesn't include a base32 binary
Summary: coreutils doesn't include a base32 binary
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-04 14:30 UTC by Nikos Mavrogiannopoulos
Modified: 2016-05-11 16:09 UTC (History)
6 users (show)

Fixed In Version: coreutils-8.25-2.fc24
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-11 16:09:29 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
base32 program (10.68 KB, patch)
2015-08-05 08:46 UTC, Nikos Mavrogiannopoulos
no flags Details | Diff
base32 program (10.68 KB, patch)
2015-08-05 09:25 UTC, Nikos Mavrogiannopoulos
no flags Details | Diff

Description Nikos Mavrogiannopoulos 2015-08-04 14:30:06 UTC
Description of problem:
coreutils includes a base64 encoder, but no base32 (or base16). The base32 encoding is very useful for converting OTP keys to a format programs like freeotp accept, and is becoming very popular for URL encoding of data.

All the encodings are described in rfc4648.

Additional info:
Please include a base32 convertor in fedora.

Comment 1 Pádraig Brady 2015-08-04 15:30:53 UTC
Maybe. Please discuss upstream at coreutils though.

See also related discussion at:
http://lists.gnu.org/archive/html/bug-coreutils/2010-04/msg00195.html

Note for URL encoding, base64 is almost perfect and could be tweaked like:

  b64_url_encode() { base64 | tr '+/=' '-_.'; }
  b64_url_decode() { tr -- '-_.' '+/=' | base64 -d; }

Comment 2 Nikos Mavrogiannopoulos 2015-08-04 15:54:16 UTC
I would expect the maintainers of coreutils to talk upstream. I could help if required.

Comment 3 Ondrej Vasik 2015-08-04 20:42:38 UTC
Nikos, for Fedora, it is better if you will discuss this RFE upstream, as you will likely better defend it. And there are many todo tasks... so with patch chances are even higher. Without your proposal upstream and/or patch, I can only put this to the long term todo list.

btw. Pádraig Brady is one of Fedora co-maintainers and upstream (nowadays primary) maintainer.

Comment 4 Nikos Mavrogiannopoulos 2015-08-05 08:46:12 UTC
Created attachment 1059379 [details]
base32 program

This patch adds the base32 program. The need for such a program is because base32 is increasingly used in URLs and QR codes and we have no simple tool to generate such codes. In particular I noticed there were no command line tools to generate otpauth codes as in:
https://github.com/google/google-authenticator/wiki/Key-Uri-Format

Comment 6 Nikos Mavrogiannopoulos 2015-08-05 09:25:58 UTC
Created attachment 1059388 [details]
base32 program

Comment 7 Pádraig Brady 2015-08-05 10:03:47 UTC
Please implement like sha1sum. I.E. reuse base64.c. See src/local.mk for details. Then please post to coreutils. Thanks.

Comment 9 Ondrej Vasik 2015-08-05 13:12:55 UTC
Thanks Pádraig and Nikos!

Comment 10 Pádraig Brady 2015-09-01 15:05:37 UTC
Upstream proposal:
http://lists.gnu.org/archive/html/coreutils/2015-09/msg00000.html

Comment 12 Kamil Dudka 2016-05-11 16:09:29 UTC
This seems to be already fixed since coreutils-8.25-2.fc24.


Note You need to log in before you can comment on or make changes to this bug.