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
2
votes
0 answers

md5 collision how is it possible?

i don't understand how one can create a rough Certificate just by making a MD5 collision. Even if you were able to find another string whose hash matches the original how would you sign it ? You do not have access to the Certificate authority's…
user574183
  • 710
  • 1
  • 10
  • 22
2
votes
1 answer

Understanding Hash Tables with python as a reference

I am going through online lectures on data structures and I want to confirm my understanding of the hash table. I understand that a hash table will use a hashing function to reduce the universe of all possible keys down to a set m and use chaining…
Sam Hammamy
  • 10,819
  • 10
  • 56
  • 94
2
votes
1 answer

Collision probability on MD5 for 15 character alpha numeric strings

I am generating 15 character alpha numeric codes and saving them as a MD5 hash for protection. However I cannot have non unique or colliding hashes and if they occur I do not insert them. Since I have a large number of codes that I will be inserting…
FBP
  • 345
  • 3
  • 15
2
votes
1 answer

How to retrieve values from hashtable after resolving collision using linear probing?

I am trying to implement a hash program in go, I did insertion and resolved collisions using linear probing. When I'm trying to retrieve values back, i'm getting different values as I used linear probing to fix collisions. This is my program :…
codinggirl
  • 159
  • 1
  • 3
  • 8
2
votes
3 answers

Inserting twice the same key in a HashTable, how is that possible?

I am trying to understand how works the key sorting / insertion check in a hashtable. I've understood that when I'm adding an object to a hashtable, it checks at runtime that there isn't the same key already entered in there. In my test, I've 2…
Goul
  • 21
  • 1
  • 2
2
votes
4 answers

How many students can you put into a hash table before a collision occurs?

My professor gave us this slide while explaining Hash Collision probabilities: When I looked up the probabilities of two people having the same birthday in the "Birthday Paradox", I found on Wikipedia and other sources that the probability at n=10…
xChaos
  • 41
  • 1
  • 2
2
votes
2 answers

Apache Commons Lang HashCodeBuilder collision

I am getting collision with using Apache Commons Lang HashCodeBuilder using release 3.4. I am hashing a Route object, which contains two Cell objects, start and end. At the end I am providing an example when collision occurs. Both classes override…
Jernej Jerin
  • 3,179
  • 9
  • 37
  • 53
2
votes
0 answers

Calculating partial hash collisions in openCl

I would like to find 2 SHA-256 hashes of 2 strings (both of which start with "helloworld" and then have a number of random ascii characters following) where the first n characters of the hashes match, with n being as large as possible. for…
2
votes
1 answer

Calculate original set size after hash collisions have occurred

You have an empty ice cube tray which has n little ice cube buckets, forming a natural hash space that's easy to visualize. Your friend has k pennies which he likes to put in ice cube trays. He uses a random number generator repeatedly to choose…
ʞɔıu
  • 47,148
  • 35
  • 106
  • 149
2
votes
0 answers

Hash Code of a Random Number

I have a random number sequence (say 6 bytes) I now want to generate a shorter sequence from the original sequence (say 3 bytes) What is the best way of acheiving this so that the randomness of the original sequence is preserved. Lets say I run a…
OneGuyInDc
  • 1,557
  • 2
  • 19
  • 50
2
votes
2 answers

How do I implement an erase function for a hash table?

I have a hash table using linear probing. I've been given the task to write an erase(int key) function with the following guidelines. void erase(int key); Preconditions: key >= 0 Postconditions: If a record with the specified key exists in the…
StartingGroovy
  • 2,802
  • 9
  • 47
  • 66
2
votes
1 answer

How to handle hash collisions?

I am developing a game where every thing in the game world is represented by an global unique identifier. Those ids each measure 64 bits and are generated by hashing together the time of creation, the machines network address and a random number.…
danijar
  • 32,406
  • 45
  • 166
  • 297
2
votes
1 answer

Using N first bits of a hash function to have an N-bit hash

I need a cryptographically secure hash function which would have similar properties that MD5 had, namely: 128-bit size and being fast. Since MD5 itself is quite broken nowadays, I'd like to use another hash. SHA1 is actually faster than MD5 these…
dragonroot
  • 5,653
  • 3
  • 38
  • 63
2
votes
1 answer

Reversing hash, Finding collision (XOR with sums and left/right shifts)

A ^ ( (A >> 2) + (A << 5) + C ) == B How to find A if B is const and C is variable? (C can be changed if there is no solution with it) A is DWORD, B is DWORD, C is BYTE != 0 Edit1: after GalacticJello's answer, I've got another question: is there…
RIscRIpt
  • 163
  • 3
  • 12
2
votes
3 answers

Collision Checking in Hashing

I am having some understanding problem with Hashing concept as follows: Suppose, I have implemented hash table(1-D array, say A[100]) having keys as numbers. I have one simple hash function H(Key) % Table_Size, which will return target index into…