Slashdot Mirror


Skein Hash... In Bash

First time accepted submitter Matt16060936 writes "...Last night (err.. 3am this morning) I finished an implementation of the Skein 512-512 hash algorithm (version 1.3). I'm a fan of Skein and hope it wins the SHA-3 competition next year. One of the nice things about Skein is how quickly it's been adopted by many platforms and implemented in many languages. To that end, I present Skein 512-512 implemented in Bash."

6 of 90 comments (clear)

  1. Ah, Bash by jeffmeden · · Score: 4, Insightful

    The cause of, and solution to, all of life's problems. Here's to Bash! If it weren't for you, I would be a terrible sysadmin. Thanks to you, I am a terrible sysadmin!

    1. Re:Ah, Bash by Anonymous Coward · · Score: 4, Funny

      Don't bash bash.

  2. Hmmm by Anonymous Coward · · Score: 2, Insightful

    Amazing how code is always produced in the middle of the night...

    1. Re:Hmmm by Noughmad · · Score: 2

      This applies to much more than just code. I thinks it's mostly because of lack of distractions, but there's also the "I'll just finish this and go to bed" mentality.

      http://www.phdcomics.com/comics/archive.php?comicid=1219

      --
      PlusFive Slashdot reader for Android. Can post comments.
  3. Re:Optimized for 64-bit processors by butlerm · · Score: 2

    A slightly slower than usual hash algorithm is not likely to be noticeable on a modern client, even a handheld device.

    All else equal, a 64 bit algorithm should get roughly twice the amount of work done per operation as a comparable 32 bit algorithm, so the performance overhead on 32 bit architectures isn't nearly as bad as it looks. Ten to twenty percent maybe.

    And if you are really concerned about performance, you write an implementation in assembly language.

  4. Re:Optimized for 64-bit processors by butlerm · · Score: 3, Informative

    On the slowest 32 bit processor tested (32 bit, ARM v4, 75 Mhz), NIST benchmarked Skein using portable C code at just under 1 megabyte / sec. That is about twice as slow as SHA-2 on the same processor, and certainly slow enough that you might notice in the case you mention. On modern 64 bit processor (Intel Q6600, x86_64, 2.4 Ghz), more like 286 MB / sec for Skein, about twice as fast as SHA-2. See here (pdf).

    The striking difference between 32 bit and 64 bit implementations is much more than I would have guessed, but that may be merely a matter of optimization. For now it looks like a good excuse to use SHA-1 or SHA-2 when doing the sort of thing you describe on slow processors. For something like SSL or IPSEC, you aren't likely to notice the difference, because the bandwidth to a typical mobile device just isn't that high.