sha

Drawbacks of reducing number of roots in SHA-256?


i currently implement SHA-256 in GO, i know that by standard we have to use roots of first 64 prime numbers, but i am curious how reducing this number can affect protection of an algorithms.

Right now i have implemented variation with 24 prime numbers. If we stay with all standards, the number of computations by brute force is equal to 2 in power of 256, will there be any drawbacks besides reduced number of computations?

var k = []uint32{
    0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
    0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
    0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
}

Solution

  • Lets take it point by point, from most obvious to less:

    Solution: