8

I've read a few articles about cryptography in .net, which leads me to the following question, what is the difference between a keyed hash and a non-keyed hash?

1 Answer 1

11

A non-keyed hash produces an output that depends only on the input data. If it is cryptographically secure, then there are no ways known that are faster than bruteforce to find:

  • An input that hashes to a particular output;
  • Two inputs that hash to the same output.

A keyed hash produces an output that depends both on the input data, and a key. If it is cryptographically secure, then it satisfies the above properties of a non-keyed hash, and in addition:

  • There are no known ways faster than bruteforce to find the key used, given a set of input and output pairs produced with that key;
  • There are no known ways better than random chance to find the correct output for any input under a particular key, without knowledge of the key.
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.