Bug 542547 - RFE: please add "hash-type" prefix to *sum utilities
Summary: RFE: please add "hash-type" prefix to *sum utilities
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-11-30 05:20 UTC by Dmitry Bolkhovityanov
Modified: 2012-08-29 15:26 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-29 15:26:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dmitry Bolkhovityanov 2009-11-30 05:20:46 UTC
Description of problem:
All of /usr/bin/*sum utilities produce very similar output consisting of a long number of hex-digits, so that later one can't instantly understand what type of hash it is.
It was acceptable in the old md5sum-only days, but now it causes much confusion. For example, see bug #515715.
Of course, one can count the number of digits, but a) that's weird; b) different algorythms can use equal hash length.

The problem would be eliminated if *sum utils could prefix hashes with "type-tag", similarly to what is done in /etc/shadow.  For example, "sha1:..." or "sha1/...".
(And that is THE RIGHT THING -- data of unknown type is bad, so http introduced "Content-type:" header, PGP includes "Hash:" prefix, etc.  With current diversity of hash types, that becomes the barest necessity for *sum utils too...)

Of course, for compatibility reasons, that have to be switched on explicitly -- e.g., with "-l" (Label). And besides adding such tags, *sum have to understand such prefixes, but that's trivial.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Kamil Dudka 2009-11-30 18:45:07 UTC
Thanks for filling the bug! I can see the same issue has been raised at upstream mailing-list already. Let's give them some time for reply. We can then update this bug accordingly.

Comment 2 Kamil Dudka 2009-12-01 11:55:32 UTC
Corresponding thread at upstream mailing-list:

http://lists.gnu.org/archive/html/bug-coreutils/2009-11/msg00341.html

Comment 3 Ondrej Oprala 2012-08-29 15:26:34 UTC
This enhancement request has now been resolved upstream and is mentioned here: http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=c9f4c323220f51a42e3da8ea79f9ddcedab041b9


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