Lines Matching +full:sha +full:- +full:256
1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Common values for SHA-2 algorithms
76 sctx->state[0] = SHA224_H0; in sha224_block_init()
77 sctx->state[1] = SHA224_H1; in sha224_block_init()
78 sctx->state[2] = SHA224_H2; in sha224_block_init()
79 sctx->state[3] = SHA224_H3; in sha224_block_init()
80 sctx->state[4] = SHA224_H4; in sha224_block_init()
81 sctx->state[5] = SHA224_H5; in sha224_block_init()
82 sctx->state[6] = SHA224_H6; in sha224_block_init()
83 sctx->state[7] = SHA224_H7; in sha224_block_init()
84 sctx->count = 0; in sha224_block_init()
89 sctx->state[0] = SHA256_H0; in sha256_block_init()
90 sctx->state[1] = SHA256_H1; in sha256_block_init()
91 sctx->state[2] = SHA256_H2; in sha256_block_init()
92 sctx->state[3] = SHA256_H3; in sha256_block_init()
93 sctx->state[4] = SHA256_H4; in sha256_block_init()
94 sctx->state[5] = SHA256_H5; in sha256_block_init()
95 sctx->state[6] = SHA256_H6; in sha256_block_init()
96 sctx->state[7] = SHA256_H7; in sha256_block_init()
97 sctx->count = 0; in sha256_block_init()
117 /* State for the SHA-256 (and SHA-224) compression function */
123 * Context structure, shared by SHA-224 and SHA-256. The sha224_ctx and
125 * doesn't allow mixing the SHA-224 and SHA-256 functions arbitrarily.
135 * HMAC key and message context structs, shared by HMAC-SHA224 and HMAC-SHA256.
151 * struct sha224_ctx - Context for hashing a message with SHA-224
159 * sha224_init() - Initialize a SHA-224 context for a new message
169 * sha224_update() - Update a SHA-224 context with message data
181 __sha256_update(&ctx->ctx, data, len); in sha224_update()
185 * sha224_final() - Finish computing a SHA-224 message digest
187 * @out: (output) the resulting SHA-224 message digest
196 * sha224() - Compute SHA-224 message digest in one shot
199 * @out: (output) the resulting SHA-224 message digest
206 * struct hmac_sha224_key - Prepared key for HMAC-SHA224
214 * struct hmac_sha224_ctx - Context for computing HMAC-SHA224 of a message
222 * hmac_sha224_preparekey() - Prepare a key for HMAC-SHA224
224 * @raw_key: the raw HMAC-SHA224 key
236 * hmac_sha224_init() - Initialize an HMAC-SHA224 context for a new message
247 __hmac_sha256_init(&ctx->ctx, &key->key); in hmac_sha224_init()
251 * hmac_sha224_init_usingrawkey() - Initialize an HMAC-SHA224 context for a new
254 * @raw_key: the raw HMAC-SHA224 key
266 * hmac_sha224_update() - Update an HMAC-SHA224 context with message data
278 __sha256_update(&ctx->ctx.sha_ctx, data, data_len); in hmac_sha224_update()
282 * hmac_sha224_final() - Finish computing an HMAC-SHA224 value
284 * @out: (output) the resulting HMAC-SHA224 value
293 * hmac_sha224() - Compute HMAC-SHA224 in one shot, using a prepared key
297 * @out: (output) the resulting HMAC-SHA224 value
307 * hmac_sha224_usingrawkey() - Compute HMAC-SHA224 in one shot, using a raw key
308 * @raw_key: the raw HMAC-SHA224 key
312 * @out: (output) the resulting HMAC-SHA224 value
324 * struct sha256_ctx - Context for hashing a message with SHA-256
332 * sha256_init() - Initialize a SHA-256 context for a new message
342 * sha256_update() - Update a SHA-256 context with message data
354 __sha256_update(&ctx->ctx, data, len); in sha256_update()
358 * sha256_final() - Finish computing a SHA-256 message digest
360 * @out: (output) the resulting SHA-256 message digest
369 * sha256() - Compute SHA-256 message digest in one shot
372 * @out: (output) the resulting SHA-256 message digest
379 * struct hmac_sha256_key - Prepared key for HMAC-SHA256
387 * struct hmac_sha256_ctx - Context for computing HMAC-SHA256 of a message
395 * hmac_sha256_preparekey() - Prepare a key for HMAC-SHA256
397 * @raw_key: the raw HMAC-SHA256 key
409 * hmac_sha256_init() - Initialize an HMAC-SHA256 context for a new message
420 __hmac_sha256_init(&ctx->ctx, &key->key); in hmac_sha256_init()
424 * hmac_sha256_init_usingrawkey() - Initialize an HMAC-SHA256 context for a new
427 * @raw_key: the raw HMAC-SHA256 key
439 * hmac_sha256_update() - Update an HMAC-SHA256 context with message data
451 __sha256_update(&ctx->ctx.sha_ctx, data, data_len); in hmac_sha256_update()
455 * hmac_sha256_final() - Finish computing an HMAC-SHA256 value
457 * @out: (output) the resulting HMAC-SHA256 value
466 * hmac_sha256() - Compute HMAC-SHA256 in one shot, using a prepared key
470 * @out: (output) the resulting HMAC-SHA256 value
480 * hmac_sha256_usingrawkey() - Compute HMAC-SHA256 in one shot, using a raw key
481 * @raw_key: the raw HMAC-SHA256 key
485 * @out: (output) the resulting HMAC-SHA256 value
496 /* State for the SHA-512 (and SHA-384) compression function */
502 * Context structure, shared by SHA-384 and SHA-512. The sha384_ctx and
504 * doesn't allow mixing the SHA-384 and SHA-512 functions arbitrarily.
515 * HMAC key and message context structs, shared by HMAC-SHA384 and HMAC-SHA512.
531 * struct sha384_ctx - Context for hashing a message with SHA-384
539 * sha384_init() - Initialize a SHA-384 context for a new message
549 * sha384_update() - Update a SHA-384 context with message data
561 __sha512_update(&ctx->ctx, data, len); in sha384_update()
565 * sha384_final() - Finish computing a SHA-384 message digest
567 * @out: (output) the resulting SHA-384 message digest
576 * sha384() - Compute SHA-384 message digest in one shot
579 * @out: (output) the resulting SHA-384 message digest
586 * struct hmac_sha384_key - Prepared key for HMAC-SHA384
594 * struct hmac_sha384_ctx - Context for computing HMAC-SHA384 of a message
602 * hmac_sha384_preparekey() - Prepare a key for HMAC-SHA384
604 * @raw_key: the raw HMAC-SHA384 key
616 * hmac_sha384_init() - Initialize an HMAC-SHA384 context for a new message
627 __hmac_sha512_init(&ctx->ctx, &key->key); in hmac_sha384_init()
631 * hmac_sha384_init_usingrawkey() - Initialize an HMAC-SHA384 context for a new
634 * @raw_key: the raw HMAC-SHA384 key
646 * hmac_sha384_update() - Update an HMAC-SHA384 context with message data
658 __sha512_update(&ctx->ctx.sha_ctx, data, data_len); in hmac_sha384_update()
662 * hmac_sha384_final() - Finish computing an HMAC-SHA384 value
664 * @out: (output) the resulting HMAC-SHA384 value
673 * hmac_sha384() - Compute HMAC-SHA384 in one shot, using a prepared key
677 * @out: (output) the resulting HMAC-SHA384 value
687 * hmac_sha384_usingrawkey() - Compute HMAC-SHA384 in one shot, using a raw key
688 * @raw_key: the raw HMAC-SHA384 key
692 * @out: (output) the resulting HMAC-SHA384 value
704 * struct sha512_ctx - Context for hashing a message with SHA-512
712 * sha512_init() - Initialize a SHA-512 context for a new message
722 * sha512_update() - Update a SHA-512 context with message data
734 __sha512_update(&ctx->ctx, data, len); in sha512_update()
738 * sha512_final() - Finish computing a SHA-512 message digest
740 * @out: (output) the resulting SHA-512 message digest
749 * sha512() - Compute SHA-512 message digest in one shot
752 * @out: (output) the resulting SHA-512 message digest
759 * struct hmac_sha512_key - Prepared key for HMAC-SHA512
767 * struct hmac_sha512_ctx - Context for computing HMAC-SHA512 of a message
775 * hmac_sha512_preparekey() - Prepare a key for HMAC-SHA512
777 * @raw_key: the raw HMAC-SHA512 key
789 * hmac_sha512_init() - Initialize an HMAC-SHA512 context for a new message
800 __hmac_sha512_init(&ctx->ctx, &key->key); in hmac_sha512_init()
804 * hmac_sha512_init_usingrawkey() - Initialize an HMAC-SHA512 context for a new
807 * @raw_key: the raw HMAC-SHA512 key
819 * hmac_sha512_update() - Update an HMAC-SHA512 context with message data
831 __sha512_update(&ctx->ctx.sha_ctx, data, data_len); in hmac_sha512_update()
835 * hmac_sha512_final() - Finish computing an HMAC-SHA512 value
837 * @out: (output) the resulting HMAC-SHA512 value
846 * hmac_sha512() - Compute HMAC-SHA512 in one shot, using a prepared key
850 * @out: (output) the resulting HMAC-SHA512 value
860 * hmac_sha512_usingrawkey() - Compute HMAC-SHA512 in one shot, using a raw key
861 * @raw_key: the raw HMAC-SHA512 key
865 * @out: (output) the resulting HMAC-SHA512 value