3

Where can I find OpenSSL implementation of improved sha1 hashing based on 64 bit instruction set. It is an alternative implementation of this. I tried to find it in my /usr/inclusde and /usr/lib/ but could not get it. It seems it is an add-on to OpenSSL (openssl-addons/intel-accel/) but does not come with OpenSSL package. Also how to use it in place of OpenSSL 's usual SHA-1?

jww
  • 97,681
  • 90
  • 411
  • 885
polapts
  • 5,493
  • 10
  • 37
  • 49
  • You might be interested in [Noloader | SHA-Intrinsics](https://github.com/noloader/SHA-Intrinsics) GitHub. The GitHub provides an intriniscs based implementation using SHA instructions that works on BSD, Linux, OS X and Windows. – jww Jul 07 '18 at 13:10
  • If you are trying to incorporate only the assembly language routine for SHA-1, then take a look at [Cryptogams | AES](https://wiki.openssl.org/index.php/Cryptogams_AES) on the OpenSSL wiki. Also see [How the assembly file is generated from the perl script in OpenSSL](https://stackoverflow.com/q/46322246/608639) on Stack Overflow. Both show you how to use the assembly language routine as stand-alone without the OpenSSL dependency. – jww Jul 07 '18 at 13:12

1 Answers1

3

The SSE3-optimized version of SHA-1 is already part of OpenSSL 1.0.1, no need for add-ons. Just make sure that you compile it with assembler routines (not generic C).

Just for your reference: the optimized implementation of SHA-1 is in files crypto/sha/asm/sha1-586.pl and crypto/sha/asm/sha1-x86_64.pl in the openssl 1.0.1 tarball.

vond
  • 1,908
  • 17
  • 17