1

According to perldoc perlsec

Alternative Hash Functions The source code includes multiple hash algorithms to choose from. While we believe that the default perl hash is robust to attack, we have included the hash function Siphash as a fall-back option. At the time of release of Perl 5.18.0 Siphash is believed to be of cryptographic strength. This is not the default as it is much slower than the default hash.

What is the default perl hash function? From the context we can infer it's not SIPHASH?

Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
  • Tangentially related, some old comparisons: https://github.com/rurban/perl-hash-stats https://github.com/rurban/smhasher – daxim Aug 14 '19 at 07:51
  • At the time that was written, it was Jenkins one-at-a-time. That ceased to be the case as of Perl v5.28.0 – Jim Balter May 24 '20 at 23:21

1 Answers1

6

From the INSTALL file in the source,

Since Perl 5.18 we have included support for multiple hash functions, although from time to time we change which functions we support, and which function is default (currently SBOX+STADTX on 64 bit builds and SBOX+ZAPHOD32 for 32 bit builds).

You can see that default in the source code in hv_func.h. So it seems for 64 bit builds it's StadtX "fast hash function" which is implemented in stadtx_hash.h.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468