Questions tagged [hash-collision]

a situation that occurs when two distinct pieces of data have the same hash value, checksum, fingerprint, or cryptographic digest.

See also the wiki tag.

233 questions
0
votes
0 answers

MD5 SSL Collision Attack

I want to create fake certificate for test purposes. I have read about the http://marc-stevens.nl/p/hashclash/index.php project but I am unable to understand the two files that I have to put as input in order to create the collision attack. I have…
0
votes
3 answers

Image caching strategy

The Scenario I am building a web application where reports can be generated on the fly (based on information retrieved from an SQL database). These reports will contain charts, which can also be generated on the fly. Because these charts contain…
quantumSoup
  • 27,197
  • 9
  • 43
  • 57
0
votes
1 answer

Hash Table With Coalesced Hashing

I am trying to figure out how to convert an add method of a hash table class implemented with quadratic probing as a collision solution method to use coalesced hashing instead. I know that it has something to do with linked lists however because I…
user4780686
0
votes
0 answers

Cannot compute collision and compare times in Hash search

there. I am trying to get collision and compare times in Hash search. Yet it doesn't work out. Can anyone point out what the problem is? Thanks very much. Here is my code. HashSerch.cpp #include #include #include using…
user4938730
  • 31
  • 1
  • 3
0
votes
0 answers

Get all collisions in HashMap in Java

Is there any way to get a list of all the collisions which occurred after inserting a number of elements into a HashMap/HashTable/HashSet? For example: <1, 3> collided with <4, 2>, <4, 5> collided with <57, 6> ...
Michael
  • 791
  • 2
  • 12
  • 32
0
votes
1 answer

how do i find collision for a simple hash algorithm

I have the following hash algorithm: unsigned long specialNum=0x4E67C6A7; unsigned int ch; char inputVal[]=" AAPB2GXG"; for(int i=0;i
0
votes
2 answers

Hashing algorithm to use for generating unique ids?

I have objects with the following properties: class MyObject { int sourceId(); String id(); } If I use id as the identifier, there could be collisions as there may be records with the same id but different sourceId Therefore I'm looking…
Ali
  • 261,656
  • 265
  • 575
  • 769
0
votes
3 answers

How to generate a collision with a hash-string-to-int method?

I'm in the process of integrating a hash method (farmhash) to our software base. The hashing services seem to work appropriately. Basically, it turns a string of characters into an unique-ish integer value. I've added an infrastructure to detect…
Vaillancourt
  • 1,380
  • 1
  • 11
  • 42
0
votes
1 answer

Reducing size of hash

If I have some data I hash with SHA256 like this :- hash=SHA256(data) And then copy only the first 8 bytes of the hash instead of the whole 32 bytes, how easy is it to find a hash collision with different data? Is it 2^64 or 2^32 ? If I need to…
Harry
  • 221
  • 3
  • 8
0
votes
3 answers

How does search works in hashing when items are stored as linked list by chaining?

One way to deal the collision in hash tables is by chaining. Chaining store the collided items in a link list. But when a user search with a key how does hash table identify the item?
rgaut
  • 3,159
  • 5
  • 25
  • 29
0
votes
0 answers

How does Map handles index collision?

I'm trying to create a collection that maps a certain Type to my Vector2i type in this fashion: Collection I'm translating a project I had previously in C# to Haxe. In C# I only had to implement an interface in Vector2i to be able…
MouseCaneta
  • 135
  • 1
  • 8
0
votes
2 answers

java hashMap collision

I'm sorry if this question was already asked, but i don't fine an answer to my question. I'm working on HashMap i put two values (7,"value test 1") (7,"value test 2) According to the specification java API HashMap put the first values is replaced by…
asko
  • 45
  • 4
0
votes
1 answer

Hash Tables: why doesn't this code resolve collisions?

This insert function doesn't seem to insert correctly and overwrites previous entries. Also the duplicate check doesn't work as intended and only works half the time. HT::HT(const unsigned& tblSize) { //Hash table size equal to size passed or…
Scholar
  • 293
  • 3
  • 8
  • 16
0
votes
0 answers

Creating a unique 8 character string from a sequential integer

I need to generate a unique 8 character string from a sequential integer (0, 1, 2, 3, etc). I tried hashing the int with md5/sha256/sha512 and then shortening it to 8 characters but there are quite a lot of collisions which I want to try and avoid…
Ryan
  • 957
  • 5
  • 16
  • 34
0
votes
1 answer

How to compute for collisions on this hash function?

I made a simple hash function (if it can be called one) that converts a string into a double. It works by taking the value of the first character and casting it to double, then multiplying it with the cosine of the next character, then multiplied…
DarkPotatoKing
  • 499
  • 2
  • 9
  • 17