Linked Questions

68 votes
2 answers
25k views

Is truncating a SHA512 hash to the first 160 bits as secure as using SHA1?

I am from a web development background (I don't know an awful lot about cryptography or how the algorithms themselves work), so I am asking this question in simple terms. Consider a hash of the word '...
BadHorsie's user avatar
  • 813
9 votes
1 answer
18k views

Avalanche effect in DES

I couldn't understand the avalanche effect in DES. Could someone explain how avalanche effect happens in DES
user5507's user avatar
  • 1,913
19 votes
1 answer
21k views

How does a birthday attack on a hashing algorithm work?

A "normal", brute-force attack on a cryptographic hashing algorithm $H$ should have a complexity of about $2^{n}$ for a hash algorithm with an output length of $n$ bits. That means it takes about $2^{...
lxgr's user avatar
  • 1,788
3 votes
1 answer
5k views

Hash functions and the Avalanche effect

Informally, the Avalanche effect says that two similar, but not identical, inputs should produce radically different outputs when fed through a hash function. I've seen, at least, two formal ...
Fredrik Savje's user avatar
0 votes
1 answer
2k views

Use partial hash to verify entire hash

I've had an idea about storing parts of SHA256 hashes and I'd like to find out how secure it is, or how much less secure it is than storing the entire hash. For example, users can share this list of ...
Francis's user avatar
  • 11
1 vote
1 answer
191 views

Is this SHA-256 modification still valid?

We typically model a hash function (in particular $\mathrm{SHA}$-$256$) as a function $H:\{0,1\}^{2^{64}-1} \to \{0,1\}^{256}$ with some special properties that makes them useful in practice. In this ...
Bean Guy's user avatar
  • 732
0 votes
1 answer
307 views

Compressing SHA256 to be a viable database id?

Don't know a lot about cryptography, so need some help on this. I would like to use a SHA256 string as a unique id in my database for users, but scaling that would be difficult. Is it possible to ...
0a6c42bb1c2f8058's user avatar
0 votes
0 answers
487 views

What kind of attack would a 128 bit SHA-2 be vulnerable to and why?

With SHA-2 for hashing, using only the first 128 bits to create a 128 bit hash, what kind of attack would this be vulnerable to and why? Since 128 bit encryption keys are secure, shouldn't a 128 bit ...
Brooney's user avatar
  • 27
1 vote
1 answer
146 views

Use of HKDF to get shorter key than digest size

Is OK to derive a key using HKDF (Extract & expand) with a shorter size than the digest size of the configured hash function? In that case the result is computed (on the expand part) by truncating ...
carce-bo's user avatar
  • 195
2 votes
0 answers
128 views

OAEP Hash function truncation

I am using OAEP in a project and I want the resulting number of bits (n) to be 288 bits. Most of the implementations online seem to be for 1024 bits and using SHA-256 and I was wondering if truncating ...
Toncu Vlad's user avatar