Lines Matching +full:sha +full:- +full:1

32  * SHA-256 and SHA-512/256 hashes, as specified in FIPS 180-4, available at:
35 * This is a very compact implementation of SHA-256 and SHA-512/256.
40 * The literal definitions according to FIPS180-4 would be:
49 #define ROTR(x, n) (((x) >> (n)) | ((x) << ((sizeof (x) * NBBY)-(n))))
51 /* SHA-224/256 operations */
57 /* SHA-384/512 operations */
60 #define SIGMA0_512(x) (ROTR((x), 1) ^ ROTR((x), 8) ^ ((x) >> 7))
63 /* SHA-256 round constants */
83 /* SHA-512 round constants */
134 W[t] = (cp[0] << 24) | (cp[1] << 16) | (cp[2] << 8) | cp[3]; in SHA256Transform()
138 W[t] = SIGMA1_256(W[t - 2]) + W[t - 7] + in SHA256Transform()
139 SIGMA0_256(W[t - 15]) + W[t - 16]; in SHA256Transform()
142 a = H[0]; b = H[1]; c = H[2]; d = H[3]; in SHA256Transform()
154 H[0] += a; H[1] += b; H[2] += c; H[3] += d; in SHA256Transform()
165 W[t] = ((uint64_t)cp[0] << 56) | ((uint64_t)cp[1] << 48) | in SHA512Transform()
172 W[t] = SIGMA1_512(W[t - 2]) + W[t - 7] + in SHA512Transform()
173 SIGMA0_512(W[t - 15]) + W[t - 16]; in SHA512Transform()
176 a = H[0]; b = H[1]; c = H[2]; d = H[3]; in SHA512Transform()
188 H[0] += a; H[1] += b; H[2] += c; H[3] += d; in SHA512Transform()
193 * Implements the SHA-224 and SHA-256 hash algos - to select between them
195 * in case of SHA-224.
205 for (i = 0; i < size - padsize; i += 64) in SHA256()
216 pad[padsize++] = (size << 3) >> (56 - 8 * i); in SHA256()
222 (uint64_t)H[0] << 32 | H[1], in SHA256()
229 * encode 64bit data in big-endian format.
237 output[j + 1] = (input[i] >> 48) & 0xff; in Encode64()
248 * Implements the SHA-384, SHA-512 and SHA-512/t hash algos - to select
261 for (i = 0; i < size - padsize; i += 128) in SHA512()
277 c64[1] = size << 3; in SHA512()
292 /* SHA-256 as per FIPS 180-4. */ in zio_checksum_SHA256()
304 /* SHA-512/256 as per FIPS 180-4. */ in zio_checksum_SHA512_native()
321 zcp->zc_word[0] = BSWAP_64(tmp.zc_word[0]); in zio_checksum_SHA512_byteswap()
322 zcp->zc_word[1] = BSWAP_64(tmp.zc_word[1]); in zio_checksum_SHA512_byteswap()
323 zcp->zc_word[2] = BSWAP_64(tmp.zc_word[2]); in zio_checksum_SHA512_byteswap()
324 zcp->zc_word[3] = BSWAP_64(tmp.zc_word[3]); in zio_checksum_SHA512_byteswap()