The round function scrambles the working words e and a with the two "big sigma" functions - each an XOR of three different rotations of the input. Today you build BigSigma0 and BigSigma1 and pin their exact outputs.
Build the two big sigma functions as XORs of three rotations each.
The big sigma functions (written with the uppercase Greek sigma in the
standard) are how SHA-256 diffuses the state words during compression. Each is
just an XOR of three rotations of its input by fixed amounts: BigSigma0 uses
2, 13, 22, and BigSigma1 uses 6, 11, 25. There is no shift here - big sigma
is pure rotation, which is what distinguishes it from the small sigma functions
you build next. Getting the three rotation amounts exactly right is the whole job.
These feed the round computation: BigSigma0 mixes the word a and BigSigma1
mixes the word e every round. Pin them against the real SHA-256 constants so you
know the rotations are correct before they get buried inside 64 rounds:
BigSigma0(0x6a09e667) (the first initial hash value) is 0xce20b47e, and
BigSigma1(0x510e527f) (the fifth) is 0x3587272b. A wrong rotation amount will
still produce a number here, so check against these exact values, not just that
it runs.
// three rotations XOR'd together - note these use ONLY ROTR, never SHRfunc BigSigma0(x uint32) uint32 {return ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22)}// BigSigma1 uses rotation amounts 6, 11, 25func BigSigma1(x uint32) uint32 { /* fill in */ return 0 }