||A Wikibookian suggests that Cryptography/Hash function be merged into this book or chapter.
Discuss whether or not this merger should happen on the discussion page.
A hash is the result of the application of a hash function (a very specific mathematical function or algorithm) that takes in some arbitrary value and produces a hash value, based on the given input.
Information security often includes situations where a user wants to transform one block of information into another block of information in such a way that the original block can not be recreated. It is also required that every time the input block is processed, it will produce the same output block. This means that the process is deterministic.
Such processes behave similar to a hash function and so are typically called cryptographic hashes. These hashes are used in serving authentication and integrity goals of cryptography. A cryptographic hash can be described as and has property that the hash function is one way. A given hash value can not feasibly be reversed to get a message that produces that hash value. I.e. There is no useful inverse hash function
This property can be formally expanded to provide the following properties of a secure hash:
- Preimage resistant : Given H it should be hard to find M such that H = hash(M).
- Second preimage resistant: Given an input m1, it should be hard to find another input, m2 (not equal to m1) such that hash(m1) = hash(m2).
- Collision-resistant: it should be hard to find two different messages m1 and m2 such that hash(m1) = hash(m2). Because of the birthday paradox this means the hash function must have a larger image than is required for preimage-resistance.