Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

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?

share|improve this question

migrated from security.stackexchange.com Nov 14 '12 at 12:53

This question came from our site for Information security professionals.

1  
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. –  Paŭlo Ebermann Nov 14 '12 at 19:09
2  
Hash functions are not encryption. –  Stephen Touset Nov 14 '12 at 23:12
add comment

1 Answer 1

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?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.