|
#define | _SHA256_UNROLL |
|
#define | _SHA256_UNROLL2 |
|
#define | a(i) T[(0 - (i)) & 7] |
|
#define | b(i) T[(1 - (i)) & 7] |
|
#define | blk0(i) (W[i] = data[i]) |
|
#define | blk2(i) (W[i & 15] += s1(W[(i - 2) & 15]) + W[(i - 7) & 15] + s0(W[(i - 15) & 15])) |
|
#define | c(i) T[(2 - (i)) & 7] |
|
#define | Ch(x, y, z) (z ^ (x & (y ^ z))) |
|
#define | d(i) T[(3 - (i)) & 7] |
|
#define | e(i) T[(4 - (i)) & 7] |
|
#define | f(i) T[(5 - (i)) & 7] |
|
#define | g(i) T[(6 - (i)) & 7] |
|
#define | h(i) T[(7 - (i)) & 7] |
|
#define | Maj(x, y, z) ((x & y) | (z & (x | y))) |
|
#define | R(a, b, c, d, e, f, g, h, i) |
|
#define | ROTL16(v, n) (U16V((uint16_t)(v) << (n)) | ((uint16_t)(v) >> (16 - (n)))) |
|
#define | ROTL32(v, n) (U32V((uint32_t)(v) << (n)) | ((uint32_t)(v) >> (32 - (n)))) |
|
#define | ROTL64(v, n) (U64V((uint64_t)(v) << (n)) | ((uint64_t)(v) >> (64 - (n)))) |
|
#define | ROTL8(v, n) (U8V((uint8_t)(v) << (n)) | ((uint8_t)(v) >> (8 - (n)))) |
|
#define | ROTR16(v, n) ROTL16(v, 16 - (n)) |
|
#define | ROTR32(v, n) ROTL32(v, 32 - (n)) |
|
#define | ROTR64(v, n) ROTL64(v, 64 - (n)) |
|
#define | ROTR8(v, n) ROTL8(v, 8 - (n)) |
|
#define | RX_8(i) |
|
#define | S0(x) (ROTR32(x, 2) ^ ROTR32(x, 13) ^ ROTR32(x, 22)) |
|
#define | s0(x) (ROTR32(x, 7) ^ ROTR32(x, 18) ^ (x >> 3)) |
|
#define | S1(x) (ROTR32(x, 6) ^ ROTR32(x, 11) ^ ROTR32(x, 25)) |
|
#define | s1(x) (ROTR32(x, 17) ^ ROTR32(x, 19) ^ (x >> 10)) |
|
#define | SHA256_DIGEST_SIZE 32 |
|
#define | U16V(v) ((uint16_t)(v)&0xFFFFU) |
|
#define | U32V(v) ((uint32_t)(v)&0xFFFFFFFFU) |
|
#define | U64V(v) ((uint64_t)(v)&0xFFFFFFFFFFFFFFFFU) |
|
#define | U8V(v) ((uint8_t)(v)&0xFFU) |
|