3

I was not able to find an explicit statement about the first and second preimage security of SipHash-2-4 or SipHash-4-8 anywhere.

I think it should be 64 bits, but I'd feel safer if somebody who has more experience with such hash functions could confirm this?

PS: I am aware that 64 bits can be broken, but I only need short term protection and I want to keep my packets small.

otus
  • 32,462
  • 5
  • 75
  • 167
Chris
  • 1,029
  • 7
  • 17

1 Answers1

4

SipHash is a MAC (aka Pseudo Random Function Family) with 64-bit output and 128-bit key, rather than a hash (aka random public member of a Pseudo Random Function Family). It is explicitly designed to be used with a secret random key. Quoting Jean-Philippe Aumasson and Daniel J. Bernstein's SipHash: a fast short-input PRF (in proceedings of Indocrypt 2012):

the standard PRF and MAC security goals allow the attacker access to the output of SipHash on messages chosen adaptively by the attacker. However, they do not allow access to any "leaked" information such as bits of the key or the internal state. They also do not allow "related keys", "known keys", "chosen keys", etc.

Thus you are without endorsement of the creators if using SipHash as a hash function and expecting 64-bit second preimage resistance when the key has gone public (as you would legitimately for a 64-bit hash function).

This does not answer the question of if preimage resistance of that SipHash-turned-hash can be broken much better than by brute force (expected $2^{64}$ evaluations of SipHash, which is not much); I simply do not know, and find it nontrivial to make an opinion other than: uncertain.

fgrieu
  • 149,326
  • 13
  • 324
  • 622