Lines Matching +full:sha3 +full:- +full:384
1 // SPDX-License-Identifier: GPL-2.0+
14 #include <crypto/sha3.h>
24 memset(sctx->state, 0, sizeof(sctx->state)); in sha3_512_init()
25 sctx->count = 0; in sha3_512_init()
26 sctx->func = CPACF_KIMD_SHA3_512; in sha3_512_init()
27 sctx->first_message_part = 1; in sha3_512_init()
37 octx->rsiz = sctx->count; in sha3_512_export()
38 octx->rsizw = sctx->count >> 32; in sha3_512_export()
40 memcpy(octx->st, sctx->state, sizeof(octx->st)); in sha3_512_export()
41 memcpy(octx->buf, sctx->buf, sizeof(octx->buf)); in sha3_512_export()
42 octx->partial = sctx->first_message_part; in sha3_512_export()
52 if (unlikely(ictx->rsizw)) in sha3_512_import()
53 return -ERANGE; in sha3_512_import()
54 sctx->count = ictx->rsiz; in sha3_512_import()
56 memcpy(sctx->state, ictx->st, sizeof(ictx->st)); in sha3_512_import()
57 memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf)); in sha3_512_import()
58 sctx->first_message_part = ictx->partial; in sha3_512_import()
59 sctx->func = CPACF_KIMD_SHA3_512; in sha3_512_import()
69 if (unlikely(ictx->rsizw)) in sha3_384_import()
70 return -ERANGE; in sha3_384_import()
71 sctx->count = ictx->rsiz; in sha3_384_import()
73 memcpy(sctx->state, ictx->st, sizeof(ictx->st)); in sha3_384_import()
74 memcpy(sctx->buf, ictx->buf, sizeof(ictx->buf)); in sha3_384_import()
75 sctx->first_message_part = ictx->partial; in sha3_384_import()
76 sctx->func = CPACF_KIMD_SHA3_384; in sha3_384_import()
91 .cra_name = "sha3-512",
92 .cra_driver_name = "sha3-512-s390",
99 MODULE_ALIAS_CRYPTO("sha3-512");
106 memset(sctx->state, 0, sizeof(sctx->state)); in sha3_384_init()
107 sctx->count = 0; in sha3_384_init()
108 sctx->func = CPACF_KIMD_SHA3_384; in sha3_384_init()
109 sctx->first_message_part = 1; in sha3_384_init()
124 .cra_name = "sha3-384",
125 .cra_driver_name = "sha3-384-s390",
133 MODULE_ALIAS_CRYPTO("sha3-384");
140 return -ENODEV; in init()
161 MODULE_DESCRIPTION("SHA3-512 and SHA3-384 Secure Hash Algorithm");