develooper Front page | perl.perl5.changes | Postings from June 2020

[Perl/perl5] 9e9d02: hv_func.h: add support for chaskey_hash

From:
Yves Orton
Date:
June 20, 2020 21:56
Subject:
[Perl/perl5] 9e9d02: hv_func.h: add support for chaskey_hash
Message ID:
Perl/perl5/push/refs/heads/smoke-me/siphash13_chaskey/740e6c-84cbab@github.com
  Branch: refs/heads/smoke-me/siphash13_chaskey
  Home:   https://github.com/Perl/perl5
  Commit: 9e9d02749219c8978ec709546b8d564036ae04fa
      https://github.com/Perl/perl5/commit/9e9d02749219c8978ec709546b8d564036ae04fa
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2020-06-20 (Sat, 20 Jun 2020)

  Changed paths:
    M MANIFEST
    A chaskey_hash.h
    M hv_func.h

  Log Message:
  -----------
  hv_func.h: add support for chaskey_hash

This is a high quality 32 bit hash based on Siphash. https://mouha.be/chaskey/


  Commit: 84cbab08c95115b390d702d935e5e259165a33c7
      https://github.com/Perl/perl5/commit/84cbab08c95115b390d702d935e5e259165a33c7
  Author: Yves Orton <demerphq@gmail.com>
  Date:   2020-06-20 (Sat, 20 Jun 2020)

  Changed paths:
    M INSTALL
    M MANIFEST
    M hv_func.h
    M sbox32_hash.h
    R stadtx_hash.h
    R zaphod32_hash.h

  Log Message:
  -----------
  hv_func.h: remove stadtx and zaphod hash

I would prefer not to carry the weight of the Perl hash function
on my shoulder. It is too much responsibility, and there are other
hash functions available that are known to more secure and still
relatively fast. So we shall use them instead.

The new default for 64 bit builds will be Siphash 1-3 (SIPHASH13),
for 32 bit builds it will be Chaskey. https://mouha.be/chaskey/

We should document what to do to add a new hash function so people
can easily use their own.

One problem we have is that since the hash function is a macro
XS modules must be recompiled if we change the hash function and
they use any hashing functions. :-( I really wish we could change
the hash function and not have to do that.


Compare: https://github.com/Perl/perl5/compare/740e6c4912dd...84cbab08c951



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About