Introduction
A hash algorithm is described as a technique that displays all the possible outcomes of an algorithm analysis in a given sequence. Another name for this algorithm is a hash function. In working out solutions for the hash functions, arbitrary strings are used. An output string known as the hash value is easy to compute from this scenario. In other terms, the hash value is a fingerprint for the messages in use for the algorithm. In each given hash function, there exists 2n different hash values which gives a probability of 2 – n to any given hash value. This explanation justifies why hash is a fingerprint to the message sent in the algorithm (Partow, 2011).
There are three different attacks on hash functions, which include:
The collision attack
The main objective of this attack is to target two messages that hash to the same value in the algorithm.
The pre-image attack
This deals with finding a particular message that hashes to a given value in the algorithm.
The 2nd preimage attack
This type of attack to hash functions deals with a particular message in order to find a different message, which hashes to the same value (Partow, 2011).
Origin
The use of hash algorithms commonly known as hash functions first came into light in the context of digital authentication in the use of password as a protection tool. These hash algorithm functions commonly known as one-way functions meaning that they were supposed to be pre-image resistant. Credit to these developments goes to Whitefield Diffie and Martin Hellman for being the first to define these one-way functions. They also indicated how to use a cryptosystem to create a secure hash function. In the year 1980, Davies Meyer and the Matyas-Meyer-Oseas developed the first concrete scheme but still had to incorporate the use of DES. This is simply because the encryption algorithm at the time did not provide adequate security. In the year 1988, a construction based on DES called the MDC-2 was developed. Due to this invent, a first dedicated hash function was developed by Ronald Rivest in the same year. The MD5 was the most widespread used hash function. In the year, 1993 saw the approval of the SHA hash function by the National Institute of Standards and Technology (Merkle, 1990).
Detailed description
For a message to be processed using a hash function it is usually padded before it can go through any process. The padding helps in splitting the message into blocks of equal size. The most common construction method that hash functions use is the Merkle-Damgard construction. The use of MD strengthening in the Merkle-Damgard construction makes it possible to prove that if the compression function is collision resistant then it is the same to the hash algorithm function.
Choosing the type of function to use in a hashing algorithm depends solely on the type of data and their probability distribution in the application in question. Several useful types of hashing algorithms functions that are important in the process are in existence. Hash functions or algorithms are pseudo random number generators. The analysis of the different hash algorithms is by using a probability distribution called Poisson distribution. The collision between the hash values in each of the elements in the groups is avoided by use of a perfect hash function. A function that gives minimal collision rate is the perfect hash function. Generalizing hash functions is not an easy task due to the permutations that exists in the data used in the analysis. Analysis of the hash functions is using two dimensions as described below (Stinson, 2002).
Distribution of data
This is used in calculations that deal with the distributions of values that are in use within the process of hash algorithm analysis. Analysis of the unique hash values needs the knowledge of how many collisions in the data set exists.
Efficiency of the Hash function
This calculates the production rate of the hash values in comparison to its efficiency rate within the set of available data. Analysis of hash function algorithms assumes the existence of a complexity of O (1) in this case data in a hash table tend to have average of O (1) complexity. Hash functions are theoretically the most applicable in cryptography since they are efficient and easy to use.
The use of hashing methodologies is applicable in creating hash values for the functions. Hash functions can be implemented using two methodologies, which are:
Additive hashing
In this methodology technique, there is the process of adding a selected value to the already existing value. This is done by traversing the algorithms to select the values to be increased. In doing the calculations, it involves multiplying the element value by a prime number.
Rotative hashing
This type of methodology is similar to additive hashing with the only major difference being in the arrangement of the hashing values. Increasing each value is of much importance since it is used to give the resulting final solution to the algorithm.
Hash functions has got several types which include among others like,
MD4
This hash function uses construction 1, rule 1 for padding with each message block having a total of 512 bits. The resulting output of the compression function is 128 bits.
MD5
This hash function takes message inputs as arbitrary lengths and has a return this is in the range of 128 bits and each message block contains 512 bits.
Primary uses
Hash functions or algorithms are applicable in a number of cryptographic contexts such as,
Used as digital signatures
This implementation is for a number of purposes like authenticity verification whereby the recipient of a signed message may be able to confirm whoever the sender claims to be. Another merit of using hash algorithms as digital signature is to prevent repudiation. This gives proof that the signer of a message is not able to deny about it (Damgard, 1989).
Commitment schemes
This is applicable in the case where two people have to make two different choices. This will require one to come up with a number of contexts, which requires one committing to given information prior to revealing the information (Damgard, 1989).
Password protection scheme
In verification of a password, there is the comparison of the hash entered and the one stored in the computer. If they are similar then the password is correct. The hash functions used here are pre-image resistant in that it should not be possible to compute the password from its hash.
Data integrity
Storage of a message for a long period needs mechanisms that can detect any alterations to the information stored. A computation of the hash of a message is done and the value is stored safely replacing the actual message. The hash function should be collision resistant such that even the originator of the message cannot play part in the forgery (Damgard, 1989).
Proof of work systems
This is an attempt to fight spams. This technique employs the use of email whereby the sender of an email must prove what amount of work he has performed while sending the email. Achieving this is through composing a given header for an email, which consists of the email address of the sender, date and a random number.
Future considerations
There is a belief that cryptographic analysis still has no much information that hash functions in making decisions. An example is of a car that breaks down and there is a choice of repair or buying a new car. If repairs are simple then it is advisable to go for it since it is as good as buying a new one. The same approach is practical when there is a need for a new hash function. There are properties that can be applicable in the strategies. The first strategy gives advantages to the repair strategy (Knuth, 1973).
- The prior knowledge of the weaknesses of the hash functions makes it easier to eliminate them.
- Extensive analysis performed on the broken hash functions hence some of the attacks are inappropriate.
- The available software implementations are simple and modifiable to yield the repaired version.
Among the demerits that associates this repair strategy are
- The repaired version may suffer the same predicaments of the broken hash functions.
- Intended fixing of the functions might trigger new weaknesses.
- Continued repair of the functions might bring about less efficient hash functions.
Summary
In summary, the following statements can sum up hash algorithm functions.
- The MD5 and SHA-1 types of hash functions are not for use in environments where collisions are a limiting factor.
- Intensive research on hash functions is vital. This is important since it helps in understanding what demerits are associated with the broken hash functions and helps in identifying a perfect criterion for each function.
- Preparation of a new proposal that takes into consideration the hash functions is vital since it introduces significant analysis of the algorithms.
- An agreement in the community at large should be on whether to regard the attacks on the Merkle-Damgard construction.
- Alternative developments on the algorithms or fixes to the Merkle-Damgard construction should be initiated.
- It is visible and it can be practical that a lot of work is needed in the cryptographic hash functions (Partow, 2011).
Conclusion
Hashing algorithms play an important role in the security of information in the world today. An output string known as the hash value is easy to compute from this scenario. The use of a hash algorithm is efficient in cryptography since all the information is encrypted thus making the process so efficient. Each information that is passed across from one person to another, there is the need to authenticate the validity of the sender and the message sent across. The threat of security breach is growing each day hence the need to continue improving the existing cryptographic functions that are in existence (Partow, 2011).
References
Damgard, I. (1989). A Design Principle for Hash Functions. In G. Brassard, editor, CRYPTO, volume 435 of Lecture Notes in Computer Science, pages 416–427. Springer.
Knuth, D. (1973). The Art of Computer Programming, volume 3, Sorting and Searching. pp. 506–542.
Merkle, R. (1990). A Fast Software One-Way Hash Function. Journal of Cryptology, 3(1):43–58.
Partow, A. (2011). General Purpose Hash Function Algorithms. Web.
Stinson, D. (2002). Cryptography: Theory and Practice. 2nd ed. Chapman & Hall/CRC.