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.

  • 1
    I would not use HMAC for short input, since it has at least one block of overhead. – CodesInChaos Oct 17 at 18:24
  • 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? – CodesInChaos Oct 17 at 18:25
  • @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? – Ninja Bug Oct 17 at 18:53
  • Many hash function need time to process the key. So if you can cache the output of that step, it becomes much cheaper. – CodesInChaos Oct 17 at 18:57
  • 1
    What security properties do you need / what are you using it for? – CodesInChaos Oct 17 at 19:08

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.