For SHA-256, FIPS 180-4 states the following on the constants:

These words represent the first thirty-two bits of the fractional parts of the cube roots of the first sixty-four prime numbers.

If one were to change some small number of those constants, say $n \leq 8$, to suitably "random" values, would this significantly weaken the cryptographic strength of SHA-256? The intent is simply to use a "non-standard" version of SHA-256.

  • $\begingroup$ Round constants can be maliciously chosen, changing a few of them could substantially weaken the hash if you know what you are doing $\endgroup$ Commented Oct 27, 2017 at 0:52
  • $\begingroup$ If you merely want yo create a non-standard, you'ld probably be better off changing the IVs with values from a CSPRNG than fiddling with the round constants. $\endgroup$
    – e-sushi
    Commented Oct 27, 2017 at 5:24

1 Answer 1


Those are "nothing up my sleeve" numbers, their values aren't central to the security of the algorithm. Nevertheless an intent to arbitrarily choose different and thus incompatible values probably means something else you're doing is a bad idea.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.