1
$\begingroup$

I am looking for a cryptographic hash function that I can configure for HMAC. The input that I will hash is around 50 bytes. The function must be fast, and computationally lightweight.

$\endgroup$
  • 1
    $\begingroup$ I would not use HMAC for short input, since it has at least one block of overhead. $\endgroup$ – CodesInChaos Oct 17 '18 at 18:24
  • $\begingroup$ Is your key fixed (i.e. can you pre-compute the state of the hash function after consuming the key)? What security properties to you require? What output size to do you need? What CPU are you using? $\endgroup$ – CodesInChaos Oct 17 '18 at 18:25
  • $\begingroup$ @CodesInChaos I will use programmable hardware. Up to 64 bytes solutions are okay for output. I do not need more. I can make use of shorter than 64 byte outputs as well. I do not understand your question about the fixed key. Can you please collaborate on this? $\endgroup$ – Ninja Bug Oct 17 '18 at 18:53
  • $\begingroup$ Many hash function need time to process the key. So if you can cache the output of that step, it becomes much cheaper. $\endgroup$ – CodesInChaos Oct 17 '18 at 18:57
  • 1
    $\begingroup$ What security properties do you need / what are you using it for? $\endgroup$ – CodesInChaos Oct 17 '18 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.