Вы находитесь на странице: 1из 1

Jessie Ramos BS IT UMP 5th year

Assignment

1. What is Hash collision? A collision or clash is a situation that occurs when two distinct pieces of data have the same hash value, checksum, fingerprint, or cryptographic digest. The impact of collisions depends on the application. When hash functions and fingerprints are used to identify similar data, such as homologous DNA sequences or similar audio files, the functions are designed so as to maximize the probability of collision between distinct but similar data. In most other applications, however, collisions of any kind are equally undesirable. Any collision in a hash table increases the average cost of lookup operations. When fingerprints are used to avoid unnecessary file storage or transfer, e.g. in a proxy server or backup system, a collision may cause incorrect operation and even permanent data loss. A successful collision attack on a cryptographic hash function may compromise the security of computer and communication systems. Therefore, much effort is devoted to the design of algorithms that minimize the occurrence of collisions for various applications. 2. What really happens during a hash collision include an image? While normally hashing a file hashes the individual bits of data of the file, image hashing works on a slightly higher level. The difference is that with image hashing, if two pictures look practically identical but are in a different format, or resolution (or there is minor corruption, perhaps due to compression) they should hash to the same number. Despite the actual bits of their data being totally different, if they look parctically identical to a human, they hash to the the same thing. 3. What are the ways and methods to resolve hash collision? Explain each.

Open addressing: The simplest way to resolve a collision is to start with the hash address and do a sequential search through the table for an empty location. The idea is to place the record in the next available position in the array. This method is called linear probing. An empty record is indicated by a special value called null. The major drawback of the linear probe method is clustering. Chaining: In this technique, instead of hashing function value as location we use it as an index into an array of pointers. Each pointer access a chain that holds the element having same location.

Вам также может понравиться