Home
last modified time | relevance | path

Searched refs:dctx (Results 1 – 25 of 49) sorted by relevance

12

/linux-6.15/arch/mips/crypto/
H A Dpoly1305-glue.c27 dctx->buflen = 0; in poly1305_init_arch()
35 dctx->buflen = 0; in mips_poly1305_init()
36 dctx->rset = 0; in mips_poly1305_init()
50 dctx->rset = 1; in mips_poly1305_blocks()
78 memcpy(dctx->buf + dctx->buflen, src, bytes); in mips_poly1305_update()
84 mips_poly1305_blocks(dctx, dctx->buf, POLY1305_BLOCK_SIZE, 1); in mips_poly1305_update()
108 memcpy(dctx->buf + dctx->buflen, src, bytes); in poly1305_update_arch()
114 poly1305_blocks_mips(&dctx->h, dctx->buf, in poly1305_update_arch()
138 dctx->buf[dctx->buflen++] = 1; in poly1305_final_arch()
139 memset(dctx->buf + dctx->buflen, 0, in poly1305_final_arch()
[all …]
/linux-6.15/arch/arm64/crypto/
H A Dpoly1305-glue.c35 dctx->buflen = 0; in poly1305_init_arch()
43 dctx->buflen = 0; in neon_poly1305_init()
44 dctx->rset = 0; in neon_poly1305_init()
58 dctx->rset = 1; in neon_poly1305_blocks()
87 memcpy(dctx->buf + dctx->buflen, src, bytes); in neon_poly1305_do_update()
93 neon_poly1305_blocks(dctx, dctx->buf, in neon_poly1305_do_update()
131 memcpy(dctx->buf + dctx->buflen, src, bytes); in poly1305_update_arch()
173 dctx->buf[dctx->buflen++] = 1; in poly1305_final_arch()
174 memset(dctx->buf + dctx->buflen, 0, in poly1305_final_arch()
179 poly1305_emit(&dctx->h, dst, dctx->s); in poly1305_final_arch()
[all …]
H A Dpolyval-ce-glue.c96 memset(dctx, 0, sizeof(*dctx)); in polyval_arm64_init()
110 if (dctx->bytes) { in polyval_arm64_update()
111 n = min(srclen, dctx->bytes); in polyval_arm64_update()
112 pos = dctx->buffer + POLYVAL_BLOCK_SIZE - dctx->bytes; in polyval_arm64_update()
114 dctx->bytes -= n; in polyval_arm64_update()
120 if (!dctx->bytes) in polyval_arm64_update()
121 internal_polyval_mul(dctx->buffer, in polyval_arm64_update()
134 dctx->bytes = POLYVAL_BLOCK_SIZE - srclen; in polyval_arm64_update()
135 pos = dctx->buffer; in polyval_arm64_update()
148 if (dctx->bytes) { in polyval_arm64_final()
[all …]
/linux-6.15/arch/arm/crypto/
H A Dpoly1305-glue.c39 dctx->buflen = 0; in poly1305_init_arch()
47 dctx->buflen = 0; in arm_poly1305_init()
48 dctx->rset = 0; in arm_poly1305_init()
62 dctx->rset = 1; in arm_poly1305_blocks()
91 memcpy(dctx->buf + dctx->buflen, src, bytes); in arm_poly1305_do_update()
97 arm_poly1305_blocks(dctx, dctx->buf, in arm_poly1305_do_update()
148 memcpy(dctx->buf + dctx->buflen, src, bytes); in poly1305_update_arch()
154 poly1305_blocks_arm(&dctx->h, dctx->buf, in poly1305_update_arch()
191 dctx->buf[dctx->buflen++] = 1; in poly1305_final_arch()
192 memset(dctx->buf + dctx->buflen, 0, in poly1305_final_arch()
[all …]
/linux-6.15/arch/powerpc/crypto/
H A Dpoly1305-p10-glue.c42 dctx->buflen = 0; in crypto_poly1305_p10_init()
43 dctx->rset = 0; in crypto_poly1305_p10_init()
44 dctx->sset = false; in crypto_poly1305_p10_init()
63 dctx->rset = 1; in crypto_poly1305_setdctxkey()
85 memcpy(dctx->buf + dctx->buflen, src, bytes); in crypto_poly1305_p10_update()
91 if (likely(!crypto_poly1305_setdctxkey(dctx, dctx->buf, in crypto_poly1305_p10_update()
94 poly1305_64s(&dctx->h, dctx->buf, in crypto_poly1305_p10_update()
141 dctx->buf[dctx->buflen++] = 1; in crypto_poly1305_p10_final()
142 memset(dctx->buf + dctx->buflen, 0, in crypto_poly1305_p10_final()
145 poly1305_64s(&dctx->h, dctx->buf, POLY1305_BLOCK_SIZE, 0); in crypto_poly1305_p10_final()
[all …]
H A Dghash.c50 dctx->bytes = 0; in p8_ghash_init()
89 crypto_xor((u8 *)dctx->shash, dctx->buffer, GHASH_BLOCK_SIZE); in __ghash_block()
124 if (dctx->bytes) { in p8_ghash_update()
126 memcpy(dctx->buffer + dctx->bytes, src, in p8_ghash_update()
128 dctx->bytes += srclen; in p8_ghash_update()
131 memcpy(dctx->buffer + dctx->bytes, src, in p8_ghash_update()
138 dctx->bytes = 0; in p8_ghash_update()
148 dctx->bytes = srclen; in p8_ghash_update()
159 if (dctx->bytes) { in p8_ghash_final()
161 dctx->buffer[i] = 0; in p8_ghash_final()
[all …]
/linux-6.15/crypto/
H A Dpoly1305_generic.c27 dctx->buflen = 0; in crypto_poly1305_init()
28 dctx->rset = 0; in crypto_poly1305_init()
29 dctx->sset = false; in crypto_poly1305_init()
37 if (!dctx->sset) { in crypto_poly1305_setdesckey()
42 dctx->rset = 2; in crypto_poly1305_setdesckey()
51 dctx->sset = true; in crypto_poly1305_setdesckey()
68 poly1305_core_blocks(&dctx->h, &dctx->core_r, src, in poly1305_blocks()
80 memcpy(dctx->buf + dctx->buflen, src, bytes); in crypto_poly1305_update()
83 dctx->buflen += bytes; in crypto_poly1305_update()
86 poly1305_blocks(dctx, dctx->buf, in crypto_poly1305_update()
[all …]
H A Dghash-generic.c50 memset(dctx, 0, sizeof(*dctx)); in ghash_init()
83 u8 *dst = dctx->buffer; in ghash_update()
85 if (dctx->bytes) { in ghash_update()
89 dctx->bytes -= n; in ghash_update()
95 if (!dctx->bytes) in ghash_update()
117 u8 *dst = dctx->buffer; in ghash_flush()
119 if (dctx->bytes) { in ghash_flush()
122 while (dctx->bytes--) in ghash_flush()
128 dctx->bytes = 0; in ghash_flush()
135 u8 *buf = dctx->buffer; in ghash_final()
[all …]
H A Ddes_generic.c22 struct des_ctx *dctx = crypto_tfm_ctx(tfm); in des_setkey() local
25 err = des_expand_key(dctx, key, keylen); in des_setkey()
33 memset(dctx, 0, sizeof(*dctx)); in des_setkey()
39 const struct des_ctx *dctx = crypto_tfm_ctx(tfm); in crypto_des_encrypt() local
41 des_encrypt(dctx, dst, src); in crypto_des_encrypt()
48 des_decrypt(dctx, dst, src); in crypto_des_decrypt()
54 struct des3_ede_ctx *dctx = crypto_tfm_ctx(tfm); in des3_ede_setkey() local
57 err = des3_ede_expand_key(dctx, key, keylen); in des3_ede_setkey()
65 memset(dctx, 0, sizeof(*dctx)); in des3_ede_setkey()
74 des3_ede_encrypt(dctx, dst, src); in crypto_des3_ede_encrypt()
[all …]
H A Dpolyval-generic.c147 memset(dctx, 0, sizeof(*dctx)); in polyval_init()
161 if (dctx->bytes) { in polyval_update()
162 n = min(srclen, dctx->bytes); in polyval_update()
163 pos = dctx->buffer + dctx->bytes - 1; in polyval_update()
165 dctx->bytes -= n; in polyval_update()
171 if (!dctx->bytes) in polyval_update()
178 gf128mul_4k_lle(&dctx->buffer128, ctx->gf128); in polyval_update()
184 dctx->bytes = POLYVAL_BLOCK_SIZE - srclen; in polyval_update()
185 pos = dctx->buffer + POLYVAL_BLOCK_SIZE - 1; in polyval_update()
198 if (dctx->bytes) in polyval_final()
[all …]
/linux-6.15/lib/zstd/decompress/
H A Dzstd_decompress.c281 dctx->inBuff = (char*)(dctx+1); in ZSTD_initStaticDCtx()
355 dctx->dictID = dctx->fParams.dictID; in ZSTD_DCtx_selectFrameDDict()
695 RETURN_ERROR_IF(dctx->fParams.dictID && (dctx->dictID != dctx->fParams.dictID), in ZSTD_decodeFrameHeader()
1363 dctx->dictEnd = dctx->previousDstEnd; in ZSTD_refDictContent()
1480 dctx->litEntropy = dctx->fseEntropy = 1; in ZSTD_decompress_insertDictionary()
1498 dctx->litEntropy = dctx->fseEntropy = 0; in ZSTD_decompressBegin()
1504 dctx->LLTptr = dctx->entropy.LLTable; in ZSTD_decompressBegin()
1505 dctx->MLTptr = dctx->entropy.MLTable; in ZSTD_decompressBegin()
1506 dctx->OFTptr = dctx->entropy.OFTable; in ZSTD_decompressBegin()
1507 dctx->HUFptr = dctx->entropy.hufTable; in ZSTD_decompressBegin()
[all …]
H A Dzstd_decompress_block.c95 dctx->litBufferEnd = dctx->litBuffer + litSize; in ZSTD_allocateLiteralsBuffer()
101 dctx->litBuffer = dctx->litExtraBuffer; in ZSTD_allocateLiteralsBuffer()
102 dctx->litBufferEnd = dctx->litBuffer + litSize; in ZSTD_allocateLiteralsBuffer()
216 dctx->entropy.hufTable, dctx->litBuffer, litSize, in ZSTD_decodeLiteralsBlock()
244 dctx->litPtr = dctx->litBuffer; in ZSTD_decodeLiteralsBlock()
287 dctx->litPtr = dctx->litBuffer; in ZSTD_decodeLiteralsBlock()
294 dctx->litBufferEnd = dctx->litPtr + litSize; in ZSTD_decodeLiteralsBlock()
333 dctx->litPtr = dctx->litBuffer; in ZSTD_decodeLiteralsBlock()
1359 if (dctx->dictEnd != dctx->dictContentEndForFuzzing) return 0; in ZSTD_dictionaryIsActive()
2182 dctx->dictEnd = dctx->previousDstEnd;
[all …]
H A Dzstd_ddict.c59 assert(dctx != NULL); in ZSTD_copyDDictParameters()
61 dctx->dictID = ddict->dictID; in ZSTD_copyDDictParameters()
62 dctx->prefixStart = ddict->dictContent; in ZSTD_copyDDictParameters()
63 dctx->virtualStart = ddict->dictContent; in ZSTD_copyDDictParameters()
65 dctx->previousDstEnd = dctx->dictEnd; in ZSTD_copyDDictParameters()
67 dctx->dictContentBeginForFuzzing = dctx->prefixStart; in ZSTD_copyDDictParameters()
68 dctx->dictContentEndForFuzzing = dctx->previousDstEnd; in ZSTD_copyDDictParameters()
71 dctx->litEntropy = 1; in ZSTD_copyDDictParameters()
72 dctx->fseEntropy = 1; in ZSTD_copyDDictParameters()
81 dctx->litEntropy = 0; in ZSTD_copyDDictParameters()
[all …]
/linux-6.15/arch/x86/crypto/
H A Dpoly1305_glue.c139 dctx->buflen = 0; in poly1305_init_arch()
140 dctx->sset = true; in poly1305_init_arch()
154 dctx->rset = 1; in crypto_poly1305_setdctxkey()
175 memcpy(dctx->buf + dctx->buflen, src, bytes); in poly1305_update_arch()
182 poly1305_simd_blocks(&dctx->h, dctx->buf, POLY1305_BLOCK_SIZE, 1); in poly1305_update_arch()
183 dctx->buflen = 0; in poly1305_update_arch()
206 dctx->buf[dctx->buflen++] = 1; in poly1305_final_arch()
207 memset(dctx->buf + dctx->buflen, 0, in poly1305_final_arch()
209 poly1305_simd_blocks(&dctx->h, dctx->buf, POLY1305_BLOCK_SIZE, 0); in poly1305_final_arch()
212 poly1305_simd_emit(&dctx->h, dst, dctx->s); in poly1305_final_arch()
[all …]
H A Dpolyval-clmulni_glue.c105 memset(dctx, 0, sizeof(*dctx)); in polyval_x86_init()
119 if (dctx->bytes) { in polyval_x86_update()
120 n = min(srclen, dctx->bytes); in polyval_x86_update()
121 pos = dctx->buffer + POLYVAL_BLOCK_SIZE - dctx->bytes; in polyval_x86_update()
123 dctx->bytes -= n; in polyval_x86_update()
129 if (!dctx->bytes) in polyval_x86_update()
130 internal_polyval_mul(dctx->buffer, in polyval_x86_update()
143 dctx->bytes = POLYVAL_BLOCK_SIZE - srclen; in polyval_x86_update()
144 pos = dctx->buffer; in polyval_x86_update()
157 if (dctx->bytes) { in polyval_x86_final()
[all …]
H A Dghash-clmulni-intel_glue.c49 memset(dctx, 0, sizeof(*dctx)); in ghash_init()
100 u8 *dst = dctx->buffer; in ghash_update()
103 if (dctx->bytes) { in ghash_update()
107 dctx->bytes -= n; in ghash_update()
113 if (!dctx->bytes) in ghash_update()
133 u8 *dst = dctx->buffer; in ghash_flush()
135 if (dctx->bytes) { in ghash_flush()
138 while (dctx->bytes--) in ghash_flush()
146 dctx->bytes = 0; in ghash_flush()
247 memcpy(dctx, in, sizeof(*dctx)); in ghash_async_import()
[all …]
/linux-6.15/arch/riscv/crypto/
H A Dghash-riscv64-glue.c83 if (dctx->bytes) { in riscv64_ghash_update()
85 memcpy(dctx->buffer + dctx->bytes, src, srclen); in riscv64_ghash_update()
86 dctx->bytes += srclen; in riscv64_ghash_update()
89 memcpy(dctx->buffer + dctx->bytes, src, in riscv64_ghash_update()
91 riscv64_ghash_blocks(tctx, dctx, dctx->buffer, in riscv64_ghash_update()
95 dctx->bytes = 0; in riscv64_ghash_update()
106 memcpy(dctx->buffer, src, srclen); in riscv64_ghash_update()
107 dctx->bytes = srclen; in riscv64_ghash_update()
119 if (dctx->bytes) { in riscv64_ghash_final()
121 dctx->buffer[i] = 0; in riscv64_ghash_final()
[all …]
/linux-6.15/arch/s390/crypto/
H A Dghash_s390.c35 memset(dctx, 0, sizeof(*dctx)); in ghash_init()
59 u8 *buf = dctx->buffer; in ghash_update()
61 if (dctx->bytes) { in ghash_update()
64 n = min(srclen, dctx->bytes); in ghash_update()
65 dctx->bytes -= n; in ghash_update()
71 if (!dctx->bytes) { in ghash_update()
94 u8 *buf = dctx->buffer; in ghash_flush()
96 if (dctx->bytes) { in ghash_flush()
99 memset(pos, 0, dctx->bytes); in ghash_flush()
101 dctx->bytes = 0; in ghash_flush()
[all …]
/linux-6.15/fs/erofs/
H A Ddecompressor.c358 if (dctx->kout) in z_erofs_stream_switch_bufs()
366 dctx->kout = NULL; in z_erofs_stream_switch_bufs()
380 if (dctx->inbuf_pos == dctx->inbuf_sz && rq->inputsize) { in z_erofs_stream_switch_bufs()
391 dctx->kin = kmap_local_page(rq->in[dctx->ni]); in z_erofs_stream_switch_bufs()
392 *src = dctx->kin; in z_erofs_stream_switch_bufs()
394 if (dctx->kout) { in z_erofs_stream_switch_bufs()
396 dctx->kout = kmap_local_page(rq->out[dctx->no]); in z_erofs_stream_switch_bufs()
399 dctx->inbuf_pos = 0; in z_erofs_stream_switch_bufs()
408 if (!dctx->bounced && rq->out[dctx->no] == rq->in[dctx->ni]) { in z_erofs_stream_switch_bufs()
409 memcpy(dctx->bounce, *src, dctx->inbuf_sz); in z_erofs_stream_switch_bufs()
[all …]
H A Ddecompressor_lzma.c164 kunmap_local(dctx.kin); in z_erofs_lzma_decompress()
185 buf.in = dctx.kin + rq->pageofs_in; in z_erofs_lzma_decompress()
186 dctx.bounce = strm->bounce; in z_erofs_lzma_decompress()
189 dctx.inbuf_sz = buf.in_size; in z_erofs_lzma_decompress()
190 dctx.inbuf_pos = buf.in_pos; in z_erofs_lzma_decompress()
197 buf.out_size = dctx.avail_out; in z_erofs_lzma_decompress()
200 buf.in_size = dctx.inbuf_sz; in z_erofs_lzma_decompress()
201 buf.in_pos = dctx.inbuf_pos; in z_erofs_lzma_decompress()
217 if (dctx.kout) in z_erofs_lzma_decompress()
218 kunmap_local(dctx.kout); in z_erofs_lzma_decompress()
[all …]
H A Ddecompressor_zstd.c150 dctx.kin = kmap_local_page(*rq->in); in z_erofs_zstd_decompress()
154 kunmap_local(dctx.kin); in z_erofs_zstd_decompress()
172 dctx.bounce = strm->bounce; in z_erofs_zstd_decompress()
176 dctx.inbuf_sz = in_buf.size; in z_erofs_zstd_decompress()
177 dctx.inbuf_pos = in_buf.pos; in z_erofs_zstd_decompress()
184 out_buf.size = dctx.avail_out; in z_erofs_zstd_decompress()
187 in_buf.size = dctx.inbuf_sz; in z_erofs_zstd_decompress()
188 in_buf.pos = dctx.inbuf_pos; in z_erofs_zstd_decompress()
200 if (dctx.kout) in z_erofs_zstd_decompress()
201 kunmap_local(dctx.kout); in z_erofs_zstd_decompress()
[all …]
H A Ddecompressor_deflate.c109 dctx.kin = kmap_local_page(*rq->in); in z_erofs_deflate_decompress()
113 kunmap_local(dctx.kin); in z_erofs_deflate_decompress()
141 dctx.bounce = strm->bounce; in z_erofs_deflate_decompress()
144 dctx.avail_out = strm->z.avail_out; in z_erofs_deflate_decompress()
145 dctx.inbuf_sz = strm->z.avail_in; in z_erofs_deflate_decompress()
146 err = z_erofs_stream_switch_bufs(&dctx, in z_erofs_deflate_decompress()
151 strm->z.avail_out = dctx.avail_out; in z_erofs_deflate_decompress()
152 strm->z.avail_in = dctx.inbuf_sz; in z_erofs_deflate_decompress()
168 if (dctx.kout) in z_erofs_deflate_decompress()
169 kunmap_local(dctx.kout); in z_erofs_deflate_decompress()
[all …]
/linux-6.15/drivers/crypto/xilinx/
H A Dzynqmp-sha.c83 struct zynqmp_sha_desc_ctx *dctx = shash_desc_ctx(desc); in zynqmp_sha_init() local
86 dctx->fbk_req.tfm = tctx->fbk_tfm; in zynqmp_sha_init()
87 return crypto_shash_init(&dctx->fbk_req); in zynqmp_sha_init()
92 struct zynqmp_sha_desc_ctx *dctx = shash_desc_ctx(desc); in zynqmp_sha_update() local
99 struct zynqmp_sha_desc_ctx *dctx = shash_desc_ctx(desc); in zynqmp_sha_final() local
101 return crypto_shash_final(&dctx->fbk_req, out); in zynqmp_sha_final()
106 struct zynqmp_sha_desc_ctx *dctx = shash_desc_ctx(desc); in zynqmp_sha_finup() local
113 struct zynqmp_sha_desc_ctx *dctx = shash_desc_ctx(desc); in zynqmp_sha_import() local
116 dctx->fbk_req.tfm = tctx->fbk_tfm; in zynqmp_sha_import()
117 return crypto_shash_import(&dctx->fbk_req, in); in zynqmp_sha_import()
[all …]
/linux-6.15/drivers/crypto/
H A Dpadlock-sha.c34 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_init() local
37 dctx->fallback.tfm = ctx->fallback; in padlock_sha_init()
38 return crypto_shash_init(&dctx->fallback); in padlock_sha_init()
44 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_update() local
51 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_export() local
53 return crypto_shash_export(&dctx->fallback, out); in padlock_sha_export()
58 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_import() local
61 dctx->fallback.tfm = ctx->fallback; in padlock_sha_import()
62 return crypto_shash_import(&dctx->fallback, in); in padlock_sha_import()
87 err = crypto_shash_export(&dctx->fallback, &state); in padlock_sha1_finup()
[all …]
/linux-6.15/drivers/block/zram/
H A Dbackend_deflate.c16 struct z_stream_s dctx; member
42 if (zctx->dctx.workspace) { in deflate_destroy()
43 zlib_inflateEnd(&zctx->dctx); in deflate_destroy()
44 vfree(zctx->dctx.workspace); in deflate_destroy()
72 zctx->dctx.workspace = vzalloc(sz); in deflate_create()
73 if (!zctx->dctx.workspace) in deflate_create()
76 ret = zlib_inflateInit2(&zctx->dctx, -DEFLATE_DEF_WINBITS); in deflate_create()
120 inflate = &zctx->dctx; in deflate_decompress()

12