Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does adding two hash values generate a valid hash?

Tags:

hash

Does adding 2 hash values generate another valid hash value? In other words will this hash(a) + hash(b) != hash(c) + hash(d) always be true? I don't think it will but does it matter? Are the essential properties of the hash function preserved under addition?

like image 533
sashang Avatar asked Dec 08 '25 22:12

sashang


1 Answers

Since several values can have the same hash, it could be that hash(a) = hash(b) = hash(c) = hash(d), so also hash(a) + hash(b) = hash(c) + hash(d).

like image 83
Bemmu Avatar answered Dec 12 '25 10:12

Bemmu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!