Tag Info

Accepted

What exactly (and precisely) is "hash?"

The Wikipedia article on hash functions is very good, but I will here give my take. What is a hash? "Hash" is really a broad term with different formal meanings in different contexts. There ...
• 4,129

Do passwords need a max length?

No. There is no* limit on the length of the input to for most* good cryptographic hash functions. As a result, password hashing can support passwords of unlimited length and do not need to impose a ...
• 161k

What exactly (and precisely) is "hash?"

A hash function is a function that takes an input and produces a value of fixed size. For example you might have a hash function stringHash that accepts a ...
• 301

Do passwords need a max length?

Yes, passwords need maximum length, but not because of collision risk (see other answers regarding collisions). Reason for setting maximum length - possibility of denial of service attack. Someone ...

Do passwords need a max length?

As hashes are fixed length, does that mean that even if not specified when creating the password, all login systems would need to have some sort of maximum input length (although probably very high)? ...
• 191
Accepted

Two-way Hash Functions

Yes, this is possible. Here are two examples of such a function. One function is $f(x)=x$. This has no collisions, and the function is easy to invert. Here is another function: define $f(x) = x$ ...
• 161k
Accepted

Hash functions and pathological data sets

An easy way to visualize this is to imagine a hash table of size $n$ (implemented with chaining) that contains all of the elements of $U$ (even though this is unrealistic in practice because $U$ ...
• 3,724
Accepted

Understanding hashtable performance in the worst-case

The load factor denotes the average expected length of a chain, therefore it is interesting for an average case analysis, not the worst case analysis. That's why on average you expect needing constant ...

• 3,724

Hash function to hash 6-digit positive integers

A hash table usually uses two different things: One, a hash function that maps an item to a hash code (with the requirement that equal items are mapped to equal hash codes), and two, a function that ...
• 30.5k
Accepted

Lemma 2 in Knuth's "Notes on Open Addressing"

I think that the notes have been reported incorrectly. Indeed CruiskeenLawn, you are right. I've found some very old notes here which report the correct result. Indeed, in your copy, they simply ...
• 460