Unkeyed hash functions are, by definition, hash functions computed without a key. SHA-1 is an example. MDCs (message digest codes) are a subclass of unkeyed hash functions. How are unkeyed hash functions secure, when the message is encrypted with a known, open hash function and without a key?
-
1$\begingroup$ Welcome to cryptography Stack Exchange. Your question was migrated here, because it is mainly about the theoretical parts of cryptography, not the application thereof (which would be on topic on Security Stack Exchange). Please register your account on both sites (using the same mail address) to take ownership of your question again, be able to edit, comment and accept an answer. $\endgroup$– Paŭlo EbermannCommented Nov 14, 2012 at 19:09
-
2$\begingroup$ Hash functions are not encryption. $\endgroup$– Stephen TousetCommented Nov 14, 2012 at 23:12
1 Answer
Your question is ill-posed; to determine whether they provide "security", we need a specification of what you mean by security.
So I'll answer about just one potential use of hash functions:
Are you thinking about using hashing together with encryption to try to protect the integrity of the message against tampering? If so, generally speaking, unkeyed hash functions do not provide security against tampering with the message. You should not use them for message authentication or integrity protection.
(Some people used to recommend appending an unkeyed hash of the message to the end of the message, and then encrypting, in hopes that this would prevent tampering with the message. They called the hash function a "MDC". We now understand that this construction is not secure. Therefore, you should not use this approach.)
Instead, you should use either authenticated encryption or use a message authentication code (MAC). Both constructs are keyed functions.
If this is not what you were asking -- or even if it was -- you need to revise your question to clarify what you mean by "security". Security against what threats?