sha* (with sha1pass and shasum): Sha-sha-sha

I mentioned md5sum a long, long time ago, and now I feel obligated to include the sha* suite. I think this might be where the free ride ends for checksum generators though. Here’s why:

2014-09-18-6m47421-sha256sum

That’s it, that’s basically all it does. Of course, it’s not like md5sum did much more. You can use this in much the same way as md5sum — checking file integrity where the publisher has a sum available to match, or as a fingerprinting utility where there was an intermediary in the transfer.

I wanted to point out that the sha* binaries are part of coreutils, but my Arch system has two other sha* programs: sha1pass, installed as part of syslinux, and shasum, which came with perl.

I can’t speak for either of those last programs, since I’m not sure what their original intent was. I have a feeling sha1pass works with passwords and encryption, while shasum appears to be a frontend for the sha* binaries. If you use sha* enough, shasum might be helpful.

But that’s why I said the gravy train might be pulling into the station for checksum generators: They have a very slim and specific function. And what I’ve seen of a few other checksum generators suggests that’s all they’re meant to do.:\

11 thoughts on “sha* (with sha1pass and shasum): Sha-sha-sha

    1. K.Mandla Post author

      It’s possible. I don’t recall coming across sha1pass in the past. On Arch it’s part of syslinux, but I don’t think I’ve used anything but grub outside of Arch, so I’d have to check if it’s in syslinux in other distros.

  1. thisnameisfalse

    You are right.

    shapass comes from Perl package:
    https://bbs.archlinux.org/viewtopic.php?pid=1176175
    that includes both perl functions and command line program:
    http://search.cpan.org/~mshelor/Digest-SHA-5.92/lib/Digest/SHA.pm

    In the other hand, syslinux can use ‘md5pass’ and ‘sha1pass’ scripts in order to get optional ofuscated passwords in config files. Cleartext passwords are dangerous.
    http://www.syslinux.org/wiki/index.php/Menu#MENU_PASSWD

    syslinux had a lot of use in “old days”, with linux distros living in the hard disk along Win95 and Win98 FAT partitions. It was also very used in the first Live CDs that booted as floppy emulation. But now you will see ISOLINUX in liveDVDs and Grub[12] in disk installations (well, i prefer LILO).

    There is a last bastion in syslinux usage: USB pendrives, for linux installations or live USB drives.

      1. thisnameisfalse

        Hi again,

        would you mind to show your disk layout (lsblk, blkid)? Do you have a reserved FAT partition for syslinux, or are you really using extlinux?

      2. K.Mandla Post author
        NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
        sda      8:0    0  55.9G  0 disk 
        ├─sda1   8:1    0  55.7G  0 part /
        └─sda2   8:2    0   251M  0 part [SWAP]

        😉

  2. thisnameisfalse

    Sorry, but according to your lsblk output, you don’t have FAT partitions. Is sda1 a LVM volume or similar?.

    what is the command line did you use to install syslinux in your system?

    1. K.Mandla Post author
      Disk /dev/sda: 55.9 GiB, 60011642880 bytes, 117210240 sectors
      Units: sectors of 1 * 512 = 512 bytes
      Sector size (logical/physical): 512 bytes / 512 bytes
      I/O size (minimum/optimal): 512 bytes / 512 bytes
      Disklabel type: dos
      Disk identifier: 0x00000000
      
      Device     Boot     Start       End   Sectors  Size Id Type
      /dev/sda1  *           63 116696159 116696097 55.7G 83 Linux
      /dev/sda2       116696160 117210239    514080  251M 82 Linux swap / Solaris

      The install procedure is in the link to the Arch wiki above.

      1. thisnameisfalse

        Sorry, i did not see the link to the Arch wiki.

        If you followed the procedure of the wiki, you did use the ‘syslinux-install_update’ script to install syslinux. The ‘syslinux-install_update’ script is Arch specific, and is not provided/supported by Syslinux upstream.

        If we study the script:
        https://projects.archlinux.org/svntogit/packages.git/tree/trunk/syslinux-install_update?h=packages/syslinux
        we can see that script indeed uses “extlinux” executable, and not “syslinux” executable. Why?: because with “syslinux” you would need a separate little FAT partition, only for the bootloader config files; but with “extlinux”, you can write bootloader config files direct to sda1 partition (/boot/syslinux/*).

        OK, very instructive post, thanks!

  3. Pingback: Bonus: A massive missive of omission | Inconsolation

Comments are closed.