Lines Matching +full:one +full:- +full:shot

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
124 * sha256_ctx structs wrap this one so that the API has proper typing 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.
136 * The hmac_sha224_* and hmac_sha256_* structs wrap this one so that the API has
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 * sha256_finup_2x() - Compute two SHA-256 digests from a common initial
387 * @out1: (output) the first SHA-256 message digest
388 * @out2: (output) the second SHA-256 message digest
397 * sha256_finup_2x_is_optimized() - Check if sha256_finup_2x() is using a real
407 * struct hmac_sha256_key - Prepared key for HMAC-SHA256
415 * struct hmac_sha256_ctx - Context for computing HMAC-SHA256 of a message
423 * hmac_sha256_preparekey() - Prepare a key for HMAC-SHA256
425 * @raw_key: the raw HMAC-SHA256 key
437 * hmac_sha256_init() - Initialize an HMAC-SHA256 context for a new message
448 __hmac_sha256_init(&ctx->ctx, &key->key); in hmac_sha256_init()
452 * hmac_sha256_init_usingrawkey() - Initialize an HMAC-SHA256 context for a new
455 * @raw_key: the raw HMAC-SHA256 key
467 * hmac_sha256_update() - Update an HMAC-SHA256 context with message data
479 __sha256_update(&ctx->ctx.sha_ctx, data, data_len); in hmac_sha256_update()
483 * hmac_sha256_final() - Finish computing an HMAC-SHA256 value
485 * @out: (output) the resulting HMAC-SHA256 value
494 * hmac_sha256() - Compute HMAC-SHA256 in one shot, using a prepared key
498 * @out: (output) the resulting HMAC-SHA256 value
508 * hmac_sha256_usingrawkey() - Compute HMAC-SHA256 in one shot, using a raw key
509 * @raw_key: the raw HMAC-SHA256 key
513 * @out: (output) the resulting HMAC-SHA256 value
524 /* State for the SHA-512 (and SHA-384) compression function */
530 * Context structure, shared by SHA-384 and SHA-512. The sha384_ctx and
531 * sha512_ctx structs wrap this one so that the API has proper typing and
532 * doesn't allow mixing the SHA-384 and SHA-512 functions arbitrarily.
543 * HMAC key and message context structs, shared by HMAC-SHA384 and HMAC-SHA512.
544 * The hmac_sha384_* and hmac_sha512_* structs wrap this one so that the API has
559 * struct sha384_ctx - Context for hashing a message with SHA-384
567 * sha384_init() - Initialize a SHA-384 context for a new message
577 * sha384_update() - Update a SHA-384 context with message data
589 __sha512_update(&ctx->ctx, data, len); in sha384_update()
593 * sha384_final() - Finish computing a SHA-384 message digest
595 * @out: (output) the resulting SHA-384 message digest
604 * sha384() - Compute SHA-384 message digest in one shot
607 * @out: (output) the resulting SHA-384 message digest
614 * struct hmac_sha384_key - Prepared key for HMAC-SHA384
622 * struct hmac_sha384_ctx - Context for computing HMAC-SHA384 of a message
630 * hmac_sha384_preparekey() - Prepare a key for HMAC-SHA384
632 * @raw_key: the raw HMAC-SHA384 key
644 * hmac_sha384_init() - Initialize an HMAC-SHA384 context for a new message
655 __hmac_sha512_init(&ctx->ctx, &key->key); in hmac_sha384_init()
659 * hmac_sha384_init_usingrawkey() - Initialize an HMAC-SHA384 context for a new
662 * @raw_key: the raw HMAC-SHA384 key
674 * hmac_sha384_update() - Update an HMAC-SHA384 context with message data
686 __sha512_update(&ctx->ctx.sha_ctx, data, data_len); in hmac_sha384_update()
690 * hmac_sha384_final() - Finish computing an HMAC-SHA384 value
692 * @out: (output) the resulting HMAC-SHA384 value
701 * hmac_sha384() - Compute HMAC-SHA384 in one shot, using a prepared key
705 * @out: (output) the resulting HMAC-SHA384 value
715 * hmac_sha384_usingrawkey() - Compute HMAC-SHA384 in one shot, using a raw key
716 * @raw_key: the raw HMAC-SHA384 key
720 * @out: (output) the resulting HMAC-SHA384 value
732 * struct sha512_ctx - Context for hashing a message with SHA-512
740 * sha512_init() - Initialize a SHA-512 context for a new message
750 * sha512_update() - Update a SHA-512 context with message data
762 __sha512_update(&ctx->ctx, data, len); in sha512_update()
766 * sha512_final() - Finish computing a SHA-512 message digest
768 * @out: (output) the resulting SHA-512 message digest
777 * sha512() - Compute SHA-512 message digest in one shot
780 * @out: (output) the resulting SHA-512 message digest
787 * struct hmac_sha512_key - Prepared key for HMAC-SHA512
795 * struct hmac_sha512_ctx - Context for computing HMAC-SHA512 of a message
803 * hmac_sha512_preparekey() - Prepare a key for HMAC-SHA512
805 * @raw_key: the raw HMAC-SHA512 key
817 * hmac_sha512_init() - Initialize an HMAC-SHA512 context for a new message
828 __hmac_sha512_init(&ctx->ctx, &key->key); in hmac_sha512_init()
832 * hmac_sha512_init_usingrawkey() - Initialize an HMAC-SHA512 context for a new
835 * @raw_key: the raw HMAC-SHA512 key
847 * hmac_sha512_update() - Update an HMAC-SHA512 context with message data
859 __sha512_update(&ctx->ctx.sha_ctx, data, data_len); in hmac_sha512_update()
863 * hmac_sha512_final() - Finish computing an HMAC-SHA512 value
865 * @out: (output) the resulting HMAC-SHA512 value
874 * hmac_sha512() - Compute HMAC-SHA512 in one shot, using a prepared key
878 * @out: (output) the resulting HMAC-SHA512 value
888 * hmac_sha512_usingrawkey() - Compute HMAC-SHA512 in one shot, using a raw key
889 * @raw_key: the raw HMAC-SHA512 key
893 * @out: (output) the resulting HMAC-SHA512 value