<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki1463/index.php?action=history&amp;feed=atom&amp;title=Hash_collision</id>
	<title>Hash collision - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki1463/index.php?action=history&amp;feed=atom&amp;title=Hash_collision"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki1463/index.php?title=Hash_collision&amp;action=history"/>
	<updated>2026-12-04T02:47:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.3</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki1463/index.php?title=Hash_collision&amp;diff=30222&amp;oldid=prev</id>
		<title>imported&gt;Dimawik: /* */ ce</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki1463/index.php?title=Hash_collision&amp;diff=30222&amp;oldid=prev"/>
		<updated>2026-07-19T17:49:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;: &lt;/span&gt; ce&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Hash function phenomenon}}&lt;br /&gt;
[[File:Hash table 4 1 1 0 0 1 0 LL.svg|thumb|254x254px|John Smith and Sandra Dee share the same hash value of 02, causing a hash collision.]]&lt;br /&gt;
In [[computer science]], a &amp;#039;&amp;#039;&amp;#039;hash collision&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;hash clash&amp;#039;&amp;#039;&amp;#039;&amp;lt;ref&amp;gt;{{Citation|last=Thomas|first=Cormen|title=Introduction to Algorithms |date=2009|pages=253|publisher=MIT Press|isbn=978-0-262-03384-8}}&amp;lt;/ref&amp;gt;  is when two distinct pieces of data in a [[hash table]] share the same hash value. The hash value in this case is derived from a [[hash function]] which takes a data input and returns a fixed length of bits.&amp;lt;ref&amp;gt;{{Citation|last=Stapko|first=Timothy|chapter=Embedded Security|date=2008|chapter-url=http://dx.doi.org/10.1016/b978-075068215-2.50006-9|title=Practical Embedded Security|pages=83–114|publisher=Elsevier|doi=10.1016/b978-075068215-2.50006-9|isbn=9780750682152|access-date=2021-12-08|chapter-url-access=subscription}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hash is typically used as a [[many-to-one]] function, with the number of potential inputs (size of [[Domain of a function|input domain]]) much larger that the number of potential output values (&amp;quot;range&amp;quot;), making collisions inevitable (&amp;quot;[[pigeonhole principle]]&amp;quot;). For the [[cryptographic hash functions]] (CHFs), the output is a compact representative of particular input value used by [[data integrity]] algorithms to operate efficiently using this representative in place of the much larger input data.{{sfn|Menezes|van Oorschot|Vanstone|1997|p=321}} A collision violates the assumptions of  integrity algorithms, so CHFs are designed to make finding a practical collision [[computationally infeasible]] (so-called [[collision resistance]]).{{sfn|Menezes|van Oorschot|Vanstone|1997|p=321}}&lt;br /&gt;
&lt;br /&gt;
The typical uses of [[non-cryptographic hash functions]] (NCHFs) – like [[bloom filter]]s, [[hash table]]s, [[count sketch]]es – are less sensitive to collisions, so NCHFs require just the [[Discrete uniform distribution|uniform distribution]] and [[Avalanche effect|avalanche]] properties.{{sfn|Sateesan|Biesmans|Claesen|Vliegen|2023|p=2}} Still, collision resistance is an additional feature that is useful against [[hash flooding]] attacks; simple NCHFs, like the [[cyclic redundancy check]] (CRC), have essentially no collision resistance{{sfn|Stamp|2011}} and thus cannot be used with an input open to manipulation by an attacker. Non-cryptographic applications employ multiple ways of handling the hash collisions when they occur.&lt;br /&gt;
&lt;br /&gt;
== Background ==&lt;br /&gt;
Hash collisions can be unavoidable depending on the number of objects in a set and whether or not the bit string they are mapped to is long enough in length. When there is a set of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; objects, if &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is greater than &amp;lt;math&amp;gt;|R|&amp;lt;/math&amp;gt;, which in this case &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; is the set of the hash values, a hash collision is guaranteed to occur.&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;{{Cite book|date=2016|title=Cybersecurity and Applied Mathematics|url=http://dx.doi.org/10.1016/c2015-0-01807-x|doi=10.1016/c2015-0-01807-x|isbn=9780128044520}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Another reason hash collisions are likely at some point in time stems from the idea of the [[birthday problem|birthday paradox]] in mathematics. This problem looks at the probability of a set of two randomly chosen people having the same birthday out of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; number of people.&amp;lt;ref&amp;gt;{{Cite book|last=Soltanian |first=Mohammad Reza Khalifeh |url=http://worldcat.org/oclc/1162249290|title=Theoretical and Experimental Methods for Defending Against DDoS Attacks|date=10 November 2015|isbn=978-0-12-805399-7|oclc=1162249290}}&amp;lt;/ref&amp;gt; This idea has led to what has been called the [[birthday attack]]. The premise of this attack is that it is difficult to find a birthday that specifically matches your birthday or a specific birthday, but the probability of finding a set of &amp;#039;&amp;#039;any&amp;#039;&amp;#039; two people with matching birthdays increases the probability greatly. Bad actors can use this approach to make it simpler for them to find hash values that collide with any other hash value – rather than searching for a specific value.&amp;lt;ref&amp;gt;{{Citation|last1=Conrad|first1=Eric|chapter=Domain 3: Security Engineering (Engineering and Management of Security)|date=2016|chapter-url=http://dx.doi.org/10.1016/b978-0-12-802437-9.00004-7|title=CISSP Study Guide|pages=103–217|publisher=Elsevier|access-date=2021-12-08|last2=Misenar|first2=Seth|last3=Feldman|first3=Joshua|doi=10.1016/b978-0-12-802437-9.00004-7|isbn=9780128024379|chapter-url-access=subscription}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The impact of collisions depends on the application. When hash functions and fingerprints are used to identify similar data, such as [[homology (biology)|homologous]] [[DNA]] sequences or similar audio files, the functions are designed so as to &amp;#039;&amp;#039;maximize&amp;#039;&amp;#039; the probability of collision between distinct but similar data, using techniques like [[locality-sensitive hashing]].&amp;lt;ref name=&amp;quot;MOMD&amp;quot;&amp;gt;{{cite web|last1=Rajaraman|first1=A.|last2=Ullman|first2=J.|author2-link=Jeffrey Ullman|year=2010|title=Mining of Massive Datasets, Ch. 3.|url=http://infolab.stanford.edu/~ullman/mmds.html}}&amp;lt;/ref&amp;gt; [[Checksum]]s, on the other hand, are designed to minimize the probability of collisions between similar inputs, without regard for collisions between very different inputs.&amp;lt;ref name=&amp;quot;crypto&amp;quot;&amp;gt;{{Cite conference|last1=Al-Kuwari|first1=Saif|last2=Davenport|first2=James H.|last3=Bradford|first3=Russell J.|date=2011|title=Cryptographic Hash Functions: Recent Design Trends and Security Notions|url=https://eprint.iacr.org/2011/565|conference=Inscrypt &amp;#039;10}}&amp;lt;/ref&amp;gt; Instances where bad actors attempt to create or find hash collisions are known as [[Collision attack|collision attacks.]]&amp;lt;ref&amp;gt;{{Cite book|last=Schema|first=Mike|title=Hacking Web Apps|year=2012}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In practice, security-related applications use cryptographic hash algorithms, which are designed to be long enough for random matches to be unlikely, fast enough that they can be used anywhere, and safe enough that it would be extremely hard to find collisions.&amp;lt;ref name=&amp;quot;crypto&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Collision resolution ==&lt;br /&gt;
{{Main|Hash table#Collision resolution}}&lt;br /&gt;
&lt;br /&gt;
In hash tables, since hash collisions are inevitable, hash tables have mechanisms of dealing with them, known as collision resolutions. Two of the most  common strategies are [[open addressing]] and [[separate chaining]]. The cache-conscious collision resolution is another strategy that has been discussed in the past for string hash tables.&lt;br /&gt;
&lt;br /&gt;
[[File:HASHTB12.svg|thumb|275x275px|John Smith and Sandra Dee are both being directed to the same cell. Open addressing will cause the hash table to redirect Sandra Dee to another cell.]]&lt;br /&gt;
&lt;br /&gt;
=== Open addressing ===&lt;br /&gt;
{{main|Open addressing}}&lt;br /&gt;
&lt;br /&gt;
Cells in the hash table are assigned one of three states in this method – occupied, empty, or deleted. If a hash collision occurs, the table will be probed to move the record to an alternate cell that is stated as empty. There are different types of probing that take place when a hash collision happens and this method is implemented. Some types of probing are [[linear probing]], [[double hashing]], and [[quadratic probing]].&amp;lt;ref name=&amp;quot;:2&amp;quot;&amp;gt;{{Cite journal|last1=Nimbe|first1=Peter|last2=Ofori Frimpong|first2=Samuel |last3=Opoku |first3=Michael |date=2014-08-20 |title=An Efficient Strategy for Collision Resolution in Hash Tables|url=http://dx.doi.org/10.5120/17411-7990 |journal=International Journal of Computer Applications |volume=99|issue=10|pages=35–41|doi=10.5120/17411-7990 |bibcode=2014IJCA...99j..35N|issn=0975-8887|doi-access=free}}&amp;lt;/ref&amp;gt; Open Addressing is also known as closed hashing.&amp;lt;ref&amp;gt;{{cite web |title=Closed Hashing |work=CSC241 Data Structures and Algorithms |url=https://www.cs.wcupa.edu/rkline/ds/closed-hashing.html |access-date=2022-04-06 |first=Robert |last=Kline |publisher=West Chester University}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Separate chaining ===&lt;br /&gt;
{{further|Hash table#Separate chaining}}&lt;br /&gt;
&lt;br /&gt;
This strategy allows more than one record to be &amp;quot;chained&amp;quot; to the cells of a hash table. If two records are being directed to the same cell, both would go into that cell as a linked list. This efficiently prevents a hash collision from occurring since records with the same hash values can go into the same cell, but it has its disadvantages. Keeping track of so many lists is difficult and can cause whatever tool that is being used to become very slow.&amp;lt;ref name=&amp;quot;:2&amp;quot; /&amp;gt; Separate chaining is also known as open hashing.&amp;lt;ref&amp;gt;{{cite web |url=https://www.log2base2.com/algorithms/searching/open-hashing.html |title=Open hashing or separate chaining |work=Log{{sub|2}}2}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Cache-conscious collision resolution ===&lt;br /&gt;
&lt;br /&gt;
Although much less used than the previous two, {{harvp|Askitis|Zobel|2005}} has proposed the [[cache (computing)|cache]]-conscious collision resolution method in 2005.&amp;lt;ref&amp;gt;{{cite conference |conference=International Symposium on String Processing and Information Retrieval |last1=Askitis|first1=Nikolas |last2=Zobel |first2=Justin |title=Cache-Conscious Collision Resolution in String Hash Tables |date=2005 |work=String Processing and Information Retrieval SPIRE 2005 |pages=91–102 |place=Berlin, Heidelberg |publisher=Springer Berlin Heidelberg |series=Lecture Notes in Computer Science |volume=3772 |doi=10.1007/11575832_11| isbn=978-3-540-29740-6 |editor1-last=Consens |editor1-first=M. |editor2-last=Navarro |editor2-first=G.}}&amp;lt;/ref&amp;gt; It is a similar idea to the separate chaining methods, although it does not technically involve the chained lists. In this case, instead of chained lists, the hash values are represented in a contiguous list of items. This is better suited for string hash tables and the use for numeric values is still unknown.&amp;lt;ref name=&amp;quot;:2&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[List of hash functions]]&lt;br /&gt;
* {{Annotated link |Universal one-way hash function}}&lt;br /&gt;
* {{Annotated link |Cryptography}}&lt;br /&gt;
* {{Annotated link |Universal hashing}}&lt;br /&gt;
* {{Annotated link |Perfect hash function}}&lt;br /&gt;
* {{Annotated link |Injective map}}&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
== Sources ==&lt;br /&gt;
* {{cite book&lt;br /&gt;
 |last1=Menezes&lt;br /&gt;
 |first1=Alfred J.&lt;br /&gt;
 |last2=van Oorschot&lt;br /&gt;
 |first2=Paul C.&lt;br /&gt;
 |last3=Vanstone&lt;br /&gt;
 |first3=Scott A.&lt;br /&gt;
 |title=Handbook of Applied Cryptography&lt;br /&gt;
 |series=Discrete Mathematics and Its Applications&lt;br /&gt;
 |location=Boca Raton, Florida&lt;br /&gt;
 |publisher=CRC Press&lt;br /&gt;
 |year=1997&lt;br /&gt;
 |isbn=978-0-8493-8523-0&lt;br /&gt;
 |url=https://cacr.uwaterloo.ca/hac/&lt;br /&gt;
 |ref={{sfnref|Menezes|van Oorschot|Vanstone|1997}}&lt;br /&gt;
}}&lt;br /&gt;
* {{cite journal | last1 = Sateesan | first1 = Arish | last2 = Biesmans | first2 = Jelle | last3 = Claesen | first3 = Thomas | last4 = Vliegen | first4 = Jo | last5 = Mentens | first5 = Nele | title = Optimized algorithms and architectures for fast non-cryptographic hash functions in hardware | journal = Microprocessors and Microsystems | date = April 2023 | volume = 98 | article-number = 104782 | issn = 0141-9331 | doi = 10.1016/j.micpro.2023.104782 | pmid = | url =https://lirias.kuleuven.be/bitstream/20.500.12942/714306/2/fast_noncrypto_hashes_micpro.pdf }}&lt;br /&gt;
* {{cite book | first1 = Mark | last1 = Stamp | date = 8 November 2011 | title = Information Security: Principles and Practice | edition = 2 | publisher = John Wiley &amp;amp; Sons | pages = | isbn = 978-1-118-02796-7 | oclc = 1039294381 | chapter = Non-Cryptographic Hashes  | chapter-url = https://books.google.com/books?id=UW3SS9P9hdEC&amp;amp;pg=PT118}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
{{Cryptography navbox | hash}}&lt;br /&gt;
&lt;br /&gt;
{{DEFAULTSORT:Hash_Collision}}&lt;br /&gt;
[[Category:Hashing]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Dimawik</name></author>
	</entry>
</feed>