Lines Matching +full:0 +full:- +full:7 +full:a +full:- +full:e
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * SHA-256, as specified in
4 * http://csrc.nist.gov/groups/STM/cavp/documents/shs/sha256-384-512.pdf
6 * SHA-256 code by Jean-Luc Cooke <jlcooke@certainkey.com>.
8 * Copyright (c) Jean-Luc Cooke <jlcooke@certainkey.com>
21 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
22 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
23 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
24 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
25 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
26 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
27 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
28 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
29 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
30 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
31 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
32 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
33 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
34 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
35 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
36 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2,
51 #define s0(x) (ror32(x, 7) ^ ror32(x, 18) ^ (x >> 3))
61 W[I] = s1(W[I-2]) + W[I-7] + s0(W[I-15]) + W[I-16]; in BLEND_OP()
64 #define SHA256_ROUND(i, a, b, c, d, e, f, g, h) do { \ argument
66 t1 = h + e1(e) + Ch(e, f, g) + SHA256_K[i] + W[i]; \
67 t2 = e0(a) + Maj(a, b, c); \
70 } while (0)
74 u32 a, b, c, d, e, f, g, h; in sha256_transform() local
78 for (i = 0; i < 16; i += 8) { in sha256_transform()
79 LOAD_OP(i + 0, W, input); in sha256_transform()
86 LOAD_OP(i + 7, W, input); in sha256_transform()
91 BLEND_OP(i + 0, W); in sha256_transform()
98 BLEND_OP(i + 7, W); in sha256_transform()
102 a = state[0]; b = state[1]; c = state[2]; d = state[3]; in sha256_transform()
103 e = state[4]; f = state[5]; g = state[6]; h = state[7]; in sha256_transform()
106 for (i = 0; i < 64; i += 8) { in sha256_transform()
107 SHA256_ROUND(i + 0, a, b, c, d, e, f, g, h); in sha256_transform()
108 SHA256_ROUND(i + 1, h, a, b, c, d, e, f, g); in sha256_transform()
109 SHA256_ROUND(i + 2, g, h, a, b, c, d, e, f); in sha256_transform()
110 SHA256_ROUND(i + 3, f, g, h, a, b, c, d, e); in sha256_transform()
111 SHA256_ROUND(i + 4, e, f, g, h, a, b, c, d); in sha256_transform()
112 SHA256_ROUND(i + 5, d, e, f, g, h, a, b, c); in sha256_transform()
113 SHA256_ROUND(i + 6, c, d, e, f, g, h, a, b); in sha256_transform()
114 SHA256_ROUND(i + 7, b, c, d, e, f, g, h, a); in sha256_transform()
117 state[0] += a; state[1] += b; state[2] += c; state[3] += d; in sha256_transform()
118 state[4] += e; state[5] += f; state[6] += g; state[7] += h; in sha256_transform()
127 sha256_transform(sctx->state, input, W); in sha256_transform_blocks()
129 } while (--blocks); in sha256_transform_blocks()
168 MODULE_DESCRIPTION("SHA-256 Algorithm");