Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change hash function values in round table

Tags:

security

hash

sha

Let's say I want to use SHA512 as my hashing function for whatever reason. Let's assume that I also have it's source code.

SHA512 contains constant table of rounds. What if I change few values (5 for example) here and there in this table?

How will this affect hashing function reliability and "resistance" to attacks (it's no longer standard algorithm and attacker might not know that round values have been changed)?

like image 280
Mithras Avatar asked Sep 25 '26 02:09

Mithras


1 Answers

The round constants in SHA512 were chosen at random. (More accurately, they are the fractional parts of the cube roots of the first 64 prime numbers -- this method was used as a way of showing that the numbers did not conceal a vulnerability; the specific method is not critical to the security proof.)

Unless you choose really degenerate values, like zero, changing them should have no impact on the security of the algorithm.


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!