Given a 256-bit 's' and a 512-bit 'chunk', then 's' becomes the value of the SHA-256 compression function ("added" to the original 's' value). * * Precondition: uint32_t s[8]; * unsigned char chunk[64] */
| 148 | * unsigned char chunk[64] |
| 149 | */ |
| 150 | static void sha256_compression_uchar(uint32_t* s, const unsigned char* chunk) { |
| 151 | simplicity_sha256_compression(s, (const uint32_t[16]) |
| 152 | { ReadBE32(chunk + 4*0) |
| 153 | , ReadBE32(chunk + 4*1) |
| 154 | , ReadBE32(chunk + 4*2) |
| 155 | , ReadBE32(chunk + 4*3) |
| 156 | , ReadBE32(chunk + 4*4) |
| 157 | , ReadBE32(chunk + 4*5) |
| 158 | , ReadBE32(chunk + 4*6) |
| 159 | , ReadBE32(chunk + 4*7) |
| 160 | , ReadBE32(chunk + 4*8) |
| 161 | , ReadBE32(chunk + 4*9) |
| 162 | , ReadBE32(chunk + 4*10) |
| 163 | , ReadBE32(chunk + 4*11) |
| 164 | , ReadBE32(chunk + 4*12) |
| 165 | , ReadBE32(chunk + 4*13) |
| 166 | , ReadBE32(chunk + 4*14) |
| 167 | , ReadBE32(chunk + 4*15) |
| 168 | }); |
| 169 | } |
| 170 | |
| 171 | /* This next section implements a (typical) byte-oriented interface to SHA-256 that consumes the 8 least significant bits of |
| 172 | * an 'unsigned char' in big endian order. |
no test coverage detected